|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Question about design and performance |
« View previous topic :: View next topic » |
Author |
Message
|
jef |
Posted: Tue Aug 31, 2004 2:19 pm Post subject: Question about design and performance |
|
|
Newbie
Joined: 31 Aug 2004 Posts: 1
|
Hy,
I have to build an Unix based application ( written in C++ or Java) that will use MQ to communicate with other parts of the whole system.
What's the best programming language to use ? C++ or Java. Which one provides the best integration with MQ products ?
Second question ! : Is it better to define 1 queue to hold 10 types of messages or to declare 1 queue for each type of message.
What's the better solution in terms of performance.
Thanks a lot. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 31, 2004 4:33 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Which language is better depends on which language is better for you.
It is, however, a better design to design multiple queues for multiple logical types of message.
Whether or not you need one queue for each type of message depends a bit on the messages. If you've got ten flavors of product order message... you might only need one queue. If, on the other hand, you've got three flavors of order message and three flavors of purchase message, and four flavors of employee message, then you could use three queues.
Performance is something that you need to strongly understand the business case for, and the business parameters for, before you start to jump through hoops to squeeze out every last little nanosecond of time. If you're processing 1000 messages a day, it's not going to matter if your program takes ten seconds or five minutes to process a message.
Likely, Java and C++ are going to be equivalent, performancewise, for most business scenarios - with modern hardware and up to date software, and assuming that major programming mistakes aren't made. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Aug 31, 2004 4:36 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
What's the best programming language to use ? C++ or Java.
|
Which one are you better at? FORTRAN could be the best language in the world, but if you or your company can't support it....
Java performs slowly compared to C++.
Quote: |
Which one provides the best integration with MQ products ?
|
Both provide the same access to the MQ API. At the current version of MQ, Java cannot take advantage of Client Channel Tables if your app is going to be an MQClient. But you can easily enough code that same functionality.
Quote: |
Second question ! : Is it better to define 1 queue to hold 10 types of messages or to declare 1 queue for each type of message.
What's the better solution in terms of performance.
|
It depends.
Opening and closing a queue is much more CPU intensive than putting and getting messages. Do MQGETs for a particular message when the queue has lots and lots of other messages to sort through is slower than if the app just gets any and all messages from its specific queue.
Where do you want the sorting to take place? On the sending app, that needs to know which queue to put to, or on the receiving app, that needs to sort out all the messages piled up in one queue? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|