[zeromq-dev] Architecture questions

MM finjulhich at gmail.com
Sat Aug 29 11:52:28 CEST 2015


I have this architecture (see attached) of my server box and clients, and
processes, currently in development.

The flows are:
1. I can have N clients (UIs). Initially, 1 or at most 2 UIs run at the
same time, from the same box, or from 2 boxes, 1 in the server's LAN, and 1
from outside the internet, behind 2 firewalls, where only https port is
allowed: because of this I run SSH traffic over HTTPS, and use a
multiplexer called sshttpd that directs traffic to either httpd or sshd
depending on the header.

2. Because I use sshd, sshd can either fork a shell process, or a command
that I give to it. I use python paramiko in the client side, exec_command
returns a triplet that are the stdin, stdout and stderr channels of the
remote command sshd spawns on the server.
That command is a simple dumb uiproxy python process that purely forwards
traffic at both ends( received from UI client towartds UI server proc, or
from UI server proc towards UI client process).   My UIclient can run on
boxes inside the LAN, but I still use sshttpd/sshd in that case well.

Question 1: can pyzmq be used in such a way that I forgo paramiko?
Question 2: if not, can I use the proxy() function of pymzq with 2 zmq
sockets, 1 of which would be the stdin/stdout of the uiproxy process
(paramiko channels) to trivialize the uiproxy code.

3. I have 2 bizlogic processes, 1 that runs in the morning (normally for
15mns or so, depends on user input), and 1 that runs in the afternoon (for
30mns or so).  They send a sort of request to all of the connected UI
processes through the UI server (potentially, the UI server can act as a
broadcaster/multicaster here)...
1/N of the users on the UI clients then acts on that request. This then
sends a asynchronous request to 1 toplevel process that will use a
synchronous REST API request to outside world, and wait for an answer, then
returns a response to the all the UIs, through the UI server.
The UIs themselves could manually, on request of the user, originate the
same request that the bizlogic process send for approval by the human user.

4. Additionally, the top level process subscribes as lightstreamer client
to a server in hte outside world, and wants to update internal state, a
sqlite database, and forward these subscriptions to the final UI clients.

5. Not all toplevel processes use REST/lighstreamer. Some use other
protocols. For now only 1 top level process exists, and only 1 instance of

I can see that zmq can help to simplify my architecture. I am still
rereading the guide for a second time.
Perhaps I can forgo the UI server entirely? Perhaps I don't need paramiko
to treat ssh over https especially.

Comments are very welcome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150829/48d35190/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arch.png
Type: image/png
Size: 47951 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150829/48d35190/attachment.png>

More information about the zeromq-dev mailing list