Hi Julio,

> The idea here is Client 1 always talk with Backend X(2 w/ Y, 3 w/ Z and
so on...) but
> everything is connected through this "intelligent" Router in the middle.
This Router
> reads a header in the package that provides the "stick" between a client
and a backend

Take a look at

https://github.com/imatix/zguide/blob/master/examples/C%2B%2B/lbbroker.cpp
or
https://github.com/imatix/zguide/blob/master/examples/Python/lbbroker3.py

You will have to strip out the client_thread() portion of the code.

-Sandeep


On Sat, Apr 19, 2014 at 6:17 PM, Julio Viegas
<[email protected]>wrote:

> Hello guys,
>
>    I'm using ZeroMQ since the last year as the fabric for connecting a
> system composed of multiple Raspberry PIs and a Linux server.  We are about
> to launch the first product to a small group of machines, but our second
> customer is a big one, so I'm here asking for help to scale our solution
> out... :)
>
>    As a good beginner, I decided to employ REQ(PIs)/REP(Linux) for a
> start. My backend(SQLite because I need subsecond replies) is not
> multithread-friendly for write, so I realized I needed to partition some of
> my tables in order to handle more requests.
>
>    I digged the manual after some example of a topology that fits my
> problem, but could not find nothing. I will try to explain it bellow:
>
>    Client 1 -->            --> Backend X
>    Client 2 --> Router --> Backend Y
>    Client 3 -->            --> Backend Z
>
>    The idea here is Client 1 always talk with Backend X(2 w/ Y, 3 w/ Z and
> so on...) but everything is connected through this "intelligent" Router in
> the middle. This Router reads a header in the package that provides the
> "stick" between a client and a backend. This is very analogue to the
> concept of "sticky sessions" between a browser and a application server.
> For instance I would love to have something like a zmq_proxy() with some
> sort of "stickness" on it.
>
>    Any good soul willing to point me a sample of code(or a similar zmq
> solution) to this Router I'm in need?
>
>    Thank you so much, have a nice week!
>
> Rgrds,
> JV -- julioviegas.com
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to