David Barbour wrote:
On Sun, Feb 26, 2012 at 8:17 AM, Adam Chlipala <[email protected] <mailto:[email protected]>> wrote:

           It's easy to start a server process with an arbitrary
        number of OS
           threads to handle client connections, and they all run in
           parallel.  There is also support for periodic tasks, which
        run in
           their own threads, alternating between sleeping N seconds and
           running single transactions.


        That would probably be sufficient for my purposes, if not
        ideal. But I think it wouldn't take much extra effort to add
        some way for client code to signal the periodic tasks, to
        avoid polling, if I did take that route. Via channel, perhaps.


    I don't understand what deficiency you're pointing to, but the
    usual combination of RPCs and message-passing might already do
    more than you're thinking.


I need latencies in milliseconds, not `N seconds`, for most of the web apps I want to build (e.g. teleop of robots). Polling is among the very worst software engineering tactics for low latency operations that effect low-frequency changes. There might be some clever way to combine RPCs and message passing to achieve what I need, but will it meet my timing concerns?

I don't think you need to be very clever to do what you want with RPCs and message-passing. Don't worry; there is no per-event polling involved. (I'm not suggesting you use periodic tasks at all for this sort of thing.) If you look at the demos of message-passing (these are the last few in the main demo site), either (a) it should quickly become very clear how it can work for you or (b) you can point out documentation problems that prevent it from becoming clear. :)

Something like http://jsfiddle.net/jashkenas/CGSd5/, with a tunable number of elements in a page, might be useful to demonstrate animation of your reactive system. The latency question could be answered by animating, say, the motion of a mouse pointer through the server across frames.

In the design of Ur/Web, I haven't focused on "animation" at all, but rather on conventional page content trees that evolve in response to events. I don't think the current Ur/Web supports "animating mouse pointer motion" in any way that is at all pleasant without using the JavaScript FFI.

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to