I went couple of posts under "Architecture" forum that are talking about intercore communication but I think I need more help.
I've two submodules talking to each other, let's say a login module and a social module (plus others).
For some internal reasons, the login module is separate because of it's complexity and kind of services it's paired with.
If social module is invoked/requested, it needs to first pass the authToken (encrypted username/password) to "Login" module (Login and Social modules are connected to each other via Pipes).
Login module in turn returns true (with user data) or false, and then Social can carry on forward with what it has to do.
I understand that Pipes is one-way communication but I need communication back and forth. There are no web services involved, so it's not an asynchronous call. I'm using PHP port, it checks the database synchronously and returns true (with user data) or false.
What i can think is of is that, send a message with authToken from SocialJunction to LoginJunction and LoginJunction retrieves the Proxy, calls the function, gets it result and sends a message in return, received by SocialJunction and it carries on forward from there? Please advise.
Future Needs: (if multiple types of communication back and forth, use type attribute to distinguish between type of calls, Yes???)
Also if Asynchronous calls, can you pass a function of one submodule and have it executed by the second module as discussed here under Shared Proxies.
http://forums.puremvc.org/index.php?topic=2080.0Is that what async token pattern is or what is it?
Appreciate your help.