Asking for advice: Civet or Mongoose or ?

2,813 views
Skip to first unread message

Tony Wilk

unread,
Jan 3, 2014, 10:03:02 AM1/3/14
to cive...@googlegroups.com
Hi,
I have a project for a volunteer 4x4 Response group which currently uses a tiny home-brew 'web server' and now want to upgrade the whole thing - so I've googled and found Mongoose and Civet, got the .exe's ok, but I'm a bit confused by the sources.

In a nutshell:
I want to embed a web server, SQLite and php (ph7 or php5.4) into a Windows C++ application
I want to provide app. data to php (e.g. as superglobals)
I may want to use web sockets but would like to remove other stuff to reduce size a bit.
I don't care about licensing.
You'll have to assume I know what I'm doing ;)
...and that's about it.

So...
Is starting with Civet a good choice ?
or is there some 'x' in {mongoose, unknown_others...} that I should consider instead ?

Yours,
  TonyWilk



Thomas Davis

unread,
Jan 3, 2014, 10:09:25 AM1/3/14
to Tony Wilk, civetweb
Civetweb is almost the same as Mongoose.  They have diverged slightly.  Mongoose has more support.  The main difference between the two is the license.

Thomas


--
Sourceforge
https://sourceforge.net/projects/civetweb/
---
You received this message because you are subscribed to the Google Groups "civetweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to civetweb+u...@googlegroups.com.
To post to this group, send email to cive...@googlegroups.com.
Visit this group at http://groups.google.com/group/civetweb.
To view this discussion on the web visit https://groups.google.com/d/msgid/civetweb/82ae267e-cad9-484c-a16a-86bae75cb351%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

bel

unread,
Jan 4, 2014, 5:33:08 PM1/4/14
to cive...@googlegroups.com, Tony Wilk

On Fri, Jan 3, 2014 at 10:03 AM, Tony Wilk <original...@gmail.com> wrote:
In a nutshell:
I want to embed a web server, SQLite and php (ph7 or php5.4) into a Windows C++ application
I want to provide app. data to php (e.g. as superglobals)
I may want to use web sockets but would like to remove other stuff to reduce size a bit.
I don't care about licensing.
You'll have to assume I know what I'm doing ;)
...and that's about it.

Until summer 2013 mongoose was a web server with MIT license, and civetweb did not exist. Several people contributed to mongoose (reporting issues, proposing patches, etc.), but apparently there was only one author – he decided to switch to a commercial license in summer 2013. In the moment mongoose is still available with a GPL license alternatively. Civetweb is a fork created from mongoose when it still had a MIT license – basically civetweb has been created to retain the MIT license. Civetweb has more authors than just one (this also means, once can not simply change the license anymore).

Since that time, they are two different projects, inevitably increasingly diverging. An overview of what has been done with civetweb can be found here https://github.com/sunsetbrew/civetweb/blob/master/RELEASE_NOTES.md

I think, from your requirements ‘in a nutshell’ both would fit.

If size is an issue: In civetweb there are some new features within the Lua binding, so one should be able to do many things in Lua instead of PHP. Lua requires only a fraction of the resources as PHP.

 
So...
Is starting with Civet a good choice ?
or is there some 'x' in {mongoose, unknown_others...} that I should consider instead ?


There are quite some other servers – you probably know these (none complete) lists:

http://en.wikipedia.org/wiki/Comparison_of_web_server_software

http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers

(By the way: civetweb is still missing there.)

 

Do you want/need a multi-threaded server?

Or would you prefer to use one thread of your host application as the server thread?

It could also be an option to separate the webserver and the host application into two different processes, and communicate by inter-process communication (e.g., TransactNamedPipe).


bel

unread,
Jan 5, 2014, 6:25:09 AM1/5/14
to cive...@googlegroups.com
Is the server supposed to be directly reachable from the internet?
Or from a more or less trusted LAN?

How many clients do you expect at maximum at the same time?

Tony Wilk

unread,
Jan 5, 2014, 9:13:56 AM1/5/14
to cive...@googlegroups.com
Thanks people...
You've given me what I needed to be reassured about.

In answer to your notes:
I guess I do care about licenses (at least a bit) and MIT wins there.
Size isn't *really* an issue, but worth considering when the resulting app wants to run on any old crap laptop.
Lua looks interesting, but I have some legacy php and others that code php (so it's a cop--out ;)
I've seen some other servers, but I like reasonably concise code I can hack if I want.
Multi-threading: I would at least have the server in its own thread (rather than some crappy Windows dialog timer)
Could do separate processes, but it may be simpler for my main app to provide some data 'directly' e.g. by forming cgi replies.
It'll usually be LAN based with tiny no. of clients (c. 10), if web is up it'll replicate to a 'normal' LAMP server.
Eventually it may be used wide-ish-area using e.g. a 5GHz ham channel.

The goal is to have an emergency response control/dispatch system - I'm starting from the opposite viewpoint of others that I've seen:
I'm assuming the situation is bad (flood/storm etc) so WAN has gone or at least unreliable, if it hasn't then it's a bonus.
A big feature is to be able to have a non-techie take a pendrive, plug it in and work Control in no time flat.

Thanks again
   TonyWilk


Reply all
Reply to author
Forward
0 new messages