how do you name components e.g. using via tuples or atom names?
I understand for global components that you don't give names, but how does that work across nodes e.g. i could use syn/global/horde/swarm and have multiple nodes running my program. In my current case i use syn (very nice it is too) and register the genservers with via tuples, but it is not clear from the readme how naming servers with atoms or via tuples works?
Apologies for the question if its obvious!
Components are globally named by default.
Do you think I should also support passing in a tuple, so you can register them using other name registries? On Jan 14, 2019, 6:28 AM -0600, shifters67 [email protected], wrote:
I understand for global components that you don't give names, but how does that work across nodes e.g. i could use syn/global/horde/swarm and have multiple nodes running my program. In my current case i use syn (very nice it is too) and register the genservers with via tuples, but it is not clear from the readme how naming servers with atoms or via tuples works? Apologies for the question if its obvious! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
HI Dave,
i think distributed programs still have the same monolithic issues so i think the component library is still just as useful as long as the components can be registered with a via tuple to a suitable distributed registry.
Implemented may be as a parameter field under your 'use' macro???
e.g. registry: {:via, :syn, name} etc
i think distributed programs still have the same monolithic issues so i think the component library is still just as useful as long as the components can be registered with a via tuple to a suitable distributed registry. Implemented may be as a parameter field under your 'use' macro???
There’s already a name parameter. If you pass an atom, it gets converted automatically into { :via, :global, name}.
I was suggesting that you could also pass a {:via….} tuple to this option, which would simply be used unchanged.
Would that work?
Yes that should work fine as that's currently how they are used