[Ur] Ur/Web & RDP

David Barbour dmbarbour at gmail.com
Thu Feb 23 17:41:54 EST 2012


I'm very interested in Ur as a platform for a new (from 2010) impure
declarative programming model called `Reactive Demand Programming` (RDP).

Impurity in RDP is due to observer effect, i.e. the set of `demands` for a
signal can influence the signal. This supports implicit resource control
(e.g. only power on a camera when someone is observing it). Demands are
very RESTful and declarative in nature, and may themselves change as a
function of observations. The resulting programming experience promises to
be similar to temporal concurrent constraint programming. The impurity,
constrained by secure references, also makes RDP more suitable than most
reactive programming models for open composition.

RDP is designed to scale from embedded real-time systems (highly
predictable latency and space overheads, per connection) up to
orchestration of distributed  systems (clean disruption, quick and
consistent recovery, graceful degradation, easy mirroring, object
capability security, local GC only).

My interest in Ur/Web is to support web apps very early in my development.
I'd prefer, these days, to create a WebGL app than an OpenGL app. I would
like to create a variety of reactive web apps - wikis, IDEs,
parsers, linkers and compilers, mind maps, databases with live queries,
command and control software.

I'm curious how well Ur/Web will support me in my endeavors.

Are there any existing reactive models for Ur/Web? Arrows models? Adam
Megacz's generalized arrows?

If I do model generalized arrows, would it be easy to create something like
the Haskell `proc` syntax for pointy programming? (Point-free programming
is often sufficient, but is sometimes inconvenient.)

RDP doesn't require general dependent types, but it would be very useful to
represent `logical latency` in composition of certain types, or at least to
constrain by it. Would this be feasible with the metaprogramming facilities?

Would it be difficult to upgrade an Ur/Web application at runtime? I.e.
support for staging, runtime compilation, specialization? I'd like the
server itself to be reactive, ultimately, and to support a lot of live
programming.

Does Ur support server-side parallelism? Is it easy to model long-running
processes and interact with them? What about client-side parallelism?

RDP requires some non-traditional shared state models, especially to
resolve concurrent interaction with state. Ur/Web focuses on SQL with its
arbitrary serialization of updates, but would there be anything preventing
alternative state models?

How much of the client-side program is validated? Any support for type-safe
WebGL? or WebSockets? Or video?

I saw mention of AJAX and COMET, but I haven't looked much into it yet.
Would it be difficult to write a web-app that uses WebSockets for server
push, when they are available, and falls back to the more hackish
mechanisms otherwise?

How efficient is the generated JavaScript code?

Regards,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20120223/43ca299a/attachment.html>


More information about the Ur mailing list