asynch version ?

13 views
Skip to first unread message

Andy Waddell

unread,
Feb 9, 2012, 3:12:52 PM2/9/12
to BatchFB
I am interested in the async version you mention in the docs. I'm on
app engine and need to pull data from FB in bulk and then write to the
datastore. I think it would work really well to us asych so that
datastore writes and url fetch could be going on in parallel, but I
also don't want to give up on the batching efficiency.

I might be able to contribute some code back, but I don't want to
duplicate the effort if it's underway.

Jeff Schnitzer

unread,
Feb 9, 2012, 3:20:39 PM2/9/12
to bat...@googlegroups.com
It's already in place... BatchFB will auto-detect that you are on appengine and use async fetching.  Look at RequestExecutor.java if you want to see how it works.

If you're not on GAE and you want async fetching, you just have to implement RequestExecutor with whatever flavor of async your container supports and call RequestExecutor.setInstance().  The default (non-appengine) executor just uses HttpURLConnection.

Jeff
Reply all
Reply to author
Forward
0 new messages