Author |
Message
|
w |
Posted: Fri Nov 18, 2011 8:59 am Post subject: Does Propagate statement effect flow efficiency? |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
Hi,
I have designed a flow in which I have used Propagate statement to tranfer execeution control to a subflow .After the execeution of the subflow the execution control comes back to the compute node and further processing is done.
I want to know whether making such a detour using propagate statement is highly inefficient or not compared to when the subflow logic is implemented in the same flow itself.
 |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Nov 18, 2011 9:06 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
The answer is no, the efficiency is the same either way.
You can prove it out by implementing both ways and performance test. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Nov 18, 2011 9:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you want to compare the performance of two options, then code both options and run performance tests and then compare the results.
If you are confused about this topic in particular, you need to spend more time reviewing the documentation on exactly what Propagate does and how subflows are built and deployed. Your question shows that you are lacking understanding in this area. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 18, 2011 9:15 am Post subject: Re: Does Propagate statement effect flow efficiency? |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
w wrote: |
Hi,
I have designed a flow in which I have used Propagate statement to tranfer execution control to a subflow .After the execution of the subflow the execution control comes back to the compute node and further processing is done.
I want to know whether making such a detour using propagate statement is highly inefficient or not compared to when the subflow logic is implemented in the same flow itself.
 |
Your set up of the subflow shows your lack of understanding of the model and what it does. It is not intended to work the way you use it, and the results you get may not be what you expect. A subflow was never meant to be a call-out from another node. For that you'd have procedures (/methods) and functions
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
w |
Posted: Fri Nov 18, 2011 9:16 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
My understanding of Propagate is that it basically starts another thread.Is this correct?
Why I thought it might effect performance was that When we propagate the current flow status is saved internally and after propagate finishes the saved state is again retrieved.From your suggestions it seems it does'nt effect performance in a big way.
Thanks. |
|
Back to top |
|
 |
w |
Posted: Fri Nov 18, 2011 9:18 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
@fjb_saper
subflow is for logging and statistics gathering.In that case it is best called from a compute node. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 18, 2011 9:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
w wrote: |
My understanding of Propagate is that it basically starts another thread.Is this correct? |
No.
w wrote: |
Why I thought it might effect performance was that When we propagate the current flow status is saved internally and after propagate finishes the saved state is again retrieved.From your suggestions it seems it does'nt effect performance in a big way. |
That's because it's not doing what you think it's doing. Or working the way you think it's working.
The same way subflows are not what you seem to think they are. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
w |
Posted: Fri Nov 18, 2011 9:26 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
@Vitor
Can you please post a link or explain how propagate is executed internally . |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 18, 2011 9:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Statistics gathering is done in a complete different way and is a publication done by the broker to a $SYS/.... topic.
Logging can be done at the input/ output node level. Check out the manuals in the infocenter and GET Training.
WMB is not a product you can just pickup as if it were another flavor of Java.
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
w |
Posted: Fri Nov 18, 2011 9:39 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
fjb_saper wrote: |
Statistics gathering is done in a complete different way and is a publication done by the broker to a $SYS/.... topic.
Logging can be done at the input/ output node level. Check out the manuals in the infocenter and GET Training.
WMB is not a product you can just pickup as if it were another flavor of Java.
 |
Ok .Here is the requirement see if u can do this without the subflow.
1> The Buisness logic and the logging and statistics gathering logic should be seperate.
2>A file may have to be written to the file system depending on a external variable at various point in the flow.
Now if you try and achieve the above requirements without a subflow .You will end up cluttering the flow with a lot of file nodes....So this is why I have used a subflow.
Make sure u know the entire situation before dismissing others as Novice.Arrogance is not a virtue.
Last edited by w on Fri Nov 18, 2011 9:42 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 18, 2011 9:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
w wrote: |
Can you please post a link or explain how propagate is executed internally . |
Propagate is explained here. All it does is allow you to control:
a) When a message tree is handed off to the next node in a flow
b) The route it takes (i.e. other than the out terminal)
You might also want to review this, which starts off with:
Quote: |
You can include subflows in your message flows in exactly the same way as you include built-in or user-defined nodes. You can also connect subflows to other nodes in the same way |
So the "subflow" is not another thread, or any other kind of artifact except a reusible set of nodes executed in line with your main flow. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 18, 2011 9:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Statistics gathering is done in a complete different way and is a publication done by the broker to a $SYS/.... topic.  |
Writing code to capture this information is reinventing the wheel.
fjb_saper wrote: |
Logging can be done at the input/ output node level. |
See above
fjb_saper wrote: |
Check out the manuals in the infocenter and GET Training.
WMB is not a product you can just pickup as if it were another flavor of Java. |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 18, 2011 9:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
w wrote: |
Ok .Here is the requirement see if u can do this without the subflow. |
I'm looking at an implementation of both of your requirements that doesn't use subflows.
w wrote: |
Now if you try and achieve the above requirements without a subflow .You will end up cluttering the flow with a lot of file nodes |
No you won't.
w wrote: |
Make sure u know the entire situation before dismissing others as Novice. |
I never said "novice". I said you didn't understand how the propagate statement or subflows work. The answer to a lack of understanding is training.
w wrote: |
Arrogance is not a virtue. |
No, it's a hobby. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 18, 2011 9:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
My bad for assuming you to be on version 7. You never mentioned the version. Since version 7 you have specific logging capabilities at the node level...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 18, 2011 9:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
My bad for assuming you to be on version 7. You never mentioned the version. Since version 7 you have specific logging capabilities at the node level...  |
But v6.1 can still log payload. Just needs a little more dancing. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|