Web Application Server in C++

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Web Application Server in C++

Post by tau » Tue Mar 25, 2008 12:34 am

I know, it's a weird question, but does anybody know a project that allows to create web applications in C++ under Linux?

nor Jave, no C#(Mono), nor PHP, nor Perl, etc does not fit my needs in turms of performance, so I decided to code my next project in pure, good old C++...

I'm looking for something like Glassfish server (java) that is written in C++ and allows creating applications as dynamic libraries, all running under Linux.

I've looked at FastCGI as a possibility, however it requires a lot of initial work to make it happen, which I dont mind, but trying to avoid.
0 x
Twitter: Tau Powered

User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US

Post by xavier » Tue Mar 25, 2008 12:49 am

How about just writing Apache modules?
0 x
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.

User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau » Tue Mar 25, 2008 3:17 am

xavier wrote:How about just writing Apache modules?
I'm toying with that idea as well... Apache may provide good base and has web based status engine...

or NGinx...
0 x
Twitter: Tau Powered

User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
Contact:

Post by pjcast » Tue Mar 25, 2008 3:31 am

Or, possibly LightHTTP with custom module.

With PHP, you can simply call some C program to accomplish something.

Though, you can easily write a CGI module with c/c++ without having to use FastCGI (that is mainly for quickly handling sessions with multiple running scripts better - instead of normal CGI, where it loads an executes a new instance for each session - than running the script fast).

Depends on what you need. Java is a possibility, and is better suited for Web development than C++ anyway.

One alternative, is simply make your own small WebServer... Doesn't need to be to advanced. Just a TCP connection (using asynchronous polling) and a few threads you can get some stellar performance.

It all depends on if you really need a full blown web server (with HTTPS/SSH/SSL/etc) or can make do with less. You really have to give us more variables on what you are planning, features you need, and what you are trying to do where you determined C++ is better for a web application.
0 x
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/

warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

Post by warmi » Tue Mar 25, 2008 3:32 am

What exactly are you going to do there that will require C++ ?

Just curious ..
0 x

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Post by steven » Tue Mar 25, 2008 3:37 am

Hey tau

PoCo is a C++ cross platform lib that allow you to do that :)

See the class HttpServer in the Poco::Net doc for example.
http://pocoproject.org/poco/docs/

IMO Poco::Net has way enough for your needs (authentification, ssl, socket, cookies, POP3, etc )

Btw IMO the whole lib is far superior to boost. Especially because it was all designed by the same core programmer hence the api is consistent and well integrated.



PS: I like your other lounge subject ;)
Last edited by steven on Tue Mar 25, 2008 6:48 am, edited 1 time in total.
0 x

User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau » Tue Mar 25, 2008 4:51 am

@pjcast: I was on the java/.net route for a while, I'm actually certified microsoft and sun developer - a survival mix nowadays :)
the overhead of java/.net is too big for heavy math and high performance stuff like testing equipment... I also need to implement hot-pluggable dynamic modules that should be stable no matter what even if there are memory leaks(can be nailed down using memory pools), so the path of the Lighttpd/nginx/apache seems to be not very reliable...

@warmi: heavy math and semi real-time computing, pressure/chemical testing equipment

@steven: that POCO library is a gem! Thanks a bunch for pointing me at! My big concern was to writing authentication myself, which is a big pain in the arse... will look at it shortly
0 x
Twitter: Tau Powered

User avatar
Berserker
Kobold
Posts: 25
Joined: Sat May 01, 2004 3:41 pm

Post by Berserker » Tue Mar 25, 2008 9:40 am

If you are a boost fun I suggest WT (it uses asio).
Hope it helps ;)
0 x

User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau » Wed Mar 26, 2008 3:24 am

Berserker wrote:If you are a boost fun I suggest WT (it uses asio).
Hope it helps ;)
It does help! ;) Thanks for the link! looks very interesting as well!
0 x
Twitter: Tau Powered

mr. iknoweverything
Halfling
Posts: 72
Joined: Thu Jul 12, 2007 5:39 pm
Location: berlin

Post by mr. iknoweverything » Wed Mar 26, 2008 1:49 pm

if speed is important, check this httpd: http://www.fefe.de/fnord/

see the benchmarks, it really wont get any more light weight
0 x

Post Reply