On 08/05/2014 04:57 AM, Sergey Mironov wrote:
Well, I really prefer not to use Apache for serving anything but the
completely static pages.

OK; I wasn't sure if your example files being served were generated dynamically or not.

The second reason is the ability to control the [serve] function's
behavior. For example, my application should serve the firmware
tarballs to authorized users only. Authorization routine requires
parsing of fingerprint of the user's system and searching here and
there in the database. Integrating such things into Apache may be
tricky (actually, I have no idea how to communicate with Apache. May
cookies be used for that?).

I think you will say that I am talking about non-static content and
all non-static content should be stored in the database completely.
Well, for the most of the applications - maybe. But sometimes
application should interact with file-based backends and in those
cases controlling the [serve] logic is very desirable. For my
application, I am doing it via [val serveTarball : string ->
transaction page] right from the [main] function.

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.

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

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

Reply via email to