Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JMS vs. Home-grown... Which is better in cluster?

Reply
Thread Tools

JMS vs. Home-grown... Which is better in cluster?

 
 
theRat
Guest
Posts: n/a
 
      01-29-2007
All,

I could really use some help on the following question - I need to
figure out if JMS in a clustered environment is really the solution to
my problem...

I have an application that is deployed to a number of servers in a
jboss cluster. I also have a bunch of clients that are writing to a
jms queue in the cluster - they are writing (producing) these messages
very quickly. My understanding is that in a jboss cluster, the queue
isn't really replicated (available) across all servers in the cluster
- which means that every client (producer) gets its jms "message"
piped to a *single* server in the cluster. Is that correct?

My understanding is that if the "designated" jms server goes down,
another node in the cluster will "take its place". Is that correct? If
this is correct it means that as I scale up the number of clients
(producers), they are all going to be trying to communicate with the
one *single* designated jms node. Is that correct?

It seems to me I'd be better off by creating a servlet in my
application that is replicated across all nodes in the cluster - and
this servlet puts the messages into a db table (directly or through
hibernate, etc). This is what JBoss JMS does under the covers
*anyway*, isn't it? It's how JBoss makes the messages persistent,
right?

Then I could have another servlet deployed on *another* cluster of
servers. These servlets would "poll" the db where the messages were
written (by the nodes in another cluster), attempt to mark them as
"consumed" in the db and return them to the caller (consumer) if they
are the one that "got the message". I realize that polling isn't the
greatest solution in the world - but we can always add more nodes to
the "read" cluster and space the polling...

Wouldn't something like this scale better than JBoss JMS clustering?
Why not? It seems like JBoss's JMS solution is great for failover -
but that it just doesn't scale...

Please show me the error of my ways...

Thanks very much!

-john

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      01-30-2007
theRat wrote:

> Wouldn't something like this scale better than JBoss JMS clustering?
> Why not? It seems like JBoss's JMS solution is great for failover -
> but that it just doesn't scale...


I don't know anything much about JMS or the JBoss implementation, but it seems
odd to me that unordered (but otherwise reliable) message delivery shouldn't be
available as an option. If totally reliable ordering of messages is not
required, then I see no need for such centralised queue handling. Maybe
there's an option you can find to weaken the guarantees provided by JBoss, and
thus allow more replication ?

If not, then one approach would be to have several (a fixed number) of
independent JMS queues (each with failover, etc), and for clients to select a
queue for each message on a more-or-less arbitrary basis. (Randomly, perhaps).

-- chris



 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      01-31-2007
theRat wrote:
> I could really use some help on the following question - I need to
> figure out if JMS in a clustered environment is really the solution to
> my problem...
>
> I have an application that is deployed to a number of servers in a
> jboss cluster. I also have a bunch of clients that are writing to a
> jms queue in the cluster - they are writing (producing) these messages
> very quickly. My understanding is that in a jboss cluster, the queue
> isn't really replicated (available) across all servers in the cluster
> - which means that every client (producer) gets its jms "message"
> piped to a *single* server in the cluster. Is that correct?
>
> My understanding is that if the "designated" jms server goes down,
> another node in the cluster will "take its place". Is that correct? If
> this is correct it means that as I scale up the number of clients
> (producers), they are all going to be trying to communicate with the
> one *single* designated jms node. Is that correct?


????

JMS is an API.

JBoss MQ and JBoss Messaging are two products.

> It seems to me I'd be better off by creating a servlet in my
> application that is replicated across all nodes in the cluster - and
> this servlet puts the messages into a db table (directly or through
> hibernate, etc). This is what JBoss JMS does under the covers
> *anyway*, isn't it? It's how JBoss makes the messages persistent,
> right?
>
> Then I could have another servlet deployed on *another* cluster of
> servers. These servlets would "poll" the db where the messages were
> written (by the nodes in another cluster), attempt to mark them as
> "consumed" in the db and return them to the caller (consumer) if they
> are the one that "got the message". I realize that polling isn't the
> greatest solution in the world - but we can always add more nodes to
> the "read" cluster and space the polling...
>
> Wouldn't something like this scale better than JBoss JMS clustering?
> Why not? It seems like JBoss's JMS solution is great for failover -
> but that it just doesn't scale...


You want scalability ?

Then one thing is for sure: you can forget about *polling* the
database !

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
implementing or using jms or running jms without application server ravinder.ggl@gmail.com Java 0 06-26-2007 10:26 AM
Build a Better Blair (like Build a Better Bush, only better) Kenny Computer Support 0 05-06-2005 04:50 AM
Which JMS implementation Jorge Java 1 01-04-2005 11:08 AM
Which is better: JMS or JMX? DaveB Java 1 10-21-2004 05:45 AM
How to setup JBoss for JMS (not MDB-JMS) ? Thomas Stein Java 0 10-18-2004 09:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57