Web Hooks On Pbwiki

8,699 views

Published on

SHDH23 presentation about web hooks - lightweight event-triggered web plumbing

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,699
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
74
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Web Hooks On Pbwiki

  1. Near-Real-Time, Simple awesomeness Web Hooks nathan@pbwiki.com coming soon!
  2. Recall From SHDH 17 Jeff Lindsay’s “Web hooks” lightning talk • RSS relies on polling. • Polling is lame. • Syndication and (re)publishing, not triggering
  3. Recall From SHDH 17 Jeff Lindsay’s “Web hooks” NO lightning talk • Often n consumers. • Not 1000n. • Polling is still lame. (for some things) • Are we there yet? • Are we there yet? • Are we there yet?
  4. Recall From SHDH 17 Jeff Lindsay’s “Web hooks” lightning talk • Event-driven. • Lightweight. • POST to a URL.
  5. Recall From SHDH 17 Jeff Lindsay’s “Web hooks” OLD LOGO lightning talk • Event-driven. • Lightweight. • POST to a URL.
  6. Web hooks in practice //something ... hook_trigger(‘viewpage’); //more stuff.. async async while(1) { while($queued = $q->get(‘async-queue’)) { post_to_url($queued[‘url’],$queued[‘postargs’]); } }
  7. Web hooks in practice Example hooked events • login/logout • edit a page • revert a page • delete a page • comment on a page • tag/untag pages • join/unjoin wiki • return_after_absence • view_for_first_time
  8. Web hooks in practice
  9. Web hooks in practice
  10. Web hooks in practice
  11. Web hooks in practice
  12. Web hooks in practice
  13. I want this to exist: Trigger Filter Branch/Merge Transform Route $page =~ $to = $msg = out_aim($to,$msg) /deploy/i [‘devel@’,ops@’] fmt_to_aim($attrs) $uid == $to = @all_sms; $msg = out_sms($to,$msg) da39a3ee5e6b4b unset($to[$uid]); fmt_to_sms($attrs) incoming web hook $msg = “Wow $viewcount == 100 $to = $emails[$uid] out_email($to,$msg) you’re a power user” $to = [‘http://my.com/’, $op == ‘edit’ $msg = $attrs out_hook($to,$msg); ‘http://twittr.com/me’] = awesome but only polling (RSS)

×