Lessons learned from building an asynchronous filesystem component
@WyriHaximus
Cees-Jan Kiewiet
- @WyriHaximus
- Phergie Team member
- ReactPHP Team member
- Sculpin Team member
- Lead Software Engineer at
@WyriHaximus
Files
@WyriHaximus
@WyriHaximus
file_get_contents('HelloWorld.java');
@WyriHaximus
$filename = 'HelloWorld.java';
$handle = fopen($filename, 'r');
$contents = fread($handle, filesize($filename));
fclose($handle);
@WyriHaximus
function file_get_contents($filename)
{
$handle = fopen($filename, 'r');
$contents = fread($handle, filesize($filename));
fclose($handle);
}
@WyriHaximus
$filename = 'HelloWorld.java';
$handle = fopen($filename, 'r');
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 4096);
}
fclose($handle);
@WyriHaximus
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
@WyriHaximus
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
�������f�H�D1�H����k����8�N���H�D$�����H9�u
����J���D�(I��H������E�,$�Y�����������f��<$
�����H��H�DH��H=���HG�L�kL���t���H��I���E1�1
�1�1�L������L�d$H�\$�g賓���I�ǃ������(H�\$K�l
-L)�I9�H��L���k���H��H���H�I��I��H�D$H�E�H)�
H�D$L�D$H�L$H�TH��L��芓��H����x����ZfD�#���
�I�ǃ���H\$K�lL)�I9�H��L�������H��toH�I��I��H
�T$H�U�H)�H�T$L�D$H�L$1�1�L�����H���t�H�D$H�
PH�T$�L��H�t$L)�L9�s0L������H��ID��fDA�
@WyriHaximus
Directories
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- vendor
@WyriHaximus
@WyriHaximus
-
Directory
- File
- Symlink
@WyriHaximus
-
Directory: 0x4000
- File
- Symlink
@WyriHaximus
-
Directory: 0x4000
- File: 0x8000
- Symlink
@WyriHaximus
-
Directory: 0x4000
- File: 0x8000
- Symlink: 0xa000
@WyriHaximus
- .
- ..
- HelloWorld.java
- PHP Antwerp.ug
- PHP Antwerp.ug
@WyriHaximus
Inodes
@WyriHaximus
An inode:
- inode ID
- size
- device ID
- user ID
- group ID
- mode
- timestamps
- flags
- data blocks
@WyriHaximus
A file
@WyriHaximus
A directory
@WyriHaximus
A symlink
@WyriHaximus
Limits
@WyriHaximus
Software Limits
@WyriHaximus
ulimit
@WyriHaximus
Hardware limits
@WyriHaximus
Questions?
@WyriHaximus
https://slides.com/wyrihaximus/lessons-learned-from-building-an-asynchronous-filesystem-component
Slides:
Rate this talk:
https://legacy.joind.in/17602
Lessons learned from building an asynchronous filesystem component (PHP Antwerp)
By wyrihaximus
Lessons learned from building an asynchronous filesystem component (PHP Antwerp)
- 1,456