Skip to content

Code distribution

Äkwav edited this page Feb 22, 2019 · 4 revisions

While the architecture of Splitting up Datasets into different Resources is pretty neat, it is only possible to run one application per node.
What if you have multiple mobile apps that use different code, or you want to host someone elses code?
Well, this at least hosting someone elses code isn't possible securely in the same binary.
We just use Docker for this.
Since we also have 65536 serverIds per location we can give each instance its own id. This doesn't break the option to exchange messages between two client apps and also allows for dynamic computer resource usage.

Note

The amount of different applications should be minimized since it causes overhead. If you want to write some code please first check if there isn't already a module that covers your use case.

What if a node isn't needed anymore

In case you scaled up because you were under heavy load and now don't need a server instance anymore you can't just shut it down because Resources mostly users may still try to connect to it and would thus fail.
You may say, well then it should just use a sibbling manager node. While this would be possible it isn't a good idea. There is a better solution, we just give a sibbling managing node the servers id. resource_migration

Clone this wiki locally