

Facebook Scripting Language - A really rough idea - splatzone
https://gist.github.com/2466121

======
jorgenhorstink
This is what I always have thought to be a huge problem in RESTful API design
of all major companies like Twitter, Facebook, Google etc. It is mainly pull-
technology. One has to ask the Facebook-server all the time: get a list of
friends, get a list of friends, get a list of friends.

I'd love to see an API model based on events and callback URL's.

pseudo, but you'll get the idea:

[http://api.facebook.com/event/on-friend-
connect?callback=htt...](http://api.facebook.com/event/on-friend-
connect?callback=http://myserver.com/event/friend-connected)

IMHO, WebServices should communicate in an evented fashion. If I want to draw
an umbrella on myserver if it is going to rain in The Netherlands, I don't
want to ask the weather server every X minutes: is it going to rain? is it
going to rain? is it going to rain?

No, I want:

[http://api.weeronline.nl/event/on-weather-
change?location=Ut...](http://api.weeronline.nl/event/on-weather-
change?location=Utrecht,NL&callback=http://myserver/event/weather-changed)

pubhubsubbub solves this issue for RSS feeds, but pubhubsubbub is way too
narrow to me. I hope evented API's will become the next big thing, enabling
developers to create a whole new bunch of awesome products.

~~~
splatzone
Isn't this what Webhooks was all about? I remember they were all the rage a
while back but I haven't seen much more adoption since then.

I'd love to be proven wrong though.

------
nextparadigms
Ha. Now I understand why Facebook said "Google and Apple need to _improve_
their browsers" a few days ago.

