Regarding thread safety: The service classes in the Java client are not thread safe and all calls to the GData servers are synchronous. You'll have to do the heavy lifting for supporting thread-safety.
That being said, the only real issues seems to be in the initial auth token request. After that, each individual request gets executed using it's own GDataRequest object so there's no real threading interactions w.r.t. generating request data or parsing/handling responses. For others following along, the .NET client now supports asynchronous operations as well as the JS library (naturally). Eric On Sep 10, 8:22 pm, icebackhaz <[EMAIL PROTECTED]> wrote: > As you may recall from other postings, we are planning to act as an > aggregator and yes we'll be in a multi-threaded situation since we > need the throughput. With a naive implementation we've already > already hit the throttling on connections (logins) and in response > wish to re-use an established connection. So the question becomes Do > we have to handle a pool (cache) of GoogleBaseService instances (if > they're not thread safe) or can we use a singleton instance. > > We believe we can change the url, specifying one of our client's id in > time for each actual http connection generated inside the batch() > call. > > A more expert reading than I gave suggests the Service mechanism may > be thread safe, but that's hard to prove so it would help a lot to > have a commitment from Mr. G on this one. Also wondering if there is > throttling applied to posting items? > > Cheers, and thanks as always, > > On Sep 9, 6:06 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > As far as I know, all of the client libraries (Java, PHP, .NET, etc.) > > don't > > make socket-type connections to the Google Data APIs. > > Instead, they setup service objects that send the appropriate > > Authorization headers, AuthSub token, etc. for every request. > > > I've never tried using the libraries in a multi-threaded > > environment. > > Maybe someone else can offer some suggestions. > > > Is their a particular reason you need to spawn multiple processes? > > > Eric > > > On Sep 8, 9:50 pm, icebackhaz <[EMAIL PROTECTED]> wrote: > > > > I see nothing in the javadoc that makes me think GoogleBaseService is > > > thread save. I'm thinking of caching a handful of these connections > > > and re-using them in worker threads. Anyone out there have some war > > > stories to share. > > > > (Especially a definitive life time of the connection.) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
