Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What server-side web technology should I use in an embedded system?

Tags:

linux

embedded

I'm starting a new project and I'm trying to figure out what technologies I should use. Here's the deal, I'm writing some software that will run on a wireless router and I would like to provide a web interface. So most likely I will have to do some server-side web development. The only issue is that the device I will be deploying this to only has 16 MB of RAM (Ubiquiti Bullet). Here's some more info:

1.) I'll be using openwrt (linux). 2.) Obviously it has to be lightweight 3.) It's a school project, so I can use any technologies I'd like.

Obviously PHP is the obvious choice, but is there anything else a bit more exciting (I'm not crazy about PHP).

Thanks in advance!

like image 604
ChrisDiRulli Avatar asked Dec 06 '25 05:12

ChrisDiRulli


2 Answers

Some of the later versions of OpenWRT come with an interface written entirely in lua (LuCi). Have you checked this out to see if it applies? It runs over standard CGI and is called by the embedded web server that is already running on the OpenWRT (meaning you don't have to add yet another software package).

Check out their website luci.freifunk-halle.net, it apparently is a full featured web framework including MVC, so you are able to get started faster!

LuCI is a collection of free Lua software for embedded devices. It includes several useful tools and libraries for developers as well as an MVC-Webframework and web user interface which is part of OpenWrt Kamikaze starting from release 8.09. The goal of the LuCI Project is to create and maintain user friendly, stable and reliable user interfaces and development frameworks.

PHP is rather big for a router, and I think it won't quite provide the speed that you are looking for! Lua is not a hard scripting language to pick up and start with, it is not that different from PHP, and the Lua website is very good and has loads of documentation!

like image 76
X-Istence Avatar answered Dec 07 '25 21:12

X-Istence


Write it in C.

A light-weight webserver and either built-in modules, or FastCGI. The actual web stuff written in C. You will learn to appreciate higher-level languages and you'll probably use less RAM.

  • Cherokee
  • nginx
  • lighttpd

Or, find a nice small http library and embed the http server into your web UI.

like image 23
Ryan Graham Avatar answered Dec 07 '25 21:12

Ryan Graham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!