[reactive] FRP, continuous time and concurrency

Álvaro García Pérez agarcia at babel.ls.fi.upm.es
Mon Jun 8 11:50:43 EDT 2009


Hello,

I'm trying to implement something like the Observer pattern in a functional
setting. Some people told me that maybe I will find what I want in FRP. The
Observer pattern enforces the propagation of changes in the subject to the
observers, but in a way where concurrency is not considered, through the
notify-update mechanism. Time is not considered because the updating methods
are invoked in a synchronous way. Other way to say it is that time is a
discrete value which is incremented by one with any subject change and the
observers use a pooling strategy in every instance of time. The subject and
the observers operate in the same thread.

As far as I've seen (but I'm not sure if I'm right) FRP models behaviours
and time as continuous entities (although practical implementations use
discrete time and discrete sampling in event detection). You must represent
the time explicitly and concurrency is used to model behaviors and events.
Is there any interpretation of FRP without using concurrency? Can the time
be modeled in a discrete fashion (as described for the Observer pattern)? I
didn't find any example of that. Is it possible to model something like the
Observer patern using the standard FRP conventions? Are these situations
inside the aims of FRP?

I think the Observer pattern and FRP are related somehow, but I cannot
figure out how is this.

Alvaro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/reactive/attachments/20090608/c4749e23/attachment.html


More information about the Reactive mailing list