That's quite cool. That's some of the cleanest PHP I've seen.
When I've tried to write long-running applications in PHP I always get memory leaks. How do you handle this in Kelpie?
Thanks Josh! :-D
Yeah, it's probably going to have memory leak issues. It's pretty much inevitable unfortunately. I've thought about having the server monitor the memory usage and periodically respawn processes. I believe apache uses a similar technique.
I'm open to ideas on this issue though. :-)
Re:PHP Fat Free Framework aka F3
by tlrobinson on Monday March 22, 2010 @05:28AM
(#1209844)
Cool, I might write up a little library to provide the same interface to standard PHP CGI/Apache.
This is what I've got so far:
http://gist.github.com/339915
It basically sets all the usual superglobals like $_SERVER, $_GET etc. Doesn't handle sessions just yet; I'm still working on that..
http://github.com/dhotson/kelpie
It actually works pretty well, no apache required! It's pretty fast too.. all the init stuff you normally have to do every single request can be done once on server startup.
I also wrote a little sinatra style framework to go on top of it: http://github.com/dhotson/kelpie/blob/master/demoapp.php
Anyway, it's turning out to be a pretty fun little project. :-)