diff --git a/Networking.md b/Networking.md index 14c0e4a..6ddc49a 100644 --- a/Networking.md +++ b/Networking.md @@ -1 +1,7 @@ -The foundation of the whole framework is the messaging system connecting the frontend with the backend. Frontend components use *websockets* to connect to the TFW server, to which you can hook several [event handlers](https://github.com/avatao-content/baseimage-tutorial-framework/wiki/Event-handlers) defining how to handle specific messages. \ No newline at end of file +The foundation of the whole framework is the messaging system connecting the frontend with the backend. Frontend components use *websockets* to connect to the TFW server, to which you can hook several [event handlers](https://github.com/avatao-content/baseimage-tutorial-framework/wiki/Event-handlers) defining how to handle specific messages. + +## ZMQ +Event handlers connect to the TFW server using **ZMQ**. They receive messages on their *SUB(scribe)* sockets, which are connected to the *PUB(lish)* socket of the server. Event handlers reply on their *PUSH* socket, then their messages are received on the *PULL* socket of the server. + +## Named pipes +There is another layer on top of ZMQ sockets called **named pipes**. These are an extension of traditional *Unix* pipes, and they represent a *FIFO*-like structure. They behave similarly to files except that you cannot seek in them. Their role in the framework is to allow users to read and write TFW messages in JSON format without any additional libraries. This way you can implement an event handler even in `bash` without much effort. \ No newline at end of file