David Sowder wrote: >> So every service will have to deal with demultiplexing different users' >> messages? >> > Yes. Only a service should care about the concept of a user. It's not > exactly complicated.
It's not complicated, but it makes it impossible to run multiple instances of the same service. What you're proposing is the equivalent of HTTP virtual hosting: multiple websites have to share a single server instance because there's only one port 80. This is bad for security because you can't properly sandbox the websites from one another. What I'm proposing is the equivalent of DNS SRV: each website can put a different port number in its DNS record, allowing each to use a separate server instance (or share a server instance, if they prefer - but they have the choice). > This is the correct > approach in my thinking because chat/Alice and chat/Bob, while being > represented by different instances, are still instances of the same > service and thus should not have a different service ID (a.k.a. N2NM > type). OK, so you're thinking of the ID as a message type; I'm thinking of it as a port number. > Cloud 1 and Cloud 2 need to be using the same N2NM type ID number for a > particular service if any of [A, B, C] connects with [D, E, F] if such a > connection is to then allow all of [A, B, C, D, E, F] to potentially > talk to each other because otherwise would involve some sort of > "difference resolution protocol" to force either [A, B, C] or [D, E, F] > to change their service name to N2NM type mapping to either the same > N2NM type ID number of the other or a third N2NM type ID number used by > [A, B, C, D, E, F]. If you view the ID as a port number rather than a message type then there's no problem. Node A runs the service on port 123, node B runs it on port 456, etc. When you want to connect to the Foo service on a particular node, contact its lookup service and get the port number for the string "Foo". The string, rather than the port number, identifies the service. Different instances can have different names (eg Foo/Alice and Foo/Bob). Cheers, Michael
