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

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Architecture / Aggregating data from multiple cores on: July 14, 2009, 02:11:08
I am working on a multi-core application which uses Pipes and Fabrication in Flex 3.3. I need to aggregate data from multiple modules and send it to a server. I've been struggling with what the best design is to do this.

The trigger for this aggregation is a proxy method in my main module. My current thoughts are:

1) Use a DO with properties for each piece of data that I need to aggregate. Send out a notification to each module and when the DO has data in each property, fire an event/notification which the aggregation proxy is registered for and send the DO to the server.

2) Try setting up a token ring style Pipes network which passes the DO around the ring to each modules. When it gets back to the originating module, send it to the server. However, I'm under the impression that notifications get dropped by the originating module, so this may not be possible (haven't tried it yet).

3) Setup notifications for each piece of data in the main module so that the modules can send their pieces back to the aggregation proxy.

The first option seems to be my current favorite, however it seems like it goes against the grain of PureMVC.

The second option would be a lot of rewiring of our modules and it might not even work...

The third option just seems messy because I'd be adding more notification constants and probably wouldn't scale well with number of pieces of data.

Are there any examples or preferred patterns for this type of aggregation across modules? Any other thoughts on how to accomplish this? If I had a return value on notifications I'd be set (something like boost/signals Combiner concept would be nice).

- Joel
Pages: [1]