Intracontainer when using process in another container

Posted by sk185050 on 23-May-2010 13:24

Hi,

This is the use case I have:

I have two ESB containers having different USERS (which connect to SONIC MQ). In my case  I am using User1 in  Container 1 and in  container2  I  using User2,

now I have the subprocess (which is resides in Container2) in one of the process of container1.

Problem I am facing is this:

I see the user(i.e User2 conenction) of container2 in my container1 logs, Is this is the problem or this shlould be work like this? I don't know the reason why? Can someone put some input on that?

Is the intracontainer really works in that case (when i am using the sub-process which resides in other container)?

I really welcome the input from all for this discussion.

Thanks

All Replies

Posted by Bill Wood on 24-May-2010 15:08

Intracontainer messaging only happens at the service level.  The service has to be deployed in the same container as the previous step.   When you use subprocesses from inside the ESB, you never go to the entry endpoint of the sub-process and the behavior is identical whether the processes are deployed or not.  If a process is only used as a subprocess, then you never need to assign it an entry endpoint, and never need to deploy it in a container.

If you have two containers (CA and CB), each with servcies S1, S2, and S3, but CA has Process PA and CB has process PB.

If PA does --[S1]---[PB]--[S3]

and PB does --[S2]--[S1]--[S2]

then everything will be run ONLY in CA -- you never go to CB.   You would get the same behavior if PA was: --[S1]--[S2]--[S1]--[S2]--[S3]  -- that is, you only go to services in Container CA.

Posted by sk185050 on 27-May-2010 11:17

Thanks William for your response.  Just curious to know how container CA know that , process PB contains the --[S2]--[S1]--[S2], as PB is running in container CB?

Posted by Bill Wood on 27-May-2010 12:22

sk185050 wrote:

Thanks William for your response.  Just curious to know how container CA know that , process PB contains the --[S2]--[S1]--[S2], as PB is running in container CB?

The only thing that is "deployed" in Container CB is the JMS "Entry" to Process PB.   That is a common misconception -- that deploying a Process deploys the definintion only to that container.

Any ESB Container that sends to a process (directly, or indirectly as a sub-process) has access to the Directory Service and can get the definition of the process.   So in the above example, PA gets to its 2nd step -- PB as a subprocess.   Container A (where the process is executing), goes to the DS and gets the itinerary for PB.  It ignores the Entry, Exit, RME, Fault endpoints, and just gets the itinerary part which sayd -- go to "--[S2]--[S1]--[S2]--".  So the next 'step' is really just going to Service [S2] which happens to be colocated in Container CA.  So that is where it goes.

That is why you never 'need' to deploy a process into an esb container if it is only going to be used as a Sub-Process.

Posted by sk185050 on 28-May-2010 02:58

Hi William,   As  I said I am using different user for containers, that in CA i have U1 and in CB i have user U2, do you think it can cause issue.  What I have seen when I use the tracking i seen the monitor/control goes to the second container, means I sees the container2(CB) when it comes to the sub-process in the tracking.  I am not sure why I am seen CB in tracking, Is it  right ?

Posted by Bill Wood on 28-May-2010 04:31

Different users on the container do no matter -- these are only the management connection so that is what is used on the fetching of information from the Directory Service.   All application messaging used the ESB connection information.   Again, there is no reason that user names for all the application messaging has to match.

On the subject of changing containers -- you have to be going over messaging for this to work.   If a process starts in one container and then goes to another then either you are explicitly going to an endpoint, or you don't have intracontainer on, or a service is not in the first container.

Posted by sk185050 on 28-May-2010 04:42

Thanks William for your valuable information.

What I am doing is I am putting the message in the topic where in  endpoints listening  and entry end point of my process in CB for example other that that i am not doing  explicitly anything.

Yes, the services I am using in the subprocess is in the container 1, that CA, and i think as per your explaination it is fine than.

I got a question in my mind  what if I am using the services which I donot want to deployed in the containerA which may be irrelevant. for example what if i want to use the process that is developed by some other department using other services and I do not want to deployed those services in my container.

Posted by Bill Wood on 28-May-2010 04:58

sk185050 wrote:

...

I got a question in my mind  what if I am using the services which I donot want to deployed in the containerA which may be irrelevant. for example what if i want to use the process that is developed by some other department using other services and I do not want to deployed those services in my container.

This is similar to the example we had before, but where the services are not duplicated

If you have two containers (CA and CB)


CA Contains Services S1 and S3

CB Contains Service S2

Process PA does  --[S1]---[PB]--[S3]

and PB does --[S2]--

Again, if you start a message on Process PA, this is just like chaining services as follows

--[S1]---[S2]--[S3]

The flow would be  --[S1 in CA ]---[S2 in CB]--[S3 in CA]

The messaging at the JMS level would mean that S1, S2, and S3 would need entry endpoints that mapped to JMS destinations.

Posted by sk185050 on 28-May-2010 05:08

that means my contol will go to CB, and reason being the S2 is not in container CA

AM I got it right ?

If yes, I  would have seeing the logging (if i am doing) information of container2, CB in my conatiner1 that is CA right?

Posted by Bill Wood on 28-May-2010 06:44

sk185050 wrote:

that means my contol will go to CB, and reason being the S2 is not in container CA

AM I got it right ?

Yes.  You would see  S1 execute in Conatiner CA and S2 execult in Container CB.    And this has nothing to do with how Process PB was deployed.  (And in the example I gave I did not say it was deployed to a container at all).   It is all about the services and how they are reachable.

sk185050 wrote:

If yes, I  would have seeing the logging (if i am doing) information of container2, CB in my conatiner1 that is CA right?

It depends on what logging you were doing, but yes.  I would look at Tracking Messages for this info.

This thread is closed