This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Scalability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Scalability" Watch "Scalability" New topic
Author

Scalability

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
Hiya,

here is an interesting topic :-)

i'm developing an application that has a sender and a listener, but there could be multiple listeners, and there could be millions of users, how best to design the system for scalability using JMS and databases? any ideas or links?

:-)

Niall
Alok Kushwah
Ranch Hand

Joined: Jul 10, 2007
Posts: 31
Seems like you can implement this using JMS topic destination. Sender can send message to topic and listner can subscribe to listen message published on topic. By this way resposibilty of scalabilty will be trasffred to JMS topic provider or Application server. But while designing system you must decide the quality of service which is realiabilty/persistence which will in turn affect scalabilty of system. JMS implemantation internaly uses DB for persitence.

It would not be good idea to use database for this. You have to design your own notifiaction system to notify the listener in case new message comes. It would be really bad if listener have to poll the database for new messages.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Would those millions of users be "senders" or "listeners"?

As Alok says, I'd leave the storage aspects for the JMS to worry about.


Ping & DNS - updated with new look and Ping home screen widget
Alok Kushwah
Ranch Hand

Joined: Jul 10, 2007
Posts: 31
Multiple sender and multiple reciever can use same JMS topic. For scalability don't allow durable subscription. Which helps in minimize the use of resources at JMS server. So million of reciever will get the message if they are subscribed to topic and connected at the time of message publication. Millions of sender can send/publish messages to the topic, no problem .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scalability
 
Similar Threads
Good or bad in EJB 2.0
Session Bean x Request Bean
Anyone experinced in opensymphony WebWork
JBoss Seam compared to Spring/ Struts based app
Q on common architecture...