Ok, I try answer your original question:

2017-11-12 10:47 GMT+01:00 Cédrick Béler <cdric...@gmail.com>:
>
> My objective is to have several images running (one representing one app
> belonging to one or more singular entity realm).
>
> Lets say image A1, A2, A3 belongs to Alice. And image B1, B2, … to Bob.
>
> They exchange messages conveying information. So the aim of the network
> layer is for me to keep messages synchronized betweens A(s) and B(s). I
> have inbox and outbox for that. This is actually quite close to the basys
> abstractions on LocalPeer and RemotePeer (active and passive).
>
> So I played a bit with basys and can declare a network between A1 and B1
> for instance. I wonder if I need as much network as possible connection
> (A1B1 A1B2 … but also A1A2, A1A3, A2A3, …). Not sure how to declare network
> with more than 2 nodes…
>

Probably not but if you have different purpose of connecting A<->A nodes
and connecting A<->B nodes then it can be suitable to have separate
networks for that. But it is difficult to answer without more information.
I imaging following schema:
On each node you have single network instance.
Let's say we have node A1. Then other A1, A2 and B nodes connect to A1. By
Basys logic they will be represented by remote peers inside A1 network
instance. So you are able to enumerate all connected peers and sync some
local information with them:

network remotePeers do: [:each | each sendDataPackage: myNewLocalData].

And for incoming messages you can put them into inbox collection stored
inside network instance:

YourNetwork>> process: anExchangeData receivedFrom: aRemotePeer
inboxQueue add: anExchangeData

And you can have separate process which handle this queue.

So in that case I do not see the reason to create multiple instances of
network for each pair of connected nodes.
What you think? Is my example relevant to your case?

Reply via email to