Managing multple asset loads from across multiple services

Kyle's Avatar

Kyle

02 Jul, 2013 04:54 PM

Hey guys/gals,
I'm looking at using Greensocks Loadermax lib to manage the loading of my data/assets. I have multiple services which will be requesting data, and am trying to determine the best way to monitor the load progress of all of the data as a whole. Using Loadermax this is accomplished by creating a queue and adding the various loaders to the queue, then monitoring the load progress of the queue as a whole. This gets a bit tricky because my loaders are created across multiple services. So the question is, what is the "best" way of handling this...

I see a few options at this point:

1) Create a command that calls each service to trigger the various data requests, and have each service return a loader object which the command wil then add to the queue. Now in this case, the queue could be contained in the command, but I believe this would break best practices as the command would be hanging around waiting for actions to occur. Given that, perhaps I could create a separate Model to house the queue and dispatch events out to the framework when updates are received.

2) Create a LoaderModel and have each service dispatch an event containing it's loader object which would then trigger a command that would add that loader to the LoaderModel's queue. The model would then be monitoring the status of the load and dispatching events to the framework.

I'm open to any suggestions that anyone might have.

Thanks as always!

-Kyle

  1. Support Staff 1 Posted by Ondina D.F. on 03 Jul, 2013 09:45 AM

    Ondina D.F.'s Avatar
  2. Ondina D.F. closed this discussion on 30 Aug, 2013 07:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac