[Ur] Strategy - UrWeb Backend

Adam Chlipala adamc at impredicative.com
Tue Dec 7 20:10:32 EST 2010


Marc Weber wrote:
> Excerpts from Adam Chlipala's message of Wed Dec 08 01:03:42 +0100 2010:
>    
>> I find it hard to believe that it doesn't matter if a web application
>> server uses several times more memory than it needs to, but maybe we
>> really have come to live in a world that crazy. ;)
>>      
>    Yes - we do. Imagine a server running PHP. Imagine each query to take
>    100ms (which is the average time it takes PHP servers to server pages
>    which have been written minimizing dev time).
>    Now imagine that each customer visits about 20 pages each day. Let's
>    assume you have only one "rush hour per day".
>    This still means that you can serve:
>
>    60min * 60sec/min * 10 pages/sec / 20 (pages/customer)  = 1800 customers !
>
>    And if you have 18000 customers within one hour .. then you're lucky.
>    

Your example is only talking about processing time, while I was talking 
about memory, so this explanation doesn't seem directly helpful.

Also, I _do_ want Ur/Web to be practical to use for extremely popular 
web sites.  Would you really want to have to switch languages just to be 
able to handle extreme hit frequencies?

>>> Benefits of JS target:
>>>    - never think about memory
>>>        
>> Can you expand on this point?  It sounds surprising.
>>      
> I meant: Never think about when to free memory. If the languages takes
> care about it you don't have to.
>    

No argument there.

> Note that I ddin't talk about coding the core code of an application
> (Ur) I only talked about adding some missing pieces using FFI.
>    

My position is that the total time the whole Ur/Web community spends 
writing libraries to access with the FFI should be negligible compared 
to the time spent writing the main applications.  Sure, it can be a pain 
to get C code right, but it's probably worth it, given the long-term 
performance gains.  Reasonable people may disagree on this.

I find it very encouraging that an informed developer besides me (i.e., 
you :]) was able to wrap a Ruby interpreter so easily.  I personally 
would be more inclined to build an ML or Haskell interface, but it's 
great to think that folks can quickly build interfaces to their favorite 
general-purpose languages.  They all tend to speak C in some form or 
another.



More information about the Ur mailing list