wood burning stoves 2.0*
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
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: 208
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: 41106
    
  45
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 - my free Android networking tools app
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 .
 
jQuery in Action, 2nd edition
 
subject: Scalability
 
Similar Threads
Anyone experinced in opensymphony WebWork
Good or bad in EJB 2.0
Q on common architecture...
JBoss Seam compared to Spring/ Struts based app
Session Bean x Request Bean