Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Multicore Pipes vs Fabrication  (Read 15658 times)
eball
Jr. Member
**
Posts: 15


View Profile Email
« on: January 25, 2009, 06:31:42 »

Which is better?
Pipes or Fabrication?
or is the Fabrication utitility a manager of the pipes utility that is easier to use?
Is there any loss of functionality or downside of Fabrication vs straight Pipes?
Logged
eball
Jr. Member
**
Posts: 15


View Profile Email
« Reply #1 on: January 25, 2009, 06:47:22 »

nevermind, i found the information i was looking for, thanks.
Logged
JJfutbol
Sr. Member
****
Posts: 53


View Profile WWW Email
« Reply #2 on: January 25, 2009, 08:52:43 »

Hey don't be greedy! Share what you found with the rest of us that don't really much about it! :)
Logged
eball
Jr. Member
**
Posts: 15


View Profile Email
« Reply #3 on: January 25, 2009, 11:32:58 »

Sorry.  I just found other posts on this forum regarding fabrication.

http://forums.puremvc.org/index.php?topic=681.0

http://www.codedrunks.com/index.php/2008/09/12/fabrication-simplified-puremvc-multicore-modules/
Logged
quinrou
Jr. Member
**
Posts: 18


View Profile Email
« Reply #4 on: January 26, 2009, 07:45:11 »

Fabrication does indeed look very attractive but it comes at a price. be aware that the whole utility is more than 500Kb. I guess that depending on what feature you use the size will differ but certainly some thing to keep in mind.

S
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #5 on: January 26, 2009, 09:26:06 »

@quinrou, sorry to jump into this thread. I would like to clarify this, Not sure how you got to 500kb. The entire fabrication swc is around 70kb, the framework can't be bigger than that ;-). And depending on whether you are using flash or flex and which parts you use the footprint will be smaller. For instance this example is around 30 kb including 10kb of PureMVC itself.

peace,
darshan
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #6 on: January 28, 2009, 08:57:03 »

Fabrication is a third party framework that builds on MultiCore and Pipes for solving the plumbing problem. That is, you have to plumb the cores together in some fashion so they can send messages to each other.

-=Cliff>
Logged
Marcy_LH
Newbie
*
Posts: 2


View Profile Email
« Reply #7 on: January 29, 2009, 07:50:19 »

Hi Cliff and Darshan,

I use the presence of you both in this Thread to ask a question, that came in my mind today.

1. I'm I right, that there must be names for each pipe?
2. I'm I right, that the receiving part must know, what type of Message comes there, or what is in the NoteBody?
3. Isn't it much simpler to add an Interface to a SubClass of Facade like 'IGlobalBroadcaster', with something like this:

public function sendGlobalNotification(notificationName : String,
    body : Object = null, type : String = null) : void {

  for each(var facade : IFacade in instanceMap) {
    facade.sendNotification(notificationName, body, type);
  }
}

All cores would get the message, but the payload is much lower, because the observerMap in View has no such noteName and therefore nothing happens in a core, that does not know the noteName.

In both cases you need an API from the module, I think, but this would be much more efficient.

I searched the forum an the internet, but nothing could anwser this question.

Maybe you can.

Thanks for replying.

Marcy
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #8 on: January 30, 2009, 04:01:37 »

Hey Marcy,

This sounds like a good idea to me. In my current implementation I am maintaining hash maps by module address and groups. So something like module-to-module notification with/out groups go directly to each other without loops.

Your idea is fairly clean way of doing things using existing information about cores. I will look into incorporating some of this into future versions once I get into optimization mode towards 1.0.

peace,
darshan
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #9 on: January 30, 2009, 06:36:04 »

This is one of the reasons the Pipes was built. You should not send notifications to the other cores because they are merely strings.

The most limiting use case for intercore communication sets the best practice here and that is the case where you have one or more third party modules in your system.

You don't know what notification constants have been defined inside that module, and what's more you can't reference those constants so you must send in a string or a constant you've defined.

With PipeMessages its far easier to define and implement a protocol of what message classes will show up in a core and what data they will carry without stepping on any notification name constants or having to redefine them in every module.

-=Cliff>
Logged
Marcy_LH
Newbie
*
Posts: 2


View Profile Email
« Reply #10 on: January 30, 2009, 07:04:32 »

Yes, i agree,

i thounght about this, this morning, and came up with the following thoughts:

- If the Notes are known, all notes could be send to a module. There is no filtering and internal notes, that where send from external, could damage the module at runtime.

-> So I would need another methond (receiveGlobalMessage) for filtering, and then use a mediator to listen to the wanted note. So I am back to JunctionMediators.

I wanted to keep it simple, but the mechanics of pipes should bring all the things I need.

Fabrication is a cool attempt, but far to big. Would be better, if single features would be seperated. Like the Pipes Handling. :)

Thanks for your input.

Greeting from Leipzig, Germany.

Marcy
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #11 on: January 30, 2009, 10:51:23 »

I have built another framework that handles module configuation and plumbing and a ton of other stuff last year for a company called Lila (http://lila.io) they are building their flagship product on it and plan to release the framework in some form (at least as a library if not open source), but its not on their critical path at the moment.

-=Cliff>
Logged
Pages: [1]
Print