New Posts New Posts RSS Feed: Entity Manager Queuing
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Entity Manager Queuing

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: Entity Manager Queuing
    Posted: 23-Aug-2010 at 11:41am
1) Asynchronous queries are "issued" in the order that you've called them, but their completion (and subsequent processing) is dependent on when the queries complete.  Each async query is processed on a separate worker thread, and the EntityManager does track all outstanding async requests but doesn't actually queue them.  As async requests complete back on the main calling thread they will be processed in the order they've completed. 
 
2) In terms of the pipeline between client and server, there's really no difference between one EntityManager issuing many async requests vs. many EntityManagers each issuing one request.   If each EM is connected to the same EntityServer then they will all use a common communication proxy.   It's therefore application dependent how you handle this - it may be cleaner, or even more performant, to use separate EMs to load data and then import into a central EM, but it would really depend on your specific needs and require some performance testing.  Remember that an EM is not threadsafe, and can only be safely used by one thread at a time.
Back to Top
*Calsy View Drop Down
Groupie
Groupie


Joined: 02-Feb-2009
Location: Australia
Posts: 69
Post Options Post Options   Quote *Calsy Quote  Post ReplyReply Direct Link To This Post Posted: 22-Aug-2010 at 1:50pm
Hi All, Two questions:
 
1. If multiple queries are called to one entity manager at the same time how does the entity manager queue them up? For instance if 5 queries are called at the same time in what order will they be executed? Will the entity manager only ever execute them sequentially or at the same time?
 
2. If I have multiple sets of data to pull at the same time, is it more advantageous to create multiple entity managers and send each data call through a different manager?
 
All these data calls are being fired from different controls in the application so creating parallel tasks isnt really possible.
 
Thanks in advance
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down