Webhooks - glue for the web
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Webhooks - glue for the web

on

  • 4,118 views

Presentation for the 34th Ruby-Kansai meeting. Credits: some of the images inside are from the Jeff Lindsay's presentations "Web Hooks and the Programmable World of Tomorrow" and "Using Web Hooks" ...

Presentation for the 34th Ruby-Kansai meeting. Credits: some of the images inside are from the Jeff Lindsay's presentations "Web Hooks and the Programmable World of Tomorrow" and "Using Web Hooks" (see the presenter notes below the slides)

Statistics

Views

Total Views
4,118
Views on SlideShare
4,075
Embed Views
43

Actions

Likes
14
Downloads
107
Comments
0

10 Embeds 43

http://l.lj-toys.com 12
http://www.slideshare.net 9
http://lj-toys.com 7
http://danielhonigman.posterous.com 4
http://paper.li 4
http://posterous.com 2
http://us-w1.rockmelt.com 2
http://www.techgig.com 1
http://www.mefeedia.com 1
http://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Webhooks - glue for the web Presentation Transcript

  • 1. Webhooks glue for the Web 20 юни 2009, събота 1
  • 2. Who am I ? • Name: Stoyan Zhekov • Private: married, 3 kids (boys) • Work: Software Engineer • Contact: xmpp: //zh@jabber.jp 20 юни 2009, събота 2
  • 3. 20 юни 2009, събота 3
  • 4. Today • What is this talk about? • What are webhooks? • What can they do for me? • Pros and cons • Real life usage 20 юни 2009, събота 4 Maybe you already forget the presentation title, so one more time...
  • 5. What is this talk about? 20 юни 2009, събота 5
  • 6. Webhooks glue for the Web 20 юни 2009, събота 6
  • 7. Hooks? 20 юни 2009, събота 7
  • 8. Glue? 20 юни 2009, събота 8
  • 9. Web 3.0 20 юни 2009, събота 9 Don’t worry. We will talk about web :)
  • 10. Web x.0? • Web 1.0 - static • Web 2.0 - dynamic? social? • Web 3.0 - real time? 20 юни 2009, събота 10 Google Wave, iPhone push notifications
  • 11. Web 3.0 • Real Time • Does it scale? • PubSub 20 юни 2009, събота 11
  • 12. Real Time 20 юни 2009, събота 12
  • 13. Real Time Web • RSS is not enough (SUP) • XMPP • Webhooks 20 юни 2009, събота 13 I spoke in Kobe about SUP and XMPP (see my other presentations - http://www.slideshare.net/zhesto/microblogging-via-xmpp
  • 14. No Polling! 20 юни 2009, събота 14 Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 15. Real Time 20 юни 2009, събота 15
  • 16. Does it scale? 20 юни 2009, събота 16 Recently working a lot with EC2 - pay per use, scale easy - instant start/stop of instances
  • 17. Clouds... 20 юни 2009, събота 17
  • 18. Clouds? 20 юни 2009, събота 18
  • 19. Computer cloud! 20 юни 2009, събота 19
  • 20. Communications 20 юни 2009, събота 20
  • 21. Communications • Messaging (AMQP): RabbitMQ • XMPP, Ejabberd, Prosody • Webhooks 20 юни 2009, събота 21 Webooks can help you with the infrastructure. Some service is too heavy? - move it to another machine and connect them with webhook. Think about webhooks even when on a single machine (call by URL, not by function name)
  • 22. PubSub 20 юни 2009, събота 22
  • 23. Publishers 20 юни 2009, събота 23
  • 24. Subscribers 20 юни 2009, събота 24
  • 25. Publishers and Subscribers 20 юни 2009, събота 25
  • 26. Watercoolr •PubSub •Webhooks •Ruby http://github.com/jcapote/watercoolr/ http://github.com/zh/watercoolr/ 20 юни 2009, събота 26
  • 27. PubSubHubBub http://code.google.com/p/pubsubhubbub/ 20 юни 2009, събота 27
  • 28. What are webhooks? 20 юни 2009, събота 28 Image from the presentation “Using Web Hooks” I keep repeating webhooks, webhooks,... So what are they?
  • 29. Captain Hook 20 юни 2009, събота 29
  • 30. SVN Hooks 20 юни 2009, събота 30 Image from the presentation “Using Web Hooks”
  • 31. Hooks • Subversion pre-commit, post-commit • Git, Mercurial - they have hooks too • Rails: :before_save, :after_delete 20 юни 2009, събота 31
  • 32. Unix Philosophy • do ONE THING and do it well • programs WORK TOGETHER • UNIVERSAL INTERFACE (text) 20 юни 2009, събота 32 Insert here more about the webhooks - POST, etc. example cat | grep | mail -> make this with web too (demo)
  • 33. UNIX pipes 20 юни 2009, събота 33 Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 34. The Web 20 юни 2009, събота 34 Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 35. Web 3D 20 юни 2009, събота 35 There are services creating the web pages (feeds). Now nodes communicate via RSS - indirect. Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 36. WebApp pipes? 20 юни 2009, събота 36 Can we make a simple applications and connect them like a pipe? Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 37. 20 юни 2009, събота 37 Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 38. POST /service data={ 'message':'hey guys!' } 20 юни 2009, събота 38
  • 39. What are WEBhooks? webhooks are user defined callback URLs, that point to a web script to run on a certain event 20 юни 2009, събота 39 By letting the user specify a URL for various events, the application will POST data to those URLs when the events occur. Key poins: USER DEFINED, URLs (remote services), RUN ON CERTAIN EVENT (push, no cronjobs etc.)
  • 40. User defined 20 юни 2009, събота 40
  • 41. URLs = remote 20 юни 2009, събота 41
  • 42. register URL 20 юни 2009, събота 42 Image from the presentation “Using Web Hooks”
  • 43. get notification 20 юни 2009, събота 43 Image from the presentation “Using Web Hooks”
  • 44. Why? 20 юни 2009, събота 44
  • 45. Service Integration 20 юни 2009, събота 45
  • 46. Flexibility 20 юни 2009, събота 46
  • 47. Customization 20 юни 2009, събота 47 Image from the presentation ”Web Hooks and the Programmable World of Tomorrow”
  • 48. Webhooks movement • Jeff Lindsay • http://blogrium.com/?p=70 • http://webhooks.pbworks.com/ • http://blog.webhooks.org/ 20 юни 2009, събота 48
  • 49. Webhooks • Amazon have Merchant Callback API • PayPal (Instant Payment Notification) • GitHub and Google Code 20 юни 2009, събота 49
  • 50. Good and bad 20 юни 2009, събота 50
  • 51. Good • Well known protocol - HTTP • code libraries (software) • infrastructure (hardware) • Easy for vendors (services) • Easy for users (consumers) 20 юни 2009, събота 51
  • 52. 20 юни 2009, събота 52
  • 53. require ‘net/http’ require ‘json’ class User def commit(message) Net::HTTP.post_form( User.hook_url, { :data => message.to_json }) end end 20 юни 2009, събота 53 For service providers (publishers)
  • 54. require ‘net/smtp’ require ‘json’ require ‘sinatra’ post ‘/hook’ do data = JSON.parse(params[:data]) # do something with the data Net::SMTP.start(‘localhost’) do |smtp| smtp.send_message data[‘message’], from, to end end 20 юни 2009, събота 54 For service consumers (subscribers)
  • 55. Bad • No standard • Google Code: XML • GitHub: JSON • ping.fm - POST parameters • Security (authentication) 20 юни 2009, събота 55
  • 56. Real Life Usage 20 юни 2009, събота 56
  • 57. Where to create hooks? • http://heroku.com/ - Ruby • GAE - Python, Java, JRuby • http://scriptlets.org/ - Python, JS • PHP - almost everywhere 20 юни 2009, събота 57
  • 58. Ready Tools • GitHub - RunCodeRun • http://ping.fm/ - IM, email, Skype • http://postbin.org/ - debug • SwitchHub, TarPipe • http://superfeedr.com/ - RSS • http://bot.im/ - IMified XMPP bot 20 юни 2009, събота 58
  • 59. Demo ping.fm + postbin ping.fm + switchub (+postbin) 20 юни 2009, събота 59 create new hook on postbin, login to post.fm/custom/ and put there the url. test: web, email, im?
  • 60. Questions? 20 юни 2009, събота 60