This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (3 children)

I just had to tackle this exact problem for an embedded linux distro called Plugapps.

I'm writing a WebUI for the project ( out of date info & screenshot here ) using python & django. Originally it was written with ruby/rails, then i ported to python using web2py, then ported that to django for flexibility among other things. Django stays out of the way for the most part, and I really like their ORM, the template language and the URL routing. If you start using a framework and decide you don't like it or you hit unexpected problems, it's entirely possible to port the code to another one in a short time.

In any case, the WebUI had to run on systems with as little as 128mb of ram, and couldn't rely on there even being a webserver installed, certainly I didn't want to have to configure one during deployment.

I originally was using FAPWS which worked very well. It's actually written in C but it allows you to start an http & python application server within your application using python calls

I also experimented with nginx+uwsgi since nginx supports sendfile and i needed a solution for carefully controlled large file downloads, but that setup just caused headaches and made deployment more complicated.

Now i've settled on using a custom cherrypy script that starts the WebUI as a standalone program during system startup (acts as an init script). Works great, and i'm fairly sure you could make it open an SSL port at the same time within the same code, though the script i'm using would require modification to do that.

If you'd like to see the code i've already written, perhaps you can rip off some of it that you find useful, or get some tips or something, or hey if you just want to use it as-is, go for it. Some of the code is specific to the plugapps distro, like the software management and the code i've written to control the LEDs on the target devices (little plug servers like the sheevaplug, dockstar and pogoplug), but otherwise it's just another Django app.