[Ur] Ur/Web & RDP

Adam Chlipala adamc at impredicative.com
Sun Feb 26 11:17:39 EST 2012


David Barbour wrote:
> I've been studying Ur and Ur/Web further since my comment a few days 
> past. I think I could go ahead with it - the framework would be no 
> more awkward in Ur than in Haskell, at least. But the integration 
> would probably compromise some of Ur's features, especially your use 
> of `known(Foo)` due to indirection through a shared signal/triggering 
> framework for the reactive updates.

I don't advise using any feature related to 'known' in production code 
anyway.  That function is associated with an experimental feature that 
is turned off by default.

>     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.

>         How efficient is the generated JavaScript code?
>
>
>     It's not at all tuned for maximum performance, but it's generally
>     worked out well for me so far, on recent machines/browsers.
>
>
>
> It might be worth researching a few hand-tuned open JavaScript 
> libraries to get performance and efficiency benefits, both for the 
> reactive GUI code (e.g. Backbone) and the sockets aspects (e.g. 
> Socket.IO). At least, if you're interested in supporting 
> high-performance web-apps. Generating high performance client code is 
> just as important as your server-side code, IMO.

I'd be interested to see an example demonstrating an insurmountable 
client-side performance problem with an Ur/Web app running on a recent 
browser version on a recent generation of machine.  Right now, I'm not 
convinced there's any serious issue.



More information about the Ur mailing list