Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

web service queuing  RSS feed

 
Nikkos Nikou
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write java web services under axis and tomcat.

I want to maintain two queues for the incoming requests to a web service, so as
to be able to decide what to do in my web service depending on which of the two queues holds a request to it.

Any ideas on how to implement the two queues?
Help appreciated.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why dont you define your problem as two different web services with one common back-end processing function?

Let the container do the request queue upkeep.

Bill
 
Vyas Sanzgiri
Ranch Hand
Posts: 686
Chrome Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you thought about ESB?
 
Nikkos Nikou
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:Why dont you define your problem as two different web services with one common back-end processing function?

Bill


You mean each of the two services represents one of the two queues? Or maybe i did not understand
exactly hat you mean.
 
Nikkos Nikou
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vyas Sanzgiri wrote:Have you thought about ESB?


I am not familiar with the term. I am searching on it.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean each of the two services represents one of the two queues?


Yes

Exactly why do you want two queues if there is not some difference justifying two services?

Bill
 
Nikkos Nikou
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
You mean each of the two services represents one of the two queues?

Exactly why do you want two queues if there is not some difference justifying two services?


Ok my mistake. I did not make it clear from the beggining.
I want my services to have different priorities, let's say low and high.
That's why i need to maintain one queue for the low and one for the high.(but don't know how to implement them)
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikkos Nikou wrote:
Vyas Sanzgiri wrote:Have you thought about ESB?


I am not familiar with the term. I am searching on it.


Did you try searching for MQ Broker.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want my services to have different priorities, let's say low and high.


I would handle this with two services talking to a common back-end that does the actual work. You could handle the priority simply by giving the request Thread in one service a lower priority and let the JVM handle deciding which gets CPU time.

Bill
 
Nikkos Nikou
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:

Yes, i actually thought of giving each service - Thread a particular priority.
For example if low priority service i set the currentThread priority to 1, if hi to 10.
I believe that it works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!