>   I have a feeling there is a better way.

While there are many roads, I think the king would be quite happy to ride
yours.

On Wed, Jun 13, 2012 at 7:49 AM, Oren ZBM <[email protected]> wrote:

> Hi all,
>
> I wonder what is the king's road for implementing the following.
>
> Web/API server receiving many requests, all need to be handled by yet
> another process, so some distributed queue, or just TCP/IP mechanism
> should be used. When the other process is done and the reply returns
> to node.js . How to "wake" the right context (callback) and return the
> result to the right client?
>
> I guess mongodb driver is doing something similar, even if I use the
> same driver object, still every concurrent HTTP request gets its own
> results sets (from mongodb) for its own query.
>
> My brute force idea is to create temporary queues for single use, per
> request/reply. One queue for requests, in which each item will be the
> request, and the id of the temporary reply queue. This shoukd work,
> yet I have a feeling there is a better way.
>
> I may end up looking at mongodb driver's implementation...
>
>
> With kind regards,
> Oren
> --
>
> --
> 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
>

-- 
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

Reply via email to