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 » IBM MQ Java / JMS » Application compression Vs MQ Compression

Post new topic  Reply to topic
 Application compression Vs MQ Compression « View previous topic :: View next topic » 
Author Message
dpkmq
PostPosted: Thu May 17, 2007 7:03 am    Post subject: Application compression Vs MQ Compression Reply with quote

Newbie

Joined: 17 May 2007
Posts: 5

What is the best design to compress messages . Is it better to be done at the application end or at the mq channel ?

If using compression in the application , what is the best method . I see java mq api allows compression . Is similar api is available with JMS to compress and send the data ? What are the other options ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 17, 2007 8:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What is the goal of the compression? What are the requirements?

These drive the design.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dpkmq
PostPosted: Thu May 17, 2007 10:05 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2007
Posts: 5

The requirement is to send large amount of a data from a java application to another java application through MQ . The no of messages are very high and each message is very big. The Java application is connecting to mq in client mode. What is the best design to achieve maximum performance.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu May 17, 2007 10:17 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

dpkmq wrote:
The requirement is to send large amount of a data from a java application to another java application through MQ . The no of messages are very high and each message is very big. The Java application is connecting to mq in client mode. What is the best design to achieve maximum performance.



Simple answer is use always compression because sent data is smaller.

But how about compression process ?

Processor will have to do compression.
As you mentioned your messages are very big, so it will take time and your resources.

We don't know your architecture, network, machines.

I would recommend stress tests.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
dpkmq
PostPosted: Thu May 17, 2007 11:00 am    Post subject: Reply with quote

Newbie

Joined: 17 May 2007
Posts: 5

Thanks Marcin. I know the compression will improve performance on a low network for large messages. I like to know what are the factors to consider to decide between compressing done by java application and that done by MQ.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 17, 2007 11:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The time spent to compress and uncompress may outweigh the gain in the channel communciations.

I don't believe that MQ does compression on client connections.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu May 17, 2007 11:40 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

dpkmq wrote:
Thanks Marcin. I know the compression will improve performance on a low network for large messages. I like to know what are the factors to consider to decide between compressing done by java application and that done by MQ.



It was little digression.

Back to the subject.

In my opinion it is better to let MQ to do it.

But as I mentioned ealier it is better to prepare stress tests.

What you can do ...

A WebSphere MQ base Java application specifies the techniques that can be used for compressing header or message data on a client connection.

In your JAVA app you have to tell QMGR to turn compression (header , data or both) .
If QMGR accepts it during negotiation, compression will be used during communication.


Code:
...
Collection msgComp = new Vector();
msgComp.add(new Integer(MQC.MQCOMPRESS_RLE));
msgComp.add(new Integer(MQC.MQCOMPRESS_ZLIBHIGH));
MQEnvironment.msgCompList = msgComp;
MQQueueManager qMgr = new MQQueueManager(QM);
..


Another this is turning on compression between channels (COMPMSG and COMPHDR channel attribute)
_________________
Marcin


Last edited by marcin.kasinski on Thu May 17, 2007 12:15 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Thu May 17, 2007 11:46 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
The time spent to compress and uncompress may outweigh the gain in the channel communciations.

I don't believe that MQ does compression on client connections.



Exactly.
That's why I recommend stress tests.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Thu May 17, 2007 11:55 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:

I don't believe that MQ does compression on client connections.



Now I'm little confused

Are you sure ?

I think my example above refers to client connection.

Am I right ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu May 17, 2007 12:00 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I didn't think COMPHDR and etc. were valid on SVRCONNS.

I guess I'm wrong.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 17, 2007 5:34 pm    Post subject: Reply with quote

Grand High Poobah

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

jefflowrey wrote:
The time spent to compress and uncompress may outweigh the gain in the channel communciations.

I don't believe that MQ does compression on client connections.

So why are the compression attributes on the SVRCONN channel definition??

Agreed it may only work if you use a channel table....
The standard status display shows compression as none,none when not using the channel table....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dpkmq
PostPosted: Fri May 18, 2007 1:33 pm    Post subject: Reply with quote

Newbie

Joined: 17 May 2007
Posts: 5

Thanks for all inputs.
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 » IBM MQ Java / JMS » Application compression Vs MQ Compression
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.