BatchFB in multithreading

24 views
Skip to first unread message

Ayman

unread,
Jul 6, 2013, 12:39:19 AM7/6/13
to bat...@googlegroups.com
Hi Guys,

I've got 6 threads that create their own FacebookBatcher object and make their own API calls with different accessTokens. The more threads I add the longer it takes to get a reply from Facebook.

What could be happening here ?  may be BatchFB does not support multithreading ? 

Please help.

Thanks
Ayman

Ayman

unread,
Jul 6, 2013, 12:42:13 AM7/6/13
to bat...@googlegroups.com
In the userguide (https://code.google.com/p/batchfb/wiki/UserGuide) document it says 

"A planned future version of BatchFB will be able to issue multiple calls to Facebook in parallel using asynchronous url fetching (hello, Appengine!)"

Is this feature now available ? 

Jeff Schnitzer

unread,
Jul 6, 2013, 2:35:02 PM7/6/13
to bat...@googlegroups.com
There is nothing special about batchfb wrt threads. The default executor implementation uses HttpURLConnection; if there is some sort of queueing going on underneath then that is a limit of your platform. The GAE executor implementation does indeed use async urlfetching (that doc comment was old and has now been removed, thanks for pointing it out). GAE limits you to 10 async requests in flight at once for your entire instance, I believe.

What kind of environment are you using to test this?

Jeff




Ayman

--
You received this message because you are subscribed to the Google Groups "BatchFB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to batchfb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ayman

unread,
Jul 7, 2013, 9:38:41 AM7/7/13
to bat...@googlegroups.com, je...@infohazard.org
Hey Jeff, yep you are right. There was something wrong with my code which was holding up the threads and not releasing them in time.

Thanks heaps for BatchFB 
Ayman
Reply all
Reply to author
Forward
0 new messages