Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous network support #1

Open
ryanscott opened this issue May 22, 2010 · 4 comments
Open

Asynchronous network support #1

ryanscott opened this issue May 22, 2010 · 4 comments

Comments

@ryanscott
Copy link
Owner

Currently the GraphAPI only supports synchronous networks calls, via NSURLConnection sendSynchronousRequest. This is how all the other server-side libraries work, but I think most iPhone network code is more typically asynchronous. I want bamboo to support asynchronous requests.

What is the demand for asynchronous support? And, what sort of API should we build into the library? I am thinking over this issue right now, trying to design a simple interface, while still surfacing as much detail as necessary.

If you have a use case, an actual need, or any other input, please let me know.

@ryanscott
Copy link
Owner Author

I like how Matt Gemmell handles this in his MGTwitterEngine (http://github.com/mattgemmell/MGTwitterEngine). I'm thinking something like that, though maybe using NSNotifciationCenter instead of delegates.

@yosit
Copy link

yosit commented Jul 5, 2010

+1 MGTwitterEngine is a great example of how networking api's should work, though it has it's over head of understanding what's going on there.

@petem
Copy link

petem commented Aug 7, 2010

But isn't it funny how when we have an asynchronous API, we go to lots of trouble to serialize access using threads, callbacks, state machine or whatever? I want to create an album and load photos into it. I need the aid of the created album first don't I? For my use I think I'd prefer a synchronous approach if handed to me.

@yosit
Copy link

yosit commented Aug 7, 2010

the main problem with synchronous calls is that it blocks the UI - you don't want your app to freeze every time you do network calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants