[concurrency-interest] Effort to create a Blocking Queue between Java processes

Stanimir Simeonoff stanimir at riflexo.com
Wed Feb 6 17:12:24 EST 2013


AFAIK Events are racy on windows. On windows it's possible to use standard
PostMessage as well (but needs window handle).
You do have pipes and sockets on *NIX. Technically you can use OS events
but that may not be fast hand off.
You can use busy spin for xxx time and then fall back on standard
inter-process communication (i.e. sockets). This is why I said
"challenging".


Stanimir

On Wed, Feb 6, 2013 at 11:54 PM, Nathan Reynolds <nathan.reynolds at oracle.com
> wrote:

>  If Process A adds to the queue, how does it wake up a thread in Process
> B?  On Windows, you could do this with a named Event.  Both Processes have
> to agree upon a name when creating the event.  They could then signal the
> event and wake up threads.  I am not sure if other OS's have the ability.
>
> Nathan Reynolds<http://psr.us.oracle.com/wiki/index.php/User:Nathan_Reynolds>| Architect |
> 602.333.9091
> Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology
>  On 2/6/2013 2:46 PM, javamann at cox.net wrote:
>
> I was looking at solutions that used MMap but the problem is the coordination between the processes. I would really like the situation where the consuming thread would block until there was data available vs. polling. This would be really cool if it was part of the JVM.
>
> Thanks
>
> -Pete
>
> ---- Adam Browning <adbrowning at gmail.com> <adbrowning at gmail.com> wrote:
>
> =============
> If you're looking for shared memory between processes, you could set
> up something with mmap (assuming you control both sides of the
> communication). It probably wouldn't be as fast as the shared memory
> of threads, but I suspect that it'd probably be faster than going
> through the TCP/IP stack.
>
> Adam
>
> On Wed, Feb 6, 2013 at 3:25 PM,  <javamann at cox.net> <javamann at cox.net> wrote:
>
>  It appears Hazelcast is using IP, I was more interested in using Shared Memory.
>
> Thanks though, I didn't know about Hazelcast before.
>
> -Pete
>
> ---- Daniel Yokomizo <daniel.yokomizo at gmail.com> <daniel.yokomizo at gmail.com> wrote:
>
> =============
> Hi,
>
> Hazelcast offers a distributed BlockingQueue implementation. You can
> check with them to see if they have effort records.
> http://www.hazelcast.com/docs/2.5/manual/single_html/#Queue
>
> Daniel Yokomizo.
>
> On Wed, Feb 6, 2013 at 5:39 PM,  <javamann at cox.net> <javamann at cox.net> wrote:
>
>  Hi all,
>     Sorry if this isn't the place to ask this but I was wondering what would be the amount of effort to create a framework where you can create a Blocking Queue type structure between two (or more) Java Processes?
>
> Thanks
>
> -Pete
> _______________________________________________
> Concurrency-interest mailing listConcurrency-interest at cs.oswego.eduhttp://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>  --
>
> 1. If a man is standing in the middle of the forest talking, and there is no woman around to hear him, is he still wrong?
>
> 2. Behind every great woman... Is a man checking out her ass
>
> 3. I am not a member of any organized political party. I am a Democrat.*
>
> 4. Diplomacy is the art of saying "Nice doggie" until you can find a rock.*
>
> 5. A process is what you need when all your good people have left.
>
>
> *Will Rogers
>
>
> _______________________________________________
> Concurrency-interest mailing listConcurrency-interest at cs.oswego.eduhttp://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>  --
>
> 1. If a man is standing in the middle of the forest talking, and there is no woman around to hear him, is he still wrong?
>
> 2. Behind every great woman... Is a man checking out her ass
>
> 3. I am not a member of any organized political party. I am a Democrat.*
>
> 4. Diplomacy is the art of saying "Nice doggie" until you can find a rock.*
>
> 5. A process is what you need when all your good people have left.
>
>
> *Will Rogers
>
>
> _______________________________________________
> Concurrency-interest mailing listConcurrency-interest at cs.oswego.eduhttp://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20130207/e1c1f4e6/attachment.html>


More information about the Concurrency-interest mailing list