Live data from Hacker News

Raphters, a web framework for C

github.com

21–30 of 70 posts

Re: Raphters, a web framework for C

#23
post #19

Interesting, but very minimal. It's basically a wrapper around FCGI (meaning it's doing the old-school "pull request data out of environment variables" thing) with a linked list of regexes matching handlers. That's not nothing; "registered list of regexes matching handlers" is a proven good model for web frameworks and it's handy to have. On the other hand, if I was going to release a web framework, I might do more t…

Nothing is set in stone. I do admit that a libevent based asynchronous API is tempting.

Re: Raphters, a web framework for C

#24
Pretty cool, but if I really had to write some kind of C stuff to output web pages I suppose I'd just build it as an apache module rather than go the CGI route, there's lots of useful functions and nifty stuff within apache making it a pretty nice environment for serving stuff.

(Or more probably since it's 2011, I'd try an nginx module (or lightty), although I have never looked at any of those projects code yet).

Building response stuff in C is pretty high maintenance stuff though.

Re: Raphters, a web framework for C

#27
post #11

It would be neat to see how you could possibly hook Lua into this to give you some of the flexibility of a dynamic language with the speed and small footprint of a (mostly) C app. I've been thinking of working on something like that for a while but unfortunately my C skills need a lot more work before I'd be comfortable tackling it.

Have you looked at Tir?

http://tir.mongrel2.org/home

Re: Raphters, a web framework for C

#28

This framework does almost nothing. I don't see the point of it.

The point is that with sufficient pathology you can do high-level things in a low-level language, but not the inverse.

That's not exactly true though. Here's an example:

http://www.arduino.cc/playground/Interfacing/Python

Re: Raphters, a web framework for C

#29
post #27
post #11

It would be neat to see how you could possibly hook Lua into this to give you some of the flexibility of a dynamic language with the speed and small footprint of a (mostly) C app. I've been thinking of working on something like that for a while but unfortunately my C skills need a lot more work before I'd be comfortable tackling it.

Have you looked at Tir? http://tir.mongrel2.org/home

Yeah, I wrote the test framework that Zed uses for Mongrel2 and Tir's unit tests, and also wrote the WSAPI handler for Mongrel2 (a separate project from Tir).

What I'd really like to see is not so much a web framework in Lua (there are a few, I'm working on another one, and it's really not hard to make one either), but rather one that's mostly C but lets you use Lua, say, for templates or controller functions. That could be pretty interesting for very small devices, or for squeezing lots of performance out of a larger one, all while stilling letting you program the bulk of your code in a higher level language.

Re: Raphters, a web framework for C

#30
post #19

Interesting, but very minimal. It's basically a wrapper around FCGI (meaning it's doing the old-school "pull request data out of environment variables" thing) with a linked list of regexes matching handlers. That's not nothing; "registered list of regexes matching handlers" is a proven good model for web frameworks and it's handy to have. On the other hand, if I was going to release a web framework, I might do more t…

Something like evhttp also has the benefit that you can have more than one request "in flight". FastCGI can theoretically do this, but almost no implementation supports it - and it makes e.g. writing a simple chat server much easier (one process, one thread, tons of connections, data in memory.)
Post reply on HN