[Haskell-cafe] Reactive config file generation

David Turner dct25-561bs at mythic-beasts.com
Sat Aug 15 09:48:10 UTC 2015

Hi all,

I am using Apache Zookeeper as a service directory: I have a bunch of
services which announce their presence by making nodes in Zookeeper, so
that dependent services can update their configuration to make use of the
available services, and stop trying to use services that have died.

Zookeeper is a pretty nice fit for this because it supports watching a node
for changes, so in theory there is no need to poll Zookeeper periodically.
The services that I control work with this just fine, but there are some
(e.g. an Nginx reverse-proxy) that are reconfigured using the rather more
common approach of updating a file (or files) and then sending the process
a signal. I am currently pondering how to make this work without polling,
or manually triggering a refresh script, which is how it is currently done.

I've never used FRP, but am at least vaguely aware of it and from my
high-level understanding it seems like this could be a very good fit. The
Zookeeper state is a time-varying value which I want to convert into a
time-varying set of files, ideally as declaratively as possible.

So, two questions to the FRP congnoscenti out there. Firstly, is it
worthwhile to attempt this using FRP at all? I'm sure I could do it by hand
too. Secondly, which of the many FRP libraries would you recommend for it?
There are loads on the Wiki, seemingly in various states of repair and
documentation. Any pointers on how to choose one that's featureful enough,
performant enough, and being actively maintained?

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150815/f895283c/attachment.html>

More information about the Haskell-Cafe mailing list