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

David M. Lloyd david.lloyd at redhat.com
Wed Feb 6 17:05:40 EST 2013


On Linux you could use futexes or semaphores (the latter being POSIX and 
so available in lots of other places too), though you're all JNI at that 
point.

Perhaps better would be if the JDK implemented AF_LOCAL socket support 
(likely using "named pipes" on Windows which can be full duplex).

On 02/06/2013 03:54 PM, Nathan Reynolds 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>  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>  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>  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>  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 list
>>>> Concurrency-interest at cs.oswego.edu
>>>> http://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 list
>>> Concurrency-interest at cs.oswego.edu
>>> http://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 list
>> Concurrency-interest at cs.oswego.edu
>> http://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
>


-- 
- DML


More information about the Concurrency-interest mailing list