Skip to content

How to connect the containers? #2

@YourDeveloperFriend

Description

@YourDeveloperFriend

I'm having a bit of trouble wrapping my mind around connecting two containers. I think the easiest way is to make each container host their own server of some sort (probably sockets). They would all listen on some kind of "main" port, and will also be aware of the ports of those they can interact with. So, essentially, in our example:

The webfront listens on their main port which should be configured by the owner to connect with port 80. The webfront is also aware of two ports, one for the Project and one for the DataStore.
The Project only listens to the main port, and is not aware of anything else.
The Transformer only listens on its main port, and is not aware of anything else.
The DataStore listens on its main port, and is aware of the port for the transformer.

This seems like the best way to handle communication. However, there is the issue of protection. For example, DataStore has two openings, getAll and save. If we wanted to limit webfront so that it could only call getAll and not save. So we could restrict the access on the port level or in the code level:

Port level restriction:
assign getAll and save each their own port. That way, webfront is only aware of the one port.
Problem: A service may have anywhere up to 50-100 methods and will have to run 50-100 servers, which may or may not be a big deal.

Code level:
The socket server on DataStore checks the permissions of the sender (webfront) and decides not to accept any "send" events.
Problem: This puts the security issue directly into the hands of DataStore. Granted, they'll want to be secure, but if they screwed up (or purposefully put in a backdoor), there would be a security hole.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions