Web Technologies for Embedded Server

I recently started a new web development project for an embedded device and wanted to ask for recommendations on the use of technology. The device will serve HTML pages that include AJAX code to retrieve data from the JSON server. We pre-use Cherokee as a web server, although we are not tied to it.

I am currently considering the following technologies:

  • Write everything in PHP. I know this is big, slow and bloated, but I have about 10 MB for the web interface (a lot for the embedded system) and we won’t see much traffic on any of these devices. However, it should look responsive to users (pages should load in less than a second).

  • FastCGI + program C - we use the database in memory, so program C can interact with the database directly through the API. It will be much better than PHP, but development time and reliability are a problem, since C is not very suitable for web development.

  • Lua + Kepler - This seems like a good intermediate position between runtime and development time. However, I have never worked with Lua, so I'm not sure how to implement it in an embedded web project. I'm also not sure how well it integrates with the Cherokee web server.

So, any opinions or past experience using the above technologies? Any others I should include in the list?

Thanks Alex

+5
source share
3 answers

When I was in this area, I used Lua and a simple FastCGI runner ( Luaetta [I’m sure the last source will be available if you ask the guy], although I’m also sure that it’s not the only one, and there, of course, Kepler) generated by lighttpd .

It worked well on the built-in media player and was used to remotely access content and manage the device. Although I no longer support this, you can find more about it at http://matthewwild.co.uk/projects/wooble . If you think that the source will help me just push me, it is currently only available through the package manager, but I can fix it based on motivation.

Another (again Lua) project in this area is LuCI . These guys are designed to create a web interface for embedded devices (in particular, for routers) and have created a good structure with a large number of supporting libraries oriented to this system.

I would not be worried that Lua did not know. If you know any language, then you can pick up Lua in a day or two, the manual documents the entire language and quite briefly.

+9
source

What about viewing HipHop, the PHP PHP compiler for Facebook?

https://github.com/facebook/hiphop-php/wiki

This way you can write your code in PHP and efficiently compile it in C ++.

0
source

ASP.NET Assuming you're not interested in Embedded Windows Server 2008 , you can still use ASP.NET by including Mono in Cherokee . You can use Visual Studio as your RAD development environment and use things like ASP.NET MVC 2 . Many third-party user controls will also work with Mono ( Telerik announces support for its ASP.NET controls on Mono! ).

-1
source

Source: https://habr.com/ru/post/906604/


All Articles