Event emitters are synchronous, are they not?

Anyways, it's up to you whether you want to support async req/rep, but that
is not documented anywhere, and it breaks the principle of least-surprise.

I would just suggest not using a callback-mechanism for req/rep socket.
Have the handler just return a value, which is sent as the reply.


On Fri, Feb 8, 2013 at 10:31 AM, Michael Schoonmaker <
[email protected]> wrote:

> My apologies. I'll add that to my list of requirements to test for.
>
> Thanks for the feedback!
>
> On Fri, Feb 8, 2013 at 10:28 AM, Ruben Tan <[email protected]> wrote:
> > No, i think what jacob meant was that the req rep implementation in the
> > nodejs binding was flawed since it uses the event emitter to poll when it
> > should be sync instead.
> >
> >
> > On Saturday, February 9, 2013, Michael Schoonmaker wrote:
> >>
> >> Jacob,
> >> I won't be changing the existing ZeroMQ semantics. REQ and REP require
> >> synchronicity because of the way they're designed. If you want
> >> asynchronous request/reply, check out DEALER and ROUTER. They're
> >> harder to work with, but much more powerful. Shuttle is built entirely
> >> with these two socket types.
> >>
> >> I agree that REQ and REP are inappropriate for a lot of Node
> >> processes, but they're preferred for a lot of synchronous, high-work
> >> applications, especially on the "worker" end.
> >>
> >> -Schoon
> >>
> >> On Fri, Feb 8, 2013 at 10:04 AM, Ruben Tan <[email protected]> wrote:
> >> > Yes. Please dont impose js idioms upon zmq. If anything, a simple
> >> > binding
> >> > even if it is synchronous would be far easier to work with.
> >> >
> >> >
> >> > On Saturday, February 9, 2013, Jacob Groundwater wrote:
> >> >>
> >> >> If you can, the request/reply socket is broken for any asynchronous
> >> >> events, as ZMQ expects replies to occur in the order they were asked.
> >> >>
> >> >> --
> >> >> --
> >> >> Job Board: http://jobs.nodejs.org/
> >> >> Posting guidelines:
> >> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups "nodejs" group.
> >> >> To post to this group, send email to [email protected]
> >> >> To unsubscribe from this group, send email to
> >> >> [email protected]
> >> >> For more options, visit this group at
> >> >> http://groups.google.com/group/nodejs?hl=en?hl=en
> >> >>
> >> >> ---
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups
> >> >> "nodejs" group.
> >> >> To unsubscribe from this group and stop receiving emails from it,
> send
> >> >> an
> >> >> email to [email protected].
> >> >> For more options, visit https://groups.google.com/groups/opt_out.
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Ruben Tan Long Zheng
> >> >
> >> > "Certified Redundant Amnestic Professional (CRAP)"
> >> >
> >> > --
> >> > --
> >> > Job Board: http://jobs.nodejs.org/
> >> > Posting guidelines:
> >> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >> > You received this message because you are subscribed to the Google
> >> > Groups "nodejs" group.
> >> > To post to this group, send email to [email protected]
> >> > To unsubscribe from this group, send email to
> >> > [email protected]
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/nodejs?hl=en?hl=en
> >> >
> >> > ---
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "nodejs" group.
> >> > To unsubscribe from this group and stop receiving emails from it, send
> >> > an
> >> > email to [email protected].
> >> > For more options, visit https://groups.google.com/groups/opt_out.
> >> >
> >> >
> >>
> >> --
> >> --
> >> Job Board: http://jobs.nodejs.org/
> >> Posting guidelines:
> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >> You received this message because you are subscribed to the Google
> >> Groups "nodejs" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >> http://groups.google.com/group/nodejs?hl=en?hl=en
> >>
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups
> >> "nodejs" group.
> >> To unsub
> >
> >
> >
> > --
> > Ruben Tan Long Zheng
> >
> > "Certified Redundant Amnestic Professional (CRAP)"
> >
> > --
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to