嵌入式服务器的Web技术 [英] Web technologies for an embedded server

查看:199
本文介绍了嵌入式服务器的Web技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我开始为嵌入式设备开发一个新的Web开发项目,并且希望就技术提出一些建议。该设备将提供包含AJAX代码的HTML页面,以从JSON服务器检索数据。我们暂时使用切诺基作为网络服务器,尽管我们没有绑定。



目前,我正在考虑以下技术:




  • 将其全部写入PHP。我知道它的大,慢,blo肿,但是我已经有大约10MB可用于网络界面(很多嵌入式系统),而且我们在这些设备上都不会看到很多流量。确实需要看起来对用户有反应,但是(页面应该在不到一秒钟内加载)。


  • FastCGI +一个C程序 - 我们正在使用一个内存数据库,所以C程序可以直接通过API与数据库进行交互。这将比PHP更好的性能,但开发时间和可靠性是一个问题,因为C不是非常适合于Web开发。


  • Lua +开普勒 - 这似乎是性能和开发时间之间的一个很好的中间位置。但是,我从来没有和Lua一起工作过,所以我并不确定如何在一个嵌入式的Web项目中实现它。我也不清楚它与切诺基网络服务器的整合程度。




所以任何意见或过去的经验用上述技术?任何其他我应该包括在列表中?



谢谢,
Alex

解决方案

当我在这个区域时,我使用了 Lua 和一个简单的FastCGI赛跑者( Luaetta [因为我确定最新的来源可以提供,如果你问这个人],虽然我也确定这不是当然,还有开普勒),由lighttpd产生。



在嵌入式媒体播放器上表现非常出色,用于远程访问内容并控制设备。虽然我不再保留,但您可以在 http://matthewwild.co.uk上找到更多信息。 / projects / wooble 。如果你认为这个来源会帮助我,那么它目前只能通过一个包管理器来实现,但是我可以通过一个动机来解决。



另一个(再次Lua)该领域的项目是 LuCI 。这些人致力于为嵌入式设备(路由器专门制作)创建一个Web界面,并且已经制作出了一个很好的框架,并提供了许多适合于这种系统的支持库。



我不会担心不知道Lua。如果你知道任何语言,那么你可以在一两天内拿起Lua,手册会记录整个语言,并且很短。


I've recently started a new web development project for an embedded device and wanted to solicit some recommendations for technologies to use. The device will serve HTML pages which include AJAX code to retrieve data from a JSON server. We're tentatively using Cherokee as the web server, though we're not tied to it.

Currently, I'm considering the following technologies:

  • Write it all in PHP. I know it's big, slow, and bloated, but I've got about 10MB available for the web interface (a lot for an embedded system), and we won't be seeing a lot of traffic on any of these devices. It does need to seem responsive for the users, however (pages should load in less than a second).

  • FastCGI + a C program - We're using an in-memory database, so the C program could interact with the database directly through the API. This would have much better performance than PHP, but development time and reliability is a concern since C isn't very well-suited for web development.

  • Lua + Kepler - This seems like a nice middle ground between performance and development time. However, I've never worked with Lua, so I'm not really sure how to implement it in an embedded web project. I'm also uncertain as to how well it integrates with the Cherokee web server.

So any opinions or past experiences with the above stated technologies? Any others I should include in the list?

Thanks, Alex

解决方案

When I was in this area, I used Lua and a simple FastCGI runner (Luaetta [for I'm sure the latest source would be available if you asked the guy] , though I'm also sure that's not the only one, and there's Kepler of course), spawned by lighttpd.

It performed quite well on an embedded media player, and was used for remotely accessing content and controlling the device. Though I don't maintain it anymore, you can find more about it at http://matthewwild.co.uk/projects/wooble . If you think the source would help just poke me for it, it's currently only available via a package manager but I can fix that given the motivation.

Another (again Lua) project in this area is LuCI. These guys are dedicated to making a web interface for embedded devices (routers specifically), and have produced a nice framework with lots of supporting libraries geared towards that kind of system.

I wouldn't be concerned with not knowing Lua. If you know any language then you can pick up Lua in a day or two, the manual documents the whole language and is quite short.

这篇关于嵌入式服务器的Web技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆