Author |
Message
|
zpat |
Posted: Thu Jul 26, 2012 11:09 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5867 Location: UK
|
Get real. It's not a big issue, unless you try hard to make it one - if you have a single producer and a single consumer, which is a very common model.
It's never been an issue if you follow the (IBM stated) rules that I quoted.
You can't always use grouping because you don't always know what is coming next. Someone could buy some shares and then decide to sell them - the buy has to arrive before the sell, but you don't know that there will be a sell at the time the buy is sent. Each trade has to be atomic - but arrive in the same order they were sent. Not unusual and MQ works fine. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 26, 2012 12:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
zpat wrote: |
Get real. It's not a big issue, unless you try hard to make it one - if you have a single producer and a single consumer, which is a very common model.
It's never been an issue if you follow the (IBM stated) rules that I quoted.
You can't always use grouping because you don't always know what is coming next. Someone could buy some shares and then decide to sell them - the buy has to arrive before the sell, but you don't know that there will be a sell at the time the buy is sent. Each trade has to be atomic - but arrive in the same order they were sent. Not unusual and MQ works fine. |
Trading is a bad analogy.
There is a reason why there is trading and settlement. During trading all that is checked is the pricepoint at which the biggest amount of shares can be exchanged...
You can buy and sell and it won't matter which one comes first because you will settle after the period in time... That's when you will either receive or have to produce the net difference of shares...
This is the whole concept behind money markets and leverage... If you deal right you will never have to produce or receive any real currency / share / fund equity... all you ever get is receive or pay the spread on the buy vs sell price.... Not that this spread can't wipe you out... ( ) _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 26, 2012 3:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Get real. It's not a big issue, unless you try hard to make it one - if you have a single producer and a single consumer, which is a very common model. |
I'm already real, if only on a technicality.
Clearly we have very different experiences. I've almost never had a single producer & consumer, at the minimum there's been a threading model in use to increase throughput.
zpat wrote: |
You can't always use grouping because you don't always know what is coming next. Someone could buy some shares and then decide to sell them - the buy has to arrive before the sell, but you don't know that there will be a sell at the time the buy is sent. Each trade has to be atomic - but arrive in the same order they were sent. |
No they don't. It's the time of the trade that matters and resolution occurs at settlement. I could (if not under an NDA) mention a previous client who's a very large US financial organization that doesn't give a **** in what order the orders arrive, and were way, way past a single consumer / producer to deal with the volume. The key was that trades were registered as close as possible to the pricepoint (because the movement between price at trade and price at market is the broker's risk) but order was not significant.
The same is true for the UK trading organisations I've worked for. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Jul 26, 2012 10:34 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5867 Location: UK
|
I was using trades as an example. We do have a requirement for sequencing (for whatever reason). MQ does the job.
You can of course, add sequence numbers into the messages and do all sorts of other things on top of basic MQ if so desired.
There is a conflict between sequencing and parallel processing. This can be overcome (if desired) by creating several sequential streams into different queues, ensuring all the messages for a given customer (or item etc) are placed in the same queue.
For example you could use the first letter of the surname (where the messages are related to customers) to keep messages relating to the same customer in the same queue.
Not sure why you guys are so OCD about this. Jeff said it was always wrong to rely on sequencing and clearly that is not the case. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 27, 2012 2:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Not sure why you guys are so OCD about this. Jeff said it was always wrong to rely on sequencing and clearly that is not the case. |
My 2 cents:
It's always wrong to rely on sequencing where you've taken no affirmative action within the system to enforce it, but are just relying on conditions being right.
It's always wrong to have affinity, where the entire stream of messages must be in sequence.
It's your choice how you set up any given WMQ topology (where "you" is whoever's reading this thread 5 minutes or 5 years from now) because you're the one who'll be woken at 3am / interrogated by management / burnt alive by shareholders if it fails.
So weigh up the opinions, the advice, the documentation, make a decision & go in peace. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Jul 27, 2012 4:03 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5867 Location: UK
|
It's not wrong to rely on the documented behaviour of WMQ. That's what it's there for, to take away many of the burdens that application to application communication would otherwise involve.
Yes, it's possible to screw that up, just as it is possible to screw any aspect of IT up. But don't try and tell me that it doesn't work, I have been using MQ sequencing without problems for 15+ years and billions of messages. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 27, 2012 5:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
zpat wrote: |
It's not wrong to rely on the documented behaviour of WMQ. That's what it's there for, to take away many of the burdens that application to application communication would otherwise involve.
Yes, it's possible to screw that up, just as it is possible to screw any aspect of IT up. But don't try and tell me that it doesn't work, I have been using MQ sequencing without problems for 15+ years and billions of messages. |
What we are telling you is that relying on it to work without constantly enforcing the conditions for it to work, is a fool's errand  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jul 27, 2012 6:00 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9475 Location: US: west coast, almost. Otherwise, enroute.
|
My .02USD and FWIW, most of the 'MQ is losing my messages' cries from clients have been answered with the 'sequential retrieval' quote (a few replies back).
In development, little/no attention was paid to this subject. Later, as apps (or topology) were modified/enhanced, little/no attention was paid to this subject.
Something as simple as a developer who chooses to make his/her messages a different priority causes apps to misbehave or fail outright.
WMQ is complicated (read: flexible). The sequential retrieval rules are complicated (onerous?) BUT well-documented.
If I had one of those farthing things for every time a developer told me they hadn't read the 'sequential retrieval' doc ... _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jul 27, 2012 6:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I have several times had issues implementing valuable MQ network configurations in order to continue to accomodate ONE application sending messages to ONE other application in an order-dependent stream. |
|
Back to top |
|
 |
zpat |
Posted: Fri Jul 27, 2012 6:31 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5867 Location: UK
|
I am not saying that extra application level sequence checking isn't a good idea.
I am just correcting Jeff's blanket statement that it is always wrong to rely on what is a documented behaviour of MQ.
To me, wrong means never do it, rather than it is not best practice.
It may have some disadvantages in relatively complex network scenarios but in any case - applications are almost certain to already rely on it at many (or even most sites)- no matter what the expert viewpoint may or may not be. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jul 27, 2012 6:56 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9475 Location: US: west coast, almost. Otherwise, enroute.
|
My therapist wife reminds me that right and wrong are choices; and that we must live with the outcomes from those choices.
Always and never are guidelines, which I sometimes follow. Best-practices are guidelines, too.
One of my clients insisted on non-persistent messages for cash flows. I tried (a maximum of twice only) to persuade them otherwise, but they chose n-p for reasons that met their requirements. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|