Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router-dealer implementation #147

Closed
duskyzaoKING opened this issue Jan 29, 2016 · 3 comments
Closed

router-dealer implementation #147

duskyzaoKING opened this issue Jan 29, 2016 · 3 comments

Comments

@duskyzaoKING
Copy link

Hi, i'm searching a API to handle messages by two node apps, and i found zeromq and maked some tests with the req/rep pattern using async with multiples clients and multiples workers, using the pattern router-dealer of zeromq with async! can i implement the router-dealer in node-nanomsg with multiples clients making multiples requests via req/rep with load balance ? Thanks and sorry for my english!

@zenlor
Copy link

zenlor commented Jan 29, 2016

This is what you are looking for: https://github.com/nickdesaulniers/node-nanomsg/blob/master/examples/pipeline.js

Push and pull sockets. The push socket will be your server sending data to the connected pull sockets using round robin.

You may want to ping your clients connecting them to a surveyor socket which will then ping clients collecting answers enumerating the connected clients.

@duskyzaoKING
Copy link
Author

Hi! Ty for the fast answer! But in pattern of PULL/PUSH is one directional, correct? I need a REQ/REP, where my client sent a message to a worker execute a process and the worker need to reply the message to my client with a message! With the pipeline example is it possible ?

@reqshark
Copy link
Collaborator

sounds like a good use case for nn_device, see #145 and #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants