diff --git a/docs/doc.html b/docs/doc.html index 4a48438..ca8745c 100644 --- a/docs/doc.html +++ b/docs/doc.html @@ -653,10 +653,12 @@
SCENARIO 2
-PUB[1] --remote--> SUB[N] | ROUTER[N] --output--> DEALER[1] --ack--> ROUTER[N]
--+// TODO : detail the second scenario mixing InCh and MaCh and used for remote command execution
-
PUB[1] --remote--> SUB[N] | DEALER[N] --output--> ROUTER[1] --ack--> DEALER[N]
+remote
message on its PUB socket.stdout
) to node [1]. To do so, they will all use their DEALER socket that is used to issue asynchronous requests.ack
messages to acknowledge the reception of the remote command execution's result.We use the mdns module for Node.js. Each node of the network advertise its presence by providing a service called _node._tcp
. When advertising, we also add the id
of the node as a TXT record.
Then to monitor the come and go of nodes in the network, we can use the browser that will focus on other _node._tcp
services and events will be emitted when node are discovered or disappear.
test
(for testing purpose only)These are the methods used by the Core singleton to interact with its state and its communication channels.
+These are the main methods used by the Core singleton to interact with its state and its communication channels.
init()
will start mDNS advertising and browsing of _node.tcp
service, bind socketspublish()
will trigger a inch
event on all subscriberssend()
will trigger a mach
event on the recipientsyncSend()
will also trigger a mach
reply()
close()
send()
used to initiate a request and will subsequently trigger a mach
event on the recipient sidesyncSend()
used to initiate a synchronous request and will also trigger a mach
event on the recipient side (and the sender expects a quick response because it is blocking)reply()
used to send a response to a previous request and will subsequently trigger a reply
event on the recipient sideclose()
to safely stops mDNS services and close socketsrequestResource()
to request a resource on a specific nodereleaseResource()
to release a resource on a specific nodedetectSensors()
to detect sensors-// TODO add missing important methods
-
The message exchanged on the communication channels (InCh and MaCh) are JavaScript serialized objects (JSON) and have the following structure :
diff --git a/docs/doc.pdf b/docs/doc.pdf index 2433a5c..d9c1973 100644 Binary files a/docs/doc.pdf and b/docs/doc.pdf differ