[Ur] socket detaching

Sergey Mironov grrwlf at gmail.com
Wed Aug 6 03:25:42 EDT 2014


> But you can use the FFI to produce Ur values of [blob] type in any way you
> like, and then you can use [returnBlob] to serve them -- there's no need to
> intercept sockets.

In my previous letter I tried to explain why I don't like Apache as a
wrapper for the Ur/Web application. Whenever I need to send files, I
do use [returnBlob] most of the time.

> Did you just ask the socket detaching as an optimization?  Did it make an
> important performance difference in practice?

I see socket detachment as one possible implementation of file serving
machine. I didn't measure its performance, I think it has some
advantages in the field of usability. It allows the programmer
1) to access Unix socket for obtaining the system-specific information
via FFI. I use it to determine client's IP address. AFAIK, we can't
obtain this information in the vanilla Ur/Web at the moment.
2) consequently, to pass the socket to child processes. File server
machine is one possible application for that. This way, application
developer may encode the choice of file server into their application
(one of my goals - to make installation manual shorter). In the
urweb-detach demo, I launch bash script to serve the file. Apache may
be used in place of it.

Actually, I'm not asking you to include socket detachment, at least in
its current form. I use it in one project only and I feel I need more
time to adjust the design. Just wanted to share the idea.

Regards,
Sergey


> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur



More information about the Ur mailing list