[Ur] Can an Ur/Web server be made to create directories / write to files on the host Linux filesystem?

Adam Chlipala adamc at csail.mit.edu
Mon May 18 07:50:19 EDT 2015


On 05/18/2015 04:21 AM, Timothy Beyer wrote:
> At Mon, 18 May 2015 00:38:17 -0300,
> Stefan Scott Alexander wrote:
>> Since Ur is specialized to be a webserver, I don't think there are any existing commands in
>> Ur itself which would allow the server to perform these interactions with the filesystem,
>> correct?
> If it is OK that the transaction might be restarted or interrupted, then using
> the C FFI on the server side for filesystem operations makes sense.

Right, and see Section 11.1 of the Ur/Web manual for information on the 
API to use, especially uw_register_transactional().

At a higher level, though, my advice is to avoid using the filesystem 
wherever possible.  Conventional filesystems just present a poorly 
designed interface for highly concurrent programs!  (And some day, if 
not now, high concurrency may be important for your application.)



More information about the Ur mailing list