Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do concurrent between different servers

 
Kai Shen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to implements a producer and consumer pattern between different servers (windows boxes). Where is the best place to store the queue? So, the queue can be enqueued from any different servers and dequeued from any different servers as well. The current system is using Oracle Advanced Queue. Is there any better way to achieve this?

Many thanks,

Kai
 
Kai Shen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can somebody help please?

many thanks,

Kai
 
Stephan van Hulst
Bartender
Pie
Posts: 5905
63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should at least have a queue with the consumer. It will have one thread that reads data from the sender, and puts it in the queue (it's essentially a local producer) while the second thread takes data from the queue and processes it (local consumer).

The sender can query the receiver for the amount of empty places in the queue, and send that many entries before it queries again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic