topleft topright

Welcome, Guest. Please login or register.
May 23, 2013, 01:13:31 AM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.

Pages: [1]
Print
Author Topic: Using Pipes with a different approach - Clarification  (Read 2431 times)
cgm
Newbie
*
Posts: 5


View Profile
« on: July 03, 2009, 06:09:20 AM »

Hello ,
I have been currently working on an application using the multicore where  pipes is used to handle data transactions between my modules. the simple examples mainly use a shell and module and communication is usually from shell to module and back module to shell...

Trying to do something more .. i have a module which by itself is a shell to other modules that it loads and handle separately  ... and at the same time i want to give some modules to talk to each other apart from the shell..

To do so i created a new junctionmediator  at the module [which is a shell for other modules now] and gave it all handling of communiction with its children modules..  well now i have 2 junctionmediator registered for a module .. and in case i need to add communication between modules i should add a 3rd junctionmediator .. i think i m doing something wrong or understood something not quite well any clarification would be helpful  ..
is the latter correct or it will cause problems ??
i m still working on this so probably it works...  Undecided

- And does anyone have an example of using pipe using a different approach other than shellToModule , moduleToshell ... in slideshow for multicore and pipes on puremvc tv a diagrams was shown with different pipe connections .. is there an example on those ..

Thanks in advance  for any  help you can provide ..  Smiley
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2790



View Profile WWW
« Reply #1 on: July 03, 2009, 04:00:47 PM »

You only need one JunctionMediator per Core. It doesn't matter how many other Cores it talks to, the JunctionMediator can have as many pipes as you need. Of course they need to have unique names.

-=Cliff>
Logged
Tekool
Sr. Member
****
Posts: 196


View Profile WWW
« Reply #2 on: July 04, 2009, 04:21:23 AM »

Quote
does anyone have an example of using pipe using a different approach other than shellToModule , moduleToshell ...

If you want a different approach to handle module to module communication, you can check mine : http://www.tekool.net/blog/2009/06/14/puremvc_flex_modules_and_pipes/
Logged
cgm
Newbie
*
Posts: 5


View Profile
« Reply #3 on: July 04, 2009, 08:51:34 AM »

thx for the reply cliff and trek ..
i am looking into your example trek .. thx...

in case i have a shell where i registered a teeMerge and teeSplit for 2 pipes and in and out pipe as such :
Code:
junction.registerPipe( PipeAwareModuleConstants.SHELL_TO_MODULE_PIPE,Junction.OUTPUT, new TeeSplit() );
junction.registerPipe( PipeAwareModuleConstants.MODULE_TO_SHELL_PIPE,Junction.INPUT,new TeeMerge() );

and i do the relative connection to modules and thats working well.

But i have  a module[Z] which have its own teeMerge and teeSplit .. :
Code:
junction.registerPipe( PipeAwareModuleConstants.CORE_TO_MODULE_PIPE,Junction.OUTPUT,new TeeSplit() );
junction.registerPipe( PipeAwareModuleConstants.MODULE_TO_CORE_PIPE,Junction.INPUT,new TeeMerge() );

To connect this module[Z] to the shell i am overriding its ACCEPT_INPUT_PIPE and ACCEPT_OUTPUT_PIPE  :
Code:
case JunctionMediator.ACCEPT_INPUT_PIPE:
var inputPipe:IPipeFitting = note.getBody() as IPipeFitting;
var coreInFitting: TeeMerge = junction.retrievePipe( PipeAwareModuleConstants.MODULE_TO_CORE_PIPE ) as TeeMerge;
coreInFitting.connectInput( inputPipe );
break;
case JunctionMediator.ACCEPT_OUTPUT_PIPE:
var outputPipe:IPipeFitting = note.getBody() as IPipeFitting;
var coreOutFitting: TeeSplit = junction.retrievePipe( PipeAwareModuleConstants.CORE_TO_MODULE_PIPE ) as TeeSplit;
coreOutFitting.connect( outputPipe );


So far is the latter correct ? ...
when i am sending a message from : shell To module[Z] - message is received.
nevertheless when i send a message from :  module[Z] To Shell - No message is received.

same if this module[Z] send a message to its children modules the children receives the message
( module[Z] To a module connected to module[Z] only - message received )
but when the children try to send to module[Z] no message received ...

No errors popup when i debug ..
Logged
cgm
Newbie
*
Posts: 5


View Profile
« Reply #4 on: July 06, 2009, 05:52:12 AM »

I solved the latter problem i had .. the connections are correct , my problem was in sending the messages .

Quote
when i send a message from :  module[Z] To Shell - No message is received.
problem here i was using the wrong pipe to send the messages ..  was using the MODULE_TO_SHELL_PIPE whereas i should have used : CORE_TO_MODULE_PIPE ...

Quote
when the children try to send to module[Z] no message received ...
i tried sending onRegister and that didnt work apparently since no accept inputs and outputs was made yet.

Logged
Tekool
Sr. Member
****
Posts: 196


View Profile WWW
« Reply #5 on: July 06, 2009, 08:12:45 AM »

I'm glad that you could find a solution to all of your problems, I had expected to answer you in the evening, but only with little time.

Good luck with pipes. Wink
Logged
Pages: [1]
Print
Jump to:  



Login with username, password and session length

Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC
Copyright © 2006-2008 Futurescale, Inc.