ruote as a webhooks engine

2 views
Skip to first unread message

orlin

unread,
Jun 22, 2009, 7:59:00 AM6/22/09
to Ruote (OpenWFEru) users
Hi John,

Here's the thread on the webhooks group
http://groups.google.com/group/webhooks/browse_thread/thread/1003252bf8fca085

Where is the place to find the various (already implemented)
listeners / participants?

As far as polling - what do you think about an EventMachine proxy?
Just caught up with some of the GoGaRuCo talks (esp. Building Custom
Web Proxies in Ruby)...

http://gogaruco.com/downloads/Wrap2009.pdf (page 12)
http://pivotallabs.com/talks/55-building-custom-web-proxies-in-ruby
http://www.slideshare.net/igrigorik/ruby-proxies-for-scale-performance-and-monitoring-gogaruco-igvitacom-1396734

Something like em-ruote-proxy or em-ruote-hooks - to make ruote more
immediately useful for webhooks? It could simplify ruote for webhooks
use (like an openweb api adapter) or at least do the polling for the
latency-sensitive hooks (those that are tied to a UI).

So there is ruote-kit coming... How soon could that be? Any overlap
with the webhooks / polling stuff. Would it include openid / oauth
(similar to cloudkit)?

Best,

Orlin

John Mettraux

unread,
Jun 22, 2009, 11:06:04 AM6/22/09
to openwfe...@googlegroups.com
On Mon, Jun 22, 2009 at 8:59 PM, orlin<orlin...@gmail.com> wrote:
>
> Here's the thread on the webhooks group
> http://groups.google.com/group/webhooks/browse_thread/thread/1003252bf8fca085

Hi Orlin,

thanks, I've subscribed to the list, neat.

> Where is the place to find the various (already implemented)
> listeners / participants?

You can find the documentation about participants at :

http://openwferu.rubyforge.org/participants.html

Their source is at :

http://github.com/jmettraux/ruote/tree/5348d68477c619f29e89032a1e3efae889f5722c/lib/openwfe/participants
http://github.com/jmettraux/ruote/tree/5348d68477c619f29e89032a1e3efae889f5722c/lib/openwfe/extras/participants

The ruote 2.0 participants are incubating at :

http://github.com/jmettraux/ruote/tree/c11afe2670cfecfe3d6d5cb3d6c10f76c6d63882/lib/ruote/part

The listeners have unfortunately no dedicated doc page, but their source is at :

http://github.com/jmettraux/ruote/tree/5348d68477c619f29e89032a1e3efae889f5722c/lib/openwfe/listeners
http://github.com/jmettraux/ruote/tree/5348d68477c619f29e89032a1e3efae889f5722c/lib/openwfe/extras/listeners

There is a piece of doc that takes the big view on participants +
listeners, but it's not yet complete :

http://openwferu.rubyforge.org/part.html


Just for the fun, I wrote a webhook participant that posts to a URL
(given via the workitem), (it's ruote 2.0 ish) :

http://gist.github.com/134006

Here is a target for a hook (maybe I'm getting it wrong, but it's
midnight for me) :

http://gist.github.com/134009

It's sinatra-ish, it launches a process instance based on the info
found on the body of a post. This somehow stands for a listener
example. If you're interested, I can show you an example of a listener
that instead of launching new process instance, resumes an already
existing one, and later correlation.


> As far as polling - what do you think about an EventMachine proxy?
> Just caught up with some of the GoGaRuCo talks (esp. Building Custom
> Web Proxies in Ruby)...
>
> http://gogaruco.com/downloads/Wrap2009.pdf (page 12)
> http://pivotallabs.com/talks/55-building-custom-web-proxies-in-ruby
> http://www.slideshare.net/igrigorik/ruby-proxies-for-scale-performance-and-monitoring-gogaruco-igvitacom-1396734
>
> Something like em-ruote-proxy or em-ruote-hooks - to make ruote more
> immediately useful for webhooks?  It could simplify ruote for webhooks
> use (like an openweb api adapter) or at least do the polling for the
> latency-sensitive hooks (those that are tied to a UI).

All of this is excellent. But somehow as I'm busy rewriting ruote from
scratch, maybe that last mile is up to you to walk ;

I'm building ruote in Ruby since I know smart guys like you will do
that last mile and since they're smart, they know how to walk and what
shoes fit them, and with Ruby, it's easy to just throw away (and
rewrite) and old pair (the segway/ruote is disposable as well :) )

Kenneth in production is using Curb (http://curb.rubyforge.org/) to
stress his ruote-rest farm.


> So there is ruote-kit coming...  How soon could that be?  Any overlap
> with the webhooks / polling stuff.  Would it include openid / oauth
> (similar to cloudkit)?

You'd have to ask to Kenneth, he's busy working on daemon-kit
(http://github.com/kennethkalmer/daemon-kit/) right now. Maybe you
could pair with him. The cloudkit is an excellent piece of software.


Glad to help, best regards,

--
John Mettraux - http://jmettraux.wordpress.com

orlin

unread,
Jun 28, 2009, 10:39:20 AM6/28/09
to Ruote (OpenWFEru) users, webh...@googlegroups.com
Hi guys,

I could have done my research a little better. Kenneth's ruote-kit
seems like exactly what I'm looking forward to.

Hooks are in the nature of ruote's "real" / external participants,
aren't they? With ruote-kit being a restful http service we've got
the http-in. Shouldn't it be able to http-out as well? Without
requiring a ruote-http gem (the non-proliferation point). It seems to
me ruote-kit is going to be fit for webhooks anyway :)

Wouldn't you want priority for the workitems? Perhaps a couple of
queues - one for _asap_ and one for _whenever_. Some protocols and
type of use (e.g. XMPP or AMQP) may often need better response time
than let's say email notifications, but explicitly requesting it could
be part of the DSL. Perhaps several levels, because it could be
something people pay for - priority processing for whoever needs /
deserves it most. And if ruote2 does have to be polled, it could be
done with ruote-kit rather than yet another layer (e.g. ruote-
hooks?). Enentmachine is already required by daemon-kit...

You are probably much better informed than me, but I'll mention a
couple of libs just in case. As far as the http calls - there's
http://github.com/pauldix/typhoeus - to make things less blocking...
And for storage, we could use http://github.com/wycats/moneta (that
also speaks tokyo among a wide variety of stores) - is just a hash
good enough?

Reading through ruote-kit's notes, let me ask about a couple of
points. Isn't rails already on rack and if so what's the
"complementary" gem for hooking into rails about? Also: completely
restful, but without all the lingo?

Thanks for the flattery about being smart. I don't think I'm as smart
as you, certainly less experienced. I just have a use case, using
ruote for hooks, and don't know what "walking the last mile" would be
like. Seems like you plan to walk it anyway ;) I'm not in a big
hurry. I could use a development version in September / October.
Planning a production release for December.

Something caught my eye though, in the ruote-kit notes again, that I
could contribute to. A site to share process definitions. It can
also be a store to sell or rent process definitions that hook into 3rd
party services. The webhook extensions / plugins. Something that
combines with ruote-kit and makes processes available based on openid,
oauth, etc. I feel more capable of doing this than messing with
ruote's internals...

Best,

Orlin
Reply all
Reply to author
Forward
0 new messages