lighty on win32 9

Posted by jan Mon, 26 Jun 2006 04:02:28 GMT

At the railsconf I spent some time to work on the native win32 port of lighty. Thanks to scons we already had a working build system on Windows, it only needed some #ifdef’s to get the beast compiling.

The work is not ready for prime-time yet, but is very promissing. All problems but ‘how to spawn a process’ are solved and the other changes like emulations for opendir(), socket-read()/write() have lead to cleaner APIs.

All the network-read() has been moved into the network-backends (connections.c, mod_proxy.c, ... did the read() on their own). A long time ago I already had written a abstraction layer for read(), but went too far and failed to strip the complex code down to the good parts.

This time (thanks to svk) I can rollback if I go into the wrong direction.

1. abstract all read() calls into a network_read() call and use the best possible read() implementation (read(), readv(), recv(), ...) [done] 2. abstract file-descriptors into a fd-struct like { int fd; SSL *ssl; enum { FILE, SOCKET, PIPE}}. This is mostly interesting to mod_proxy + SSL and sendfilev() on solaris over a pipe for mod_cgi. 3. bring mod_proxy and mod_fastcgi closer again and move out the code this is common.

The abstraction of the network_read() will be part of .12 while the win32 port is for 1.5.x, same as the fd-struct.

The cleanup of mod_proxy and bringing it closer to mod_fastcgi will be started in 1.4.12 and be finished as a mod_proxy_core in 1.5.x.

In short, thinks are coming back to speed again.

Trackbacks

Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/1730

Comments

Leave a response

  1. techknight Mon, 26 Jun 2006 09:11:45 GMT
    Hi Great news indeed... Hopefully I can try out Lighty Tray for your binary soon. Cheers
  2. Stelios Sfakianakis Tue, 27 Jun 2006 06:49:15 GMT
    What event/network (de)multiplexer mechanism are you going to use? Win32 lacks kqueue/epoll, select is not the best choice, and it seems that you can get the most performance if you use IO completion ports but this probably can not be easily abstracted in your code.. Thanks Stelios
  3. Jan Kneschke Tue, 27 Jun 2006 09:06:55 GMT
    For now it is select() as a start. CompletionPorts were the first idea as the real event-handler, but we will see.
  4. Kevin Worthington Wed, 28 Jun 2006 17:43:44 GMT
    "At the railsconf I spent some time to work on the native win32 port of lighty." Cool! I hope this will outperform my Cygwin builds. I can't wait to try it.
  5. Rio Mon, 03 Jul 2006 05:32:11 GMT
    when will the native win32 port come out?
  6. Jan Kneschke Mon, 03 Jul 2006 06:10:14 GMT
    I commited a first working codebase to svn. It is not ready for release yet and needs some tricky setup to compile it, but it works.
  7. Rio Tue, 11 Jul 2006 05:31:02 GMT
    Can't wait for the release to come out ... Really exciting!
  8. Jose Adriano Baltieri Wed, 19 Jul 2006 17:26:31 GMT
    I'm also very interested on the Win32 native distribution. We use currently WebSITE PRO but this server has been discontinued. So, I'm looking for a replacement and I did liked Lighty. We handle around 300K transactions per day. All dynamic content. Not that much. I also "loved" the X-SENDFILE on FastCGI cause I was "fighthing" at the FastCGI mailing list for something similar. I understand perfectly that this is not an authorizer role. However, I DO think that this mechanism should be part of the original FastCGI specs. Also have another suggestion for FastCGI : try to keep tcp/ip connections with the FastCGI server opened. You could enhance even more the perfomance. Cant wait to have Lighty 4 win32 !
  9. Necrogami Tue, 25 Jul 2006 06:09:21 GMT
    Jan First off i would love to say Great work with Lighty to begin with .. creating win32 and hopefully (dreaming) win64 Native releases it will become a new milestone in the future of lighty and hopefully one day become bigger then Apache
Comments