Hi,
I’ve read the README document on WSD folder (https://gerrit.libreoffice.org/gitweb?p=online.git;a=blob;f=wsd/README) and I’ve tried to understand the architecture of this software but I’m having many difficulties to understand some concepts. In this document, they talk about 3 processes LOOLWSD, LOOLForKit and LOOLKit.
Ok, LoolWSD is a top-level server that is already listening the public port and waiting a connection of client (I think that is the principal function of this process. It’s look like an easy concept). When a client is connected it spawn a Forkit (I can’t understand the concept of ForKit). The ForKit, in turn, “forking Kit instance”(??? - I don’t understand this - So, the ForKit create a copy of code to implement new tasks according the user is change the document? That is it? ). There is only one ForKit per WSD instance (Why? I’m a client, so I establish a connection to the server, than I want to open 2 documents. The connection is the same but will be necessary to ForKit process, no?) and there is one Kit instance per document.
And the Kit process? what’s represent?
257 Architecture
258 ------------
260 There are three processes: LoolWSD, LoolForKit, and LoolKit.
262 WSD is the top-level server and is intended to run as a service.
263 It is responsible for spawning ForKit and listening on public
264 port for client connections.
266 The ForKit is only responsible for forking Kit instances. There is
267 only one ForKit per WSD instance and there is one Kit instance per
268 document.
270 WSD listens on a public port and using internal pipes requests
271 the ForKit to fire a child (Kit) instance to host documents.
272 The ForKit then has to find an existing Kit that hosts that
273 document, based on the public URI as unique key, and forward
274 the request to this existing Kit, which then loads a new
275 view to the document.
277 There is a singleton Admin class that gets notified of all the
278 important changes and update the AdminModel object accordingly.
279 AdminModel object has subscribers which corresponds to admin
280 panel sessions. Subscriber can subscribe to specific commands
281 to get live notifications about, and to update the UI accordingly.
283 Whether a document is loaded for the first time, or this is
284 a new view on an existing one, the Kit connects via a socket
285 to WSD on an internal port. WSD acts as a bridge between
286 the client and Kit by tunnelling the traffic between the two
287 sockets (that which is between the client and WSD and the one
288 between WSD and Kit).
I’m a noob in this area and these questions can look like stupid but I really need to understand this concepts, so it’ll very helpful if someone could clarify this questions for me or try to explain in an easier way.
Thanks in advance.