[Catalyst] Implementing Webhooks.

Tomas Doran bobtfish at bobtfish.net
Wed Jan 15 20:12:24 GMT 2014

My take on this is to log things into ZeroMQ (via Message::Passing), and ro=
ute them to Message::Passing::Output::WebHooks - the code for that output m=
ight not be as bullet proof as you=92re looking for, but it should be a rea=
sonable starting place.

I=92d probably go right ahead and implement the timeout in that output for =
a first take - you=92d lose anything which was waiting in a retry interval =
as and when you restarted the hook server, but that would presumably be ver=
y infrequently, and if you had _lots_ of timeouts, it could use a lot of RA=
M.. But depending upon that scale / relaibility you actually need both of t=
hese things might be just fine.


On Jan 15, 2014, at 7:28 PM, Bill Moseley <moseley at hank.org> wrote:

> I'm running Catalyst under mod_perl2 (currently, subject to change).   So=
me requests trigger a callback to a user-provided URL -- a webhook.
> =

> Obviously, it's best to do those asynchronously and not in-process.   Don=
't want a web request (or really an Apache process) hanging while waiting o=
n an external web server to respond.
> =

> A queue is probably the best approach, but there's also some advantage of=
 having the Catalyst app make the webhook request -- specifically because t=
he Catalyst app has the context of the request and has application logging =
available. =

> =

> How would you implement this?
> =

> =

> How would that change if you wanted more than just "fire-and-forget"?  Fo=
r example, if you wanted to provide some kind of retry interval for failed =
callbacks. The external server might be temporarily down for maintenance.
> =

> =

> Thanks,
> =

> =

> -- =

> Bill Moseley
> moseley at hank.org
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
> Dev site: http://dev.catalyst.perl.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20140115/5abcb=

More information about the Catalyst mailing list