3 ms·
With Go's fast compile features, why couldn't a server start consist of using the configuration data to generate code which then gets compiled into a hella-fast
by stcredzero 16y ago
With Go's fast compile features, why couldn't a server start consist of using the configuration data to generate code which then gets compiled into a hella-fast optimized server? Paths could be highly-optimized hard-coded pattern-matching finite automata.
Someone would have to up and write a Go web framework to use with that. They wouldn't have to, but it would be a shame not to.
- wmf 16y agoVarnish does this with VCL; I think it's translated to C, compiled to a .so, and dynamically loaded. (Using Clang you wouldn't even have to write out the .so.)
- zedshaw 16y agoThat's possible, and probably not too hard, and man oh man would the hackers love a compiler right in their web server. :-)
- stcredzero 16y agoThey already pretty much have that with Perl, PHP, Python, Ruby, Smalltalk,... Not necessarily in the front end web server, though. Anyhow, that's easily solved. It wouldn't have to be in a process doing any web serving. The compiler would be available in a process that just does the starting up. The worker processes would then know which dynamically loadable module they need to load. So, no there wouldn't have to be a compiler in the web server.