177
WEB HOOKS Programmable World of Tomorrow and the Jeff Lindsay introduction talk about this idiom, show examples, share ideas, explain significance how many are familiar with this idiom?

Web Hooks and the Programmable World of Tomorrow

Embed Size (px)

DESCRIPTION

Epic 40min talk on Web Hooks originally given in 2008. More information at http://webhooks.org

Citation preview

Page 1: Web Hooks and the Programmable World of Tomorrow

WEB HOOKSProgrammable World of Tomorrow

and the

Jeff Lindsayintroductiontalk about this idiom, show examples, share ideas, explain significancehow many are familiar with this idiom?

Page 2: Web Hooks and the Programmable World of Tomorrow

internetz

User

Web Service

for those that don’t know: a story

Page 3: Web Hooks and the Programmable World of Tomorrow

internetz

User

Web ServiceHi, I’m Twickr,

a new web service.

Page 4: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

Cool. Sign me up.

Page 5: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”Okay, you’re all set. Now listen...

Page 6: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”I might find myself with some

data you might be interested in.

Page 7: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

Alight, hold on a sec...

Page 8: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

hack hackety hack

Page 9: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

Could you just post it here when you have any?

http://tinyurl.com/6pln4u

Page 10: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”...sure, why not.

Hmm, what is that URL?

Page 11: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

It’s a PHP script I putup on Dreamhost.

Page 12: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

What does it do?

Page 13: Web Hooks and the Programmable World of Tomorrow

internetz

User

“Twickr”

Whatever I want...

web hooks are simple http event notifications meant to trigger other web scripts

Page 14: Web Hooks and the Programmable World of Tomorrow

the idea is not new, but not exactly popular. why?paypal has been doing it for ages

Page 15: Web Hooks and the Programmable World of Tomorrow

instant payment notification is a web hook

Page 16: Web Hooks and the Programmable World of Tomorrow

“When a customer pays you, PayPal posts a notification to your server at a URL you specify.”

Page 17: Web Hooks and the Programmable World of Tomorrow

here’s a diagram. they’ve since added anti-spoofing by requiring a validation step. useful pattern, but not core to the idea

Page 18: Web Hooks and the Programmable World of Tomorrow

started thinking about this in 2006.everything flashed before my eyes and was confused why it wasn’t used more.felt like i was taking crazy pills

Page 19: Web Hooks and the Programmable World of Tomorrow

compare to REST.

Page 20: Web Hooks and the Programmable World of Tomorrow

both have been around longer, but the point is rest simpler.. in fact, it’s almost described as “using HTTP properly”but not until it got a name could it be used in discourse to make it popular

Page 21: Web Hooks and the Programmable World of Tomorrow

REST

Hooks

rest and web hooks are two sides of the same cointhey complement each other in ways i’ll get to laterbut i just want to give this pattern a name, and start associating some ideas with it

Page 22: Web Hooks and the Programmable World of Tomorrow

Push

Pipes

Plugins

talk is split into three sectionsways to look at the use of web hooksicons will hopefully make more sense as i talk about them

Page 23: Web Hooks and the Programmable World of Tomorrow

Pushlet’s get started with pushpeople are starting to talk about push in the context of web content

Page 24: Web Hooks and the Programmable World of Tomorrow

because of feeds. or rather, the success of feedsit started with blog feeds, then comment feeds...

Page 25: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 26: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 27: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 28: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 29: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 30: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 31: Web Hooks and the Programmable World of Tomorrow

then soon exploded into twitter feeds, photo feeds, activity feeds, event feeds, bookmark feedseven feeds of feeds

Page 32: Web Hooks and the Programmable World of Tomorrow

it makes you think of feeds like in the telecom world

Page 33: Web Hooks and the Programmable World of Tomorrow

data coming directly to you

Page 34: Web Hooks and the Programmable World of Tomorrow

but we know that’s not how it works

Page 35: Web Hooks and the Programmable World of Tomorrow

?

instead we have to go request the data

Page 36: Web Hooks and the Programmable World of Tomorrow

then it gives it to us. and we do this over and over. are we there yet? are we there yet?

Page 37: Web Hooks and the Programmable World of Tomorrow

?

feeds made sense in a world where feed readers ran on desktops that couldn’t be pushed to over http

Page 38: Web Hooks and the Programmable World of Tomorrow

?

of course, now we have other web applications consuming feeds and it doesn’t make senseeven our feed readers have become web applications

Page 39: Web Hooks and the Programmable World of Tomorrow

evan and kellan gave a great talk about this, and their proposed solution: xmppi have a condensed version of this talk. the slides speak for themselves

Page 40: Web Hooks and the Programmable World of Tomorrow
Page 41: Web Hooks and the Programmable World of Tomorrow
Page 42: Web Hooks and the Programmable World of Tomorrow
Page 43: Web Hooks and the Programmable World of Tomorrow
Page 44: Web Hooks and the Programmable World of Tomorrow
Page 45: Web Hooks and the Programmable World of Tomorrow
Page 46: Web Hooks and the Programmable World of Tomorrow

(aka XMPP)

they have a great point. polling sucks, and xmpp is a pretty good solution for data streams

Page 47: Web Hooks and the Programmable World of Tomorrow

but it’s kind of heavy weight. it does a lot and makes a decently complex little system.luckily it’s not *that* hard to use with today’s library support

Page 48: Web Hooks and the Programmable World of Tomorrow

joshua schachter responded to this talk in a blog post.i don’t know him, but he sounds like a smart guy

Page 49: Web Hooks and the Programmable World of Tomorrow

“One solution that occurred to me at the time was to build a simple callback system over HTTP.This would fall comfortably between full polling and full persistent publish/subscribe.”

i think you’re onto something joshua.i just don’t know about the name PIMP (or even Push RSS really).it *is* a nice place between polling and xmpp pubsub

Page 50: Web Hooks and the Programmable World of Tomorrow

it’s worked for paypal...

Page 51: Web Hooks and the Programmable World of Tomorrow

evan and kellan did point out there are extremes when it comes to data streams.most data streams will probably fall somewhere in between,but i do think xmpp is perfect for the fast and furious end

Page 52: Web Hooks and the Programmable World of Tomorrow

microformats

i’m a fan of microformats. not just in what they do, but how they do it.very ground up, grassroots... take existing popular use-patterns and make it a convention.like web hooks, microformats can be viewed as an alternative to something: xml+rdf

Page 53: Web Hooks and the Programmable World of Tomorrow

“Here's a new language we want you to learn, and now you need to output these additional files on your server. It's a hassle. (Microformats) lower the barrier to entry.”

xml+rdf vs microformats

tantek is a big microformats evangelist. he says....

so i told him about web hooks. “what are they?” “push over http” “how are they diff than xmpp?” “they’re a lightweight alternative”

Page 54: Web Hooks and the Programmable World of Tomorrow

“Good. XMPP needs a competitor.”

xmpp vs web hooks

he says...

this was encouraging. i mean, when tantek talks, you listen...if for no other reason than

Page 55: Web Hooks and the Programmable World of Tomorrow

he gets the chicks

Page 56: Web Hooks and the Programmable World of Tomorrow

started spreading the word as “web hooks” and it started popping up places.this is a standard for discovering and subscribing to content changes.they use both web hooks and xmpp, which is a good sign.good idea, but standard specs alone don’t get very far

Page 57: Web Hooks and the Programmable World of Tomorrow

gnip though. let me tell you about gnip...if we could just figure out what they do...ah, no, they’re on to something

Page 58: Web Hooks and the Programmable World of Tomorrow

Polling

they started with the goal to eliminate polling. Great!

Page 59: Web Hooks and the Programmable World of Tomorrow

but they do a lot in several dimensions, so its hard to explain all that they do.notice they mention web hooks though... so i gotta figure out what they do.

Page 60: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Source Destination

Publisher Consumer

ok. so here’s what i found out. they’re an adaptor for data streams, letting publishers and consumers choose their format, protocol, and mechanism of choicevarious formats, polling or push using web hooks or xmpp (soon).

Page 61: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Source

Publisher Consumer

so for example, i want a digg data stream

Page 62: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Source

Publisher Consumer

they provide in rss over rest, which means polling

Page 63: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Source

Publisher Consumer

but i want web hooks with an atom payload.gnip makes it happen

Page 64: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Publisher Consumer

same thing if twitter provides xmpp notifications, but i have rss polling infrastructure...gnip makes it happen

Page 65: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Publisher Consumer

cases like with friendfeed (which doesn’t actually work with fb)say fb provides atom over rest, but friendfeed doesn’t find that efficient... they want xmppgnip

Page 66: Web Hooks and the Programmable World of Tomorrow

RSSAtomXML

Format

Web HooksXMPP

REST

Protocol + Mechanism

Web HooksXMPP

REST

Protocol + Mechanism

RSSAtomXML

Format

Publisher Consumer

even something as redundant as polling atom on both ends, gnip offloads the polling stress from facebook (and adds filters, etc)

Page 67: Web Hooks and the Programmable World of Tomorrow

Push is good.

so the moral here is that push is good.

Page 68: Web Hooks and the Programmable World of Tomorrow

XMPP is ideal when needed,but Web Hooks generally do the job.

as far as xmpp vs web hooks, i think they both have their place.

Page 69: Web Hooks and the Programmable World of Tomorrow

But push is not the point.

so far, push has been about pushing content. this is not that interesting to me. i like functionality. and as simple as web hooks are, they have something xmpp doesn’t:simple code triggering

Page 70: Web Hooks and the Programmable World of Tomorrow

Pipesi love this photo. even more than the cute kid pushing the car

Page 71: Web Hooks and the Programmable World of Tomorrow

there once was a command linenav filesystem, launch apps, scripting environment.but it had an extra something special: pipes. letting you combine applications

Page 72: Web Hooks and the Programmable World of Tomorrow

Program

Input Output

all from a bit of infrastructure involving input and output

Page 73: Web Hooks and the Programmable World of Tomorrow

Program

STDIN STDOUT

STDERR

stdin, stdout were available to reroute wherever the user wantedmost common use was chaining commands together: piping

Page 74: Web Hooks and the Programmable World of Tomorrow

cat

xargs

wc

mailecho

grep

wget

so you had all these simple little programs, that might not even be useful alone

Page 75: Web Hooks and the Programmable World of Tomorrow

cat

xargs

wc

mailecho

grep

wget

string them together...

Page 76: Web Hooks and the Programmable World of Tomorrow

grepcat

xargs

wc

mailecho

wget

Page 77: Web Hooks and the Programmable World of Tomorrow

mailgrepcat

xargs

wc

echowget

and you have something more useful than the sum of the parts

Page 78: Web Hooks and the Programmable World of Tomorrow

Write programs to work together.

Write programs that do one thing and do it well.

Write programs that handle text streams, because that is a universal interface.

this helped put forth the unix philosophy

Page 79: Web Hooks and the Programmable World of Tomorrow

Program

STDIN

but it doesn’t work without the output. it just breaks.

Page 80: Web Hooks and the Programmable World of Tomorrow

Web App

API

unfortunately that’s how the web is today. we can talk to web apps, but they really can’t talk to us. or anything else really.

Page 81: Web Hooks and the Programmable World of Tomorrow

Web App

API Events

it’s not that they can’t, they just don’t. we need to start placing event hooks in.

Page 82: Web Hooks and the Programmable World of Tomorrow

Web App

REST Hooks

those roles are best played by mechanisms that use the protocol the web is built on

Page 83: Web Hooks and the Programmable World of Tomorrow

backhoe

Page 84: Web Hooks and the Programmable World of Tomorrow

+

front-loader + excavator

Page 85: Web Hooks and the Programmable World of Tomorrow

Basecamp

mailgrepcat

so we want to combine web applications like we can CLI programs.get more than the sum of the parts. web hooks open up this possibility, but need like APIs, need to be implemented

Page 86: Web Hooks and the Programmable World of Tomorrow

Basecamp

imagine basecamp with a bunch of hooks for events

Page 87: Web Hooks and the Programmable World of Tomorrow

Basecamp

Project finished

Todo completed

Milestone created

Contact added

File uploaded

Page 88: Web Hooks and the Programmable World of Tomorrow

Basecamp

My handlerhttp://example.com/handler

users can write handlers that are just web scripts. they have a url, and thats what you give basecamp

Page 89: Web Hooks and the Programmable World of Tomorrow

Basecamp

My handlerhttp://example.com/handler

it’s code. it can do anything from there. integrate with other services, make a phone call, order pizza, whatever

Page 90: Web Hooks and the Programmable World of Tomorrow

Basecamp

Todos

for example, all these apps share data about todos. they each have respective specialized talents,but all work with todos. by putting hooks on todo CRUD, you can use their apis to keep them synced pretty well. magically. real-time.

Page 91: Web Hooks and the Programmable World of Tomorrow

Service integration

web hooks enable service integration

Page 92: Web Hooks and the Programmable World of Tomorrow

Composability

adding composability to web apps

Page 93: Web Hooks and the Programmable World of Tomorrow

Code as glue

based on the idea that web urls can run code. and code can do anything.

Page 94: Web Hooks and the Programmable World of Tomorrow

when i first thought about this, cheap PHP hosting was all over, but it could be even simpler.there are paste bins like this one. made to share formatted code with people over IRC or email

Page 95: Web Hooks and the Programmable World of Tomorrow

put in some code you want to share or ask a question about

Page 96: Web Hooks and the Programmable World of Tomorrow

http://pastie.org/84826

hit save and you get a URL you can share when you ask “where’s the data stored?”

Page 97: Web Hooks and the Programmable World of Tomorrow

i’m thinking of the same thing, but that you write handlers with

Page 98: Web Hooks and the Programmable World of Tomorrow

http://pastie.org/run/24576

and saving doesn’t just give a url to view, but to run. pass that url into an app with web hooks

Page 99: Web Hooks and the Programmable World of Tomorrow

Basecamp

Project finishedhttp://pastie.org/run/24576

for example, basecamp. now when you finish a project, everybody meets for shots in the break room.

Page 100: Web Hooks and the Programmable World of Tomorrow

fortunately, we have this. it’s called appjet by ex googlers.

Page 101: Web Hooks and the Programmable World of Tomorrow

just hit a button, write code, hit save, share the url. it’s javascript

Page 102: Web Hooks and the Programmable World of Tomorrow

obviously app engine, although it’s a little more involved than appjet for quick handlers.but it is an option for python.and there are ruby/rails hosts like heroku

Page 103: Web Hooks and the Programmable World of Tomorrow

one thing i’ve been working on is an extension to integrate these ideas.

Page 104: Web Hooks and the Programmable World of Tomorrow

Hey, there’s an event hook here!

by detecting some markup in a page, it discovers hooks. like say for new photos from contacts.you want to do something when that happens, click it

Page 105: Web Hooks and the Programmable World of Tomorrow

Save

and write some code. hit save, it posts to AppJet (or wherever), registers the handler (assuming a standard protocol), and done. all inline.go back and change the code.

Page 106: Web Hooks and the Programmable World of Tomorrow

Real world examples

but these are all mockups and what-ifs... there is a world of web hooks already evolving...

Page 107: Web Hooks and the Programmable World of Tomorrow

i started by exposing svn hooks as web hooks in devjavu

Page 108: Web Hooks and the Programmable World of Tomorrow

i talked about web hooks enough using pbwiki as an example, their mysterious cto decided to implement them

Page 109: Web Hooks and the Programmable World of Tomorrow

and apparently really liked what he found

Page 110: Web Hooks and the Programmable World of Tomorrow

went all out on hooked events. not sure if it’s made it to production, but really cool

Page 111: Web Hooks and the Programmable World of Tomorrow

github though. they had a push hook. in fact, they linked to my blog post from their homepage for a long time.

Page 112: Web Hooks and the Programmable World of Tomorrow

they’ve been doing really well with web hooks. we’ll come back to them...

Page 113: Web Hooks and the Programmable World of Tomorrow

“Building projects with web hooks in mind lets me keep the core Lighthouse source focused, while external services live in their own libraries.”

--Rick Olson

from there the idea silently spread to other rails guys.rick olson used them in lighthouse

Page 114: Web Hooks and the Programmable World of Tomorrow

“We implemented web hooks a while ago and people have been building all sorts of unexpected stuff on top of it.”

--Tobias Lütke

tobias used them in shopify. i’m told he’s revamping their api to have more hooks

Page 115: Web Hooks and the Programmable World of Tomorrow

and back to github. they were so successful with the adhoc integration, they formalized it.but in the best way! using their existing web hook infrastructure. they just have modules running in a separate but local web service.

Page 116: Web Hooks and the Programmable World of Tomorrow

in fact, that lets them open source it. letting people fork, write new handlers, and push back.this is probably going to be the standard model of service integration.

Page 117: Web Hooks and the Programmable World of Tomorrow

and a great example of services integrated with github, besides lighthouse, is runcoderun.they run your regression tests for you. continuous integration in the sky. love it.they sign you up automatically if you put their hook in github.

Page 118: Web Hooks and the Programmable World of Tomorrow

then there’s martyn and andy. two guys in the uk that love web hooks.they built this thing called spaghetti junction at a hackday. it involved into...

Page 119: Web Hooks and the Programmable World of Tomorrow

switchub. i REALLY love this. i knew this sort of thing would emerge, but i didn’t think it would happen until web hooks were more popular. kind of like the pastinbin code runner, they let you create hook inputs with urls to put in apps that you can route to various output handlers: email, irc, etc

Page 120: Web Hooks and the Programmable World of Tomorrow

my example switchboard. this kind of feels like gnip, only more focused and more about web hooks. so i like it lots.

Page 121: Web Hooks and the Programmable World of Tomorrow

opening handlers up like github. anybody can write handlers soon.working with them a little to make it real awesome.

Page 122: Web Hooks and the Programmable World of Tomorrow

for example, i suggested rss as an input, but that would require polling. well distribute it!let somebody like rssfwd implement hooks and use them. wow, what other services could you build around switchub?

Page 123: Web Hooks and the Programmable World of Tomorrow

switchub is more of how i envisioned piping on the web.yahoo pipes was a great experiment, but it’s not real pipes. no integration. only aggregation.

Page 124: Web Hooks and the Programmable World of Tomorrow

i visualize it more like this. reason: virtual rack mounts

Page 125: Web Hooks and the Programmable World of Tomorrow

flip it around and wire them together however you like. totally cool.

Page 126: Web Hooks and the Programmable World of Tomorrow

and of course i mentioned paypal. but i should mention, web hooks make so much sensefor paypal... they’re not so much about pushing content, but INTEGRATING. that’s whatweb hooks are great for, even though they can be used for content push.

Page 127: Web Hooks and the Programmable World of Tomorrow

jott is another example of a web hook implementer that doesn’t know it. they parse voice over the phone and do stuff with it, like post to twitter, etc

Page 128: Web Hooks and the Programmable World of Tomorrow

they do it with “Links”... which are just hooks. they post to a script that does something with the parsed text. really cool for todos.

Page 129: Web Hooks and the Programmable World of Tomorrow

User jotts toa Jott Link

The message isconvertedinto text

Message is sent viaHTTP Post to a

web page

Jott reads back theresponse and sendsit via SMS & SMTP

User receivesinformation back

here’s their diagram. totally web hooks.

Page 130: Web Hooks and the Programmable World of Tomorrow

so, thinking back to switchub, and like jott, there’s a lot of cool ideas for something to web hook services. I made mailhook to parse incoming email and trigger scripts to handle it. very useful.

Page 131: Web Hooks and the Programmable World of Tomorrow

GAE community made one because GAE doesn’t have a way to accept email. web hooks were the obvious solution.

Page 132: Web Hooks and the Programmable World of Tomorrow

rick olson has an open source non-hosted ruby version that will do xmpp.he uses it for lighthouse.

Page 133: Web Hooks and the Programmable World of Tomorrow

but smtp2web is interesting because it was made because of the limitations of GAE...

Page 134: Web Hooks and the Programmable World of Tomorrow

in fact a lot of people made these kinds of “micro webservices” to do simple things GAE didn’t do.

Page 135: Web Hooks and the Programmable World of Tomorrow

http://movq.net

here’s a couple from a site i found. they have a cool cron service ... should be useful in the web hooks ecosystem

Page 136: Web Hooks and the Programmable World of Tomorrow

making things more web friendly... working with lisa dussault to make a IMAP to REST bridge...

Page 137: Web Hooks and the Programmable World of Tomorrow

this makes working with email mailboxes way easier in the context of the web

Page 138: Web Hooks and the Programmable World of Tomorrow

it’s neat to see it in netnewswire. looks like mail.app

point is to make more protocols easier to work with from web scripts in fairly limited environments... because there will be more of them as the cloud grows

Page 139: Web Hooks and the Programmable World of Tomorrow

Write services to work together.

Write services that do one thing and do it well.

Write services that interact with HTTP, because that is simple + ubiquitous

...and it’s already in your stack.

but these micro webservices are like the tiny CLI programs that aren’t very useful by themselves. but they need a means to interact with other apps, and web hooks have been the obvious solution. so i’d like to start pushing these tenets, similar to the unix philosophy

Page 140: Web Hooks and the Programmable World of Tomorrow

jon udell talks about websites as data sources that can be reused and remixedtoday that idea isn’t very novel

Page 141: Web Hooks and the Programmable World of Tomorrow

“a new programming paradigm that takes the whole Internet

as its platform”

he envisions the Internet (and I’ll say the web) as a programming paradigm. i’d say also an OS, but that’s for another time. but it won’t be true until apps are composable and easily integratable.

Page 142: Web Hooks and the Programmable World of Tomorrow

that’s the future i see though.

Page 143: Web Hooks and the Programmable World of Tomorrow

Pluginsthere’s one more thing i want to talk about.

Page 144: Web Hooks and the Programmable World of Tomorrow

web was a bunch of pages linked together.

Page 145: Web Hooks and the Programmable World of Tomorrow

but people kept wanting to access other things through the web (like me today)

Page 146: Web Hooks and the Programmable World of Tomorrow

so they developed cgi

Page 147: Web Hooks and the Programmable World of Tomorrow

tangent: this is a neat find. was on reddit. andreessen proposing IMG tag.people fought it, said it needed to be more generalized.he just put it on mosaic and that was that

Page 148: Web Hooks and the Programmable World of Tomorrow

so these pages... today... because of cgi

Page 149: Web Hooks and the Programmable World of Tomorrow

are actually the result

Page 150: Web Hooks and the Programmable World of Tomorrow

of these higher order nodes... the code... the apps. this is most of the web today. neat how that evolved

Page 151: Web Hooks and the Programmable World of Tomorrow

so you have these applications

Page 152: Web Hooks and the Programmable World of Tomorrow

and the difference you might think is backend and frontend.but there is a subtly different way to think about it

Page 153: Web Hooks and the Programmable World of Tomorrow

ContentLogic

logic and content. the read-write web gave us user contributed content...i want user contributed (democratized) logic.

Page 154: Web Hooks and the Programmable World of Tomorrow

ContentLogic

not just integrating and composing apps

Page 155: Web Hooks and the Programmable World of Tomorrow

ContentLogic

but extending apps...

Page 156: Web Hooks and the Programmable World of Tomorrow

almost called this section Platforms.platforms are really cool. we all love them.i LOVE them, so fb platform was really cool.asked a friend how it worked. he said “web hooks”

Page 157: Web Hooks and the Programmable World of Tomorrow

sure enough, this looks like web hooks to me. as long as it’s http, calling out... but then using the results in their app? thats different...

Page 158: Web Hooks and the Programmable World of Tomorrow

in fact a few people have used web hooks for plugins. dabble is a great example.

Page 159: Web Hooks and the Programmable World of Tomorrow

they do online databased for people that use excel as a database.

Page 160: Web Hooks and the Programmable World of Tomorrow

their plugin API is great. it uses web hooks!

Page 161: Web Hooks and the Programmable World of Tomorrow

“Dabble plugins allow Dabble applications to create new, derived fields by calling out to external HTTP-accessible applications. This solves the problem of safely enabling

extension of a centrally-located hosted application, in that, while you’re writing code to extend and enhance the behavior of a Dabble application, your code never

actually runs inside Dabble.”

[General]Name = Amazon Sales Rank

[Sales Rank by ISBN]URL = http://chadfowler.com/dabble/amazon_sales_rank.cgiInput = TextOutput = Number

only they have an extra layer for meta data. but that’s a cool pattern.

Page 162: Web Hooks and the Programmable World of Tomorrow

“If you’ve used a UNIX-based operating system, you’re probably familiar with the notion of pipes. The output of one program is piped into the input of another, creating a filter chain. This is conceptually the same as the way Dabble’s plugin IO works.

Nice and simple.”

of course, they compare it to pipes. the simplicity. the natural fit of it.

Page 163: Web Hooks and the Programmable World of Tomorrow

of course, i think they should have web hooks for all their standard CRUD events... this way their database apps can integrate (like PayPal) with the rest of your workflow

Page 164: Web Hooks and the Programmable World of Tomorrow

in fact, all these “app platforms” like coghead and salesforce should have web hooks.that would make them more useful, less silo’d off into just processing data in their world

Page 165: Web Hooks and the Programmable World of Tomorrow

here’s a little microplatform i made last month.a twitter bot platform using web hooks.in fact, i built it with web hooks... using mailhook and appjet.

Page 166: Web Hooks and the Programmable World of Tomorrow

here’s the code.

Page 167: Web Hooks and the Programmable World of Tomorrow

you just register hooks, give them a name, and DM tdo with the command and arguments.

Page 168: Web Hooks and the Programmable World of Tomorrow

IMified uses web hooks. sells the tech too: “allows anyone with basic web programming skills to quickly and easily create ...”

Page 169: Web Hooks and the Programmable World of Tomorrow

General SystemsTheory

close by dropping some GST on you

Page 170: Web Hooks and the Programmable World of Tomorrow

General SystemsTheory

central tenet is value is not in the elements or parts of a system

Page 171: Web Hooks and the Programmable World of Tomorrow

General SystemsTheory

the real value is in the interactions, how they work together. this creates the emergent phenomenon of a system, and defines its behavior

Page 172: Web Hooks and the Programmable World of Tomorrow

Degrees of freedom

increase the ways to work together, the means of combination, increases the DoF

Page 173: Web Hooks and the Programmable World of Tomorrow

Increase possibility space

uncover new opportunities in business, tools, and empowerment

Page 174: Web Hooks and the Programmable World of Tomorrow

“a new programming paradigm that takes the whole Internet

as its platform”

sounds cool

Page 175: Web Hooks and the Programmable World of Tomorrow

Web APIs

half way there

Page 176: Web Hooks and the Programmable World of Tomorrow

Web APIsWeb Hooks

not hard to go the rest of the way

Page 177: Web Hooks and the Programmable World of Tomorrow

http://flickr.com/photos/nikonfans/439432049/http://flickr.com/photos/omegaman/477866054/http://flickr.com/photos/aquan/2780542698/http://flickr.com/photos/lucky_13/191038503/http://flickr.com/photos/narwhal85/1290912011/http://flickr.com/photos/thomashawk/521532598/http://flickr.com/photos/bendodson/2601002535/http://flickr.com/photos/ntr23/218966763/

[email protected]