Status update

arvid at cs.umu.se arvid at cs.umu.se
Mon Jul 13 16:49:34 UTC 2009


Quoting Atul Aggarwal <searchatul at gmail.com>:
> The webserver choosen is lighttpd. lighttpd is fast efficient webserver
> which is optimized for high performance. lighttpd has inbuild support for
> sendfile() (which is required to minimize the overhead on the server while
> serving file to client), also lighttpd extension can be done using plugins.
> Plugins can be developed which can change the behaviour of webserver as per
> requirement. So for instantmirror project, a plugin is developed which can
> be inserted into lighttpd webserver which any change in the original
> webserver code (or without forking of code).
> 
> The Interprocess Communications techinque choosen is unix sockets. (any idea
> about other better IPC?) Initially the only information i am passing is the
> original url typed in the browser of lighttpd to imdaemon and the return
> message is the path of file present in the disk (after downloaded if doesnot
> exist otherwise without downloading). We may extend this in future to pass
> some html status message from imdaemon to webserver (like file does not
> exist) etc.
> 
> I am currently working on migrating existing code to this new format and
> it's almost done. Couple of hours work is left and I will announce on the
> list when I am done with migration so we may discuss our future work/plan
> about the project.
> 
> Any comments/ suggestions.

One thing you need to keep in mind is that you can never block the lighty thread
in your plug-in. For instance, I don't believe you can take the shortcut of
using mod-magnet and just use the lua script to communicate with the imdaemon.

However, it sounds like you might want to make imdaemon an fcgi process and set
up lighty to talk to it over fcgi. That way, you may not have to make any
modifications at all to lighty, and you would use a standard protocol for the
communication which would mean greater compatibility with future tools or if
you want to try different web front ends.

You can still use sendfile() over fcgi, by returning the lighty-specific
x-sendfile header.

-- 
Arvid Norberg




More information about the instantmirror-list mailing list