|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Disadvange of using client libraries on server |
« View previous topic :: View next topic » |
Author |
Message
|
MABeatty1978 |
Posted: Thu Dec 18, 2014 7:22 am Post subject: Disadvange of using client libraries on server |
|
|
Acolyte
Joined: 17 Jul 2014 Posts: 54
|
I have a DLL I wrote in C that has functions called by an OpenEdge(Progress) application. The application runs on a primary server, but there are also thin clients mapped to it. There is a QMGR on the primary server that the clients need to send messages to. The program can be run from either the client or the server. This leaves me with the challenge of determining which libraries to use at run time (which I haven't really even tried to figure out yet) or to just abandon the server libraries, recomplie the DLL using only the client libraries and just having both the server and client use the client library.
So what is the disadvantage of the server, the box where the QMGR is located, putting messages compiled with the client libraries? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 18, 2014 7:31 am Post subject: Re: Disadvange of using client libraries on server |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MABeatty1978 wrote: |
So what is the disadvantage of the server, the box where the QMGR is located, putting messages compiled with the client libraries? |
There's a performance hit, as the server bindings make in memory calls to the queue manager and the client bindings use the network. If the client is actually on the same server, it may be possible for the "network" activity to go through the TCP/IP stack in memory rather than "out and back" over the wire.
Some advanced activities (such as XA) are only possible using server bindings or a specific version of the client (which may attract a license depending on version).
On the plus side, using a client connection allows a lot of administrative control over the application, such as enforcing the user id it connects to the queue manager as and forcing it to disconnect if it runs wild. It also makes it very easy to move the application if in future you want to run it on a separate server to the queue manager to split resource load, or indeed run multiple instances of the application on multiple servers to increase throughput. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Dec 18, 2014 7:33 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
If you are handy with a C compiler why not just dynamically load either the client or server library at run time ? Clearly a client application will run slower than a locally bound application so if you dont have to run as a client then I would say don't.
If your clients are all MQ V8 then I believe you can just link with the server library and have MQ do the dynamic switch for you.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
MABeatty1978 |
Posted: Fri Dec 19, 2014 6:22 am Post subject: |
|
|
Acolyte
Joined: 17 Jul 2014 Posts: 54
|
Thank you for the input. I am not aware of how to compile to load libraries at runtime, but I have been reading up on the dlfcn library that enables you to dynamical bind library calls to internal functions which is essentially enabling runtime binding of libraries.
There is a sample program on this site, sunloadmq, http://www.mqseries.net/phpBB2/viewtopic.php?t=39178 that does a pretty good job of showing how to invoke it. It basically requires you to write wrapper functions for the actual MQ calls. I've got most of my DLL rewritten using them and it works nicely. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Dec 19, 2014 7:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MA7K also dynamically loads the MQ dll at runtime, and it ships with source. |
|
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
|
|
|
|