SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
WebHooks




no doubt, familiar with web apis, only a minority familiar with webhooks.
webhooks are event callbacks over http. the server/app calls your URL. that’s it.
something happens on their end, they ping a url you gave them.
sole champion of webhooks since i coined it in 2006.
before 2006, about 1 or 2 of these names used the pattern. PayPal IPN for example.
since then its exploded, many of these names adopted webhooks either
directly/indirectly because of me, or more importantly because its a good idea.
Not a protocol




surprise! they aren’t a protocol or a standard. and they won’t be.
in fact, i’m not sure what i’m doing on this panel -- however! webhooks *are* the core
delivery mechanic of an open protocol you’ve probably have heard of:
pubsubhubbub has gotten a lot of coverage and adoption. if you don’t know... (describe).
it was created by brett slatkin and brad fitzpatrick. brad should be on this panel, not me.
can represent pubsubhubbub here, message is about webhooks and why theyre significant.
in fact, let me do that quickly here:
Telephone analogy




telephone system makes a good analogy. calls are requests. caller is client, receiver is server.
imagine friend/fam as web services. call to get info, call to tell them info, call to get them to
do something (pick up milk). this is our limited current state of web apis. here’s the problem:
The “callback”




There is no way for these people/services to call you back... to call you up at some point and
tell YOU important information.. to tell you they tried to pick up milk, but they were out of
2%.
The best you can do is keep calling them. This is polling. In the real-world, its unacceptable.
Imagine getting a prescription in your busy day (without callbacks).
STDIN                                   STDOUT
                                        Program




similarly, imagine unix pipes, without stdout
STDIN
                                         Program




it doesn’t work. you need the output that’s not just useful in itself, but can be used as the
input of other programs.
API
                                      Web App




today we have regular apis. but they have no way to give us output outside of our requests.
API                                                       Events
                                      Web App




if web apps had webhook event triggers, something changes in the ecosystem that is really
disproportionate to the simple idea of webhooks. this greater thing is called the evented web.
talking about it at 11:20 in the other room, full of real examples, code, bigger picture, all
that.
When something happens, perform
             HTTP POST with relevant data to a URL
                   that the user gives you.




to reiterate, the idea is simple...
Why HTTP?




in case its not self evident why this type of infrastructure is not done with xmpp for example:
-simplest thing
-already understood and ubiquitous, webhooks already set precendent
-most important (i would not independently evangelize for 4 years without this):
HTTP is the easiest
              way to trigger code



thanks to a spec in 1993 called cgi, we not only have the web as an app platform, but http
is essentially rpc. with everything in the cloud, web development being so popular, it’s now
the easiest way to get code to run. write a php script or ruby script. put it in the cloud for
free, instantly. why code??
Code can do anything




having arbitrary code run builtin to this pattern means the possibilities are much richer.
instead of having a specific protocol and a client implementation that executes the semantics
of that protocol, you have an open ended system. code can do anything: make phone calls,
order pizza, take advantage of our api ecosystem.
Event-driven programming
                              Writing event handlers




if you take a step back you might see that what this is... is event driven programming.
writing webhooks are writing event handlers. this is big.
Event-driven web
                                   “Evented Web”




this is the beginning of a whole new era of web development. programmable web 2.0
where small pieces can make a big difference because you can easily glue apps together.
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);

     } else if (twitterUser['following'] > 1000 &&
         twitterUser['followers'] < twitterUser['following'] / 2) {

         twitter.block(twitterUser);
     }
})
APIs That Make Things Happen
     WebHooks and the Evented Web


          11:20 in Technical 2

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
Zhentian Wan
 

Was ist angesagt? (20)

React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenario
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
 
Puppeteer
PuppeteerPuppeteer
Puppeteer
 
Introduction to API
Introduction to APIIntroduction to API
Introduction to API
 
Testing plan for an ecommerce site
Testing plan for an ecommerce siteTesting plan for an ecommerce site
Testing plan for an ecommerce site
 
JavaScript Fetch API
JavaScript Fetch APIJavaScript Fetch API
JavaScript Fetch API
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Flutter vs React Native | Edureka
Flutter vs React Native | EdurekaFlutter vs React Native | Edureka
Flutter vs React Native | Edureka
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)RxJS Operators - Real World Use Cases (FULL VERSION)
RxJS Operators - Real World Use Cases (FULL VERSION)
 
React js
React jsReact js
React js
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
Burp suite
Burp suiteBurp suite
Burp suite
 
jQuery
jQueryjQuery
jQuery
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
 

Ähnlich wie WebHooks in 10 Minutes

Web Hooks And The Programmable World Of Tomorrow
Web Hooks And The Programmable World Of TomorrowWeb Hooks And The Programmable World Of Tomorrow
Web Hooks And The Programmable World Of Tomorrow
GoogleTecTalks
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
jhenry
 
Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08
Ari Leichtberg
 

Ähnlich wie WebHooks in 10 Minutes (20)

Web Hooks
Web HooksWeb Hooks
Web Hooks
 
APIs That Make Things Happen
APIs That Make Things HappenAPIs That Make Things Happen
APIs That Make Things Happen
 
Web Hooks And The Programmable World Of Tomorrow
Web Hooks And The Programmable World Of TomorrowWeb Hooks And The Programmable World Of Tomorrow
Web Hooks And The Programmable World Of Tomorrow
 
Web Hooks Google Tech Talk
Web Hooks Google Tech TalkWeb Hooks Google Tech Talk
Web Hooks Google Tech Talk
 
Hacking For Innovation
Hacking For InnovationHacking For Innovation
Hacking For Innovation
 
The DiSo Project
The DiSo ProjectThe DiSo Project
The DiSo Project
 
I broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsI broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projects
 
I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...
 
Webhooks, Asynchronous Web Applications and Push Notifications
Webhooks, Asynchronous Web Applications and Push NotificationsWebhooks, Asynchronous Web Applications and Push Notifications
Webhooks, Asynchronous Web Applications and Push Notifications
 
Tastypie: Easy APIs to Make Your Work Easier
Tastypie: Easy APIs to Make Your Work EasierTastypie: Easy APIs to Make Your Work Easier
Tastypie: Easy APIs to Make Your Work Easier
 
Mining the Social Web for Fun and Profit: A Getting Started Guide
Mining the Social Web for Fun and Profit: A Getting Started GuideMining the Social Web for Fun and Profit: A Getting Started Guide
Mining the Social Web for Fun and Profit: A Getting Started Guide
 
Walter api
Walter apiWalter api
Walter api
 
Webhooks - Creating a Programmable Internet
Webhooks - Creating a Programmable InternetWebhooks - Creating a Programmable Internet
Webhooks - Creating a Programmable Internet
 
Goodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social UpdateGoodle Developer Days London 2008 - Open Social Update
Goodle Developer Days London 2008 - Open Social Update
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
 
Goodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social UpdateGoodle Developer Days Munich 2008 - Open Social Update
Goodle Developer Days Munich 2008 - Open Social Update
 
Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08
 
061203_futurewebapps_tempo
061203_futurewebapps_tempo061203_futurewebapps_tempo
061203_futurewebapps_tempo
 
Georgia Tech Hack Day
Georgia Tech Hack DayGeorgia Tech Hack Day
Georgia Tech Hack Day
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 

Mehr von Jeff Lindsay

Hack Party SHDH Lightning Talk
Hack Party SHDH Lightning TalkHack Party SHDH Lightning Talk
Hack Party SHDH Lightning Talk
Jeff Lindsay
 

Mehr von Jeff Lindsay (15)

Hack Party SHDH Lightning Talk
Hack Party SHDH Lightning TalkHack Party SHDH Lightning Talk
Hack Party SHDH Lightning Talk
 
NullMQ @ PDX
NullMQ @ PDXNullMQ @ PDX
NullMQ @ PDX
 
Building an Event-driven Web @ Impact
Building an Event-driven Web @ ImpactBuilding an Event-driven Web @ Impact
Building an Event-driven Web @ Impact
 
Evented Web @ Ignite
Evented Web @ IgniteEvented Web @ Ignite
Evented Web @ Ignite
 
Hacker Dojo Origins
Hacker Dojo OriginsHacker Dojo Origins
Hacker Dojo Origins
 
Dinos
DinosDinos
Dinos
 
Hacker Dojo @ Google
Hacker Dojo @ GoogleHacker Dojo @ Google
Hacker Dojo @ Google
 
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All ProgrammersHow WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
 
Creating + Nurturing Your Indie Game Community
Creating + Nurturing Your Indie Game CommunityCreating + Nurturing Your Indie Game Community
Creating + Nurturing Your Indie Game Community
 
Dissolving Problems
Dissolving ProblemsDissolving Problems
Dissolving Problems
 
SHDH Retrospective, Part 2
SHDH Retrospective, Part 2SHDH Retrospective, Part 2
SHDH Retrospective, Part 2
 
SHDH Retrospective, Part 1
SHDH Retrospective, Part 1SHDH Retrospective, Part 1
SHDH Retrospective, Part 1
 
Superglue: Web Hooks and the Future of the Web
Superglue: Web Hooks and the Future of the WebSuperglue: Web Hooks and the Future of the Web
Superglue: Web Hooks and the Future of the Web
 
Beyond Mashups: Service Integration and More
Beyond Mashups: Service Integration and MoreBeyond Mashups: Service Integration and More
Beyond Mashups: Service Integration and More
 
Web Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of TomorrowWeb Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of Tomorrow
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

WebHooks in 10 Minutes

  • 1. WebHooks no doubt, familiar with web apis, only a minority familiar with webhooks. webhooks are event callbacks over http. the server/app calls your URL. that’s it. something happens on their end, they ping a url you gave them.
  • 2. sole champion of webhooks since i coined it in 2006. before 2006, about 1 or 2 of these names used the pattern. PayPal IPN for example. since then its exploded, many of these names adopted webhooks either directly/indirectly because of me, or more importantly because its a good idea.
  • 3. Not a protocol surprise! they aren’t a protocol or a standard. and they won’t be. in fact, i’m not sure what i’m doing on this panel -- however! webhooks *are* the core delivery mechanic of an open protocol you’ve probably have heard of:
  • 4. pubsubhubbub has gotten a lot of coverage and adoption. if you don’t know... (describe). it was created by brett slatkin and brad fitzpatrick. brad should be on this panel, not me. can represent pubsubhubbub here, message is about webhooks and why theyre significant. in fact, let me do that quickly here:
  • 5. Telephone analogy telephone system makes a good analogy. calls are requests. caller is client, receiver is server. imagine friend/fam as web services. call to get info, call to tell them info, call to get them to do something (pick up milk). this is our limited current state of web apis. here’s the problem:
  • 6. The “callback” There is no way for these people/services to call you back... to call you up at some point and tell YOU important information.. to tell you they tried to pick up milk, but they were out of 2%. The best you can do is keep calling them. This is polling. In the real-world, its unacceptable. Imagine getting a prescription in your busy day (without callbacks).
  • 7. STDIN STDOUT Program similarly, imagine unix pipes, without stdout
  • 8. STDIN Program it doesn’t work. you need the output that’s not just useful in itself, but can be used as the input of other programs.
  • 9. API Web App today we have regular apis. but they have no way to give us output outside of our requests.
  • 10. API Events Web App if web apps had webhook event triggers, something changes in the ecosystem that is really disproportionate to the simple idea of webhooks. this greater thing is called the evented web. talking about it at 11:20 in the other room, full of real examples, code, bigger picture, all that.
  • 11. When something happens, perform HTTP POST with relevant data to a URL that the user gives you. to reiterate, the idea is simple...
  • 12. Why HTTP? in case its not self evident why this type of infrastructure is not done with xmpp for example: -simplest thing -already understood and ubiquitous, webhooks already set precendent -most important (i would not independently evangelize for 4 years without this):
  • 13. HTTP is the easiest way to trigger code thanks to a spec in 1993 called cgi, we not only have the web as an app platform, but http is essentially rpc. with everything in the cloud, web development being so popular, it’s now the easiest way to get code to run. write a php script or ruby script. put it in the cloud for free, instantly. why code??
  • 14. Code can do anything having arbitrary code run builtin to this pattern means the possibilities are much richer. instead of having a specific protocol and a client implementation that executes the semantics of that protocol, you have an open ended system. code can do anything: make phone calls, order pizza, take advantage of our api ecosystem.
  • 15. Event-driven programming Writing event handlers if you take a step back you might see that what this is... is event driven programming. writing webhooks are writing event handlers. this is big.
  • 16. Event-driven web “Evented Web” this is the beginning of a whole new era of web development. programmable web 2.0 where small pieces can make a big difference because you can easily glue apps together.
  • 17. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } else if (twitterUser['following'] > 1000 && twitterUser['followers'] < twitterUser['following'] / 2) { twitter.block(twitterUser); } })
  • 18. APIs That Make Things Happen WebHooks and the Evented Web 11:20 in Technical 2