The big picture
Here it is, every major component fitted nicely into one picture, thaks to Lucidchart! I understand, a bit of explanation is still required. First things first, red boxes are the actors. A user connects to thecontrol connector at the very top, which spawns (creates label on the diagram) a control connection, which in turn creates user's session etc etc. FTP state is the core piece with all the dependencies such as command factory, file system and more. It is directly or indirectly referenced by every other component. Session is specific to a given user. Control connection accepts user's commands and sends replies to the user. Data connection transfers files and when the transfer completes, it notifies the control connection to send a reply. Task executor uses slave actors to handle commands and provide replies back to the control connection.Command is an FTP command a user sends to the server. It does what it needs and outputs a reply. Reply is then sent back to the user.The last piece worth explaining is how the
data connection gets created. Both data connector and data connection initiator create it. When a user sends a PORT command, the data connection initiator attempts (initiates - hence the name) a connection to the user machine, using the IP address and port supplied. On the other hand, when the user sends a PASV command, the user then needs to make a connection to the data connector. At the moment of this writing, there is no data connector yet thus the PASV command is not supported, but eventually it will be implemented.Global and user actors
Server eventually creates the following 3 actors for every user:control connection, data connection, data connection initiator. Those actors exist only while the user is connected and die afterwards. The rest of the actors not related to users and exist while the server is running.
No comments:
Post a Comment