To answer your question, because Redis responds to requests in the
order in which they were received (especially from a single given
connection), you can simply issue the commands sequentially with your
sending thread, adding a process identifier to a queue. Your receiving
thread would then just read responses from Redis, popping process
identifiers from the queue as necessary, and sending the response to
the process identifier related to the received response.
That said... I suspect that Redis would do at least as well at
handling this as any solution you would come up with. Not because I
don't think you are good, but because Redis has been optimized for
what it does, and you'd not only have to implement a high-speed socket
server and client in the same process, but you'd also have to
implement the Redis protocol or some other protocol on top of just the
socket client and server.
That said, have you tested Redis and determined that it isn't fast enough?
Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.
>
Thank you.
-m