ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Discourse \ MQ Dyanmic Queues vs Predefined Queues

Post new topic  Reply to topic
 Discourse \ MQ Dyanmic Queues vs Predefined Queues « View previous topic :: View next topic » 
Author Message
hopsala
PostPosted: Sun Aug 21, 2005 12:58 am    Post subject: Discourse \ MQ Dyanmic Queues vs Predefined Queues Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

(Yes, I know this has been discussed many times in the past, but the world and industry changed since, and possibly I may still have some new ideas to pass. So here goes:)

I'm somewhat old-fashioned in my perception of MQ - I like to have complete control over what's going on; dynamic queues are, since they are automatically created and managed, pretty much out of the admin's hands.

For example, if an application opens a PERMDYN queue, forgets to close it and goes on doing whatever it is it was doing, the queue is "stuck" - the admin has no idea whether it is in use or not; the only way to know is to start going through appl logs of all clients, which are usually either unavailable or problematic to access (say, in large number of clients).
Plus there's the security issue, you cannot give specific access to specific temp queues, because you do not know their name in advance. the only way to solve this is give permissions to the modelq, and open a q called BIGAPPL.SMALLAPPL.* where BIGAPPL is the name of the entire structure and SMALLAPPL is the name of that specific client; then you give permissions to each and every dyanamicq in advance, before it is created.
Thing is, this entirely misses out on one of the main points of dynamic queues - they should be used when you do not know in advance who your clients are, and how many are there. Also, in every possible scenario, you'll have to give permissions to the queue of the receiving appl.

Even in such cases, in which you don't know who your clients are, usually I won't use dynamic queues. The client appls have to know in advance the name of the modelq anyway, so there's no difference between that or knowing a name of a q for all clients.
And as for many appls using one queue, why not? use corrlid/msgid and index queue by it. I know there are "performance issues" but usually the machines nowadays can take it - it is "wasteful", but if it works so what?

But then you'll say (justly) that there are performance issues. Say you have 500-1000 clients going about putting 1MB msgs per minute each, to such a scenario there's another interesting solution - using a small handshake with the receiving application to determine which q to open.
You create about 1000 qs in advance (max clients to connect) and have the receiving appl answer a new client which queue to open (and even give them permission only on bind!). This gives you better control and a solid log of what's going on, which is a definite plus - though indeed requires some code.

In summary, I think dynamic queues should only be used for dynamic scenarios - unknown clients - but that MQ for such scenarios is simply not a very good solution; It is much easier, and more administratable, to implement pub/sub solutions in webservices or other synchronous protocols, due to what I stated and much more (i've already written too much).
In cases which you have to use mq for pub/sub, I would go with queues created by the receiving application, and would use mqclients. This give the receiving appl absolute control over subscription queues, and permits such things as deleting publications if needed.

In final summary, I don't believe in MQ for client-end solutions at all, and all this is one of the reasons why. Clients should be HTTP, like every new project is nowadays, only the backend - the skeleton - of the network should be MQ.

Well, got a little carried away there didn't I? Sorry. In any event, this is my general opinion of the subject, but I would appreciate feedback
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Aug 21, 2005 7:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The main attraction for me (this engages only me as a person) is the request reply scenario.

Imagine a website with x many clients and performance needs. Going through a filling static reply to queue can be a performance hog specially if you are doing some weird things in JMS and not passing the correlation Id in native mode ("ID:0x.....") or adding other criteria to the message selector...(this will really kill your performance on a non thread dedicated reply to queue).

Having each instance create it's own reply to queue will speed up the delivery of the message. There is a little overhead but as the WAS dips into a pool of dynamic queues to create it's own I deem it worth the risk.

You have thread separation on the reply's speed up the get as you don't have to "walk" as much of the queue to get to the right correlation id.

If forgotten clean up is automatic when the jvm closes. Remember we are not talking about persistent messages here. There should be an expiration delay on the responses received by the dynamic queue.

So Yes it has its advantages.
If we are talking about a perm dynamic queue I would rather it be created in advance by the MQ Admin...

Back to top
View user's profile Send private message Send e-mail
hopsala
PostPosted: Wed Aug 24, 2005 12:03 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

fjb_sapper wrote:
WAS dips into a pool of dynamic queues to create it's own I deem it worth the risk.

Does it? I was not aware of this - I assume you mean WAS creates about a 100 temp dynam queues and leaves them open, pooling between them, and when the 101th consecutive client logs in creates about 20 more etc, continuosly pooling and managing the number of queues?
If so then i'm impressed, it is just what I recently suggested in a design session for a similar scenario (as they don't use WAS we had to write an algorithm for pooling). Does this exist in other application and web servers? (say IIS?)
And another question, if I may - is this queue pool completely configurable? For example: can you tell it with how many queues to start, how many to add each time the max is exceeded, whether to decrease queue number upon less clients...?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 24, 2005 2:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Sorry but for that you would have to read the WAS manuals.
By the way a good one to look up is JMS Topology. Check it out on IBM's web site (or search my posts for a link to it.)

Enjoy
Back to top
View user's profile Send private message Send e-mail
hopsala
PostPosted: Wed Aug 24, 2005 3:58 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

You're right to defer my questions to the WAS manuals, I fell right into that newbie trap Apologies...

However, the following remains a valid question:

hopsala wrote:
Does this (dynamic queue pooling) exist in other application and web servers?
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Aug 24, 2005 6:08 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

hopsala,
Go look on the QUEUES dir of any QM, you will see some q files with names containing GHOST. Those are dynamic queues, not even born yet, ready to spring into action. This is new as 5.3 specifically for performance reasons.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
hopsala
PostPosted: Wed Aug 24, 2005 7:50 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

Hm, just did some testing on these GHOST thingies:

These GHOSTS are indeed dynamic queues, but are only there if anyone ever opened a dynamic queue in the past. If you create a qm through Explorer, you'll indeed find one, but that's just because the explorer creates a dynamic replyq to get responses from the command server. If you create by using "crtmqm" there are no GHOSTS at first start.

Now, admittadly if you open a temp-dynam-q and close it, the ghost remains, so that next time a dynamq is opened the ghost is reused, and there is no need to create another file. So to offer a slight correction to what you said - these are not unborn queues, but queues that were born and died, and are waiting for reincarnation (or nirvana, if they forgo the illusion of their MQish existence and accept their true buddha nature )
Also, these ghosts are never (so it seems at first glance) deleted, and remain there after QM restart - which is a good idea, since it is probable that if the qm had 100 temp qs open before shutdown, they will be there after it starts.
(btw, GHOST file usage is managed in a file called QMQMOBJCAT, if you're into mq internals)

All this is nice, but it isn't pooling.
A pooling algorithm would create several queues in advance, if they are exceeded will not create additionals one by one, but a few each time, and if for a long time most queues are unused will delete some. In addition to qualify as a serious queue pool it should be completely configurable.

So I repeat the question - are there any products out there supporting dynamic queue pooling?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Discourse \ MQ Dyanmic Queues vs Predefined Queues
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.