我应该在嵌入式系统中使用什么服务器端 Web 技术?

发布于 2024-07-14 14:33:38 字数 324 浏览 8 评论 0原文

我正在开始一个新项目,我正在尝试找出应该使用哪些技术。 事情是这样的,我正在编写一些将在无线路由器上运行的软件,并且我想提供一个网络界面。 因此,我很可能必须进行一些服务器端 Web 开发。 唯一的问题是我将部署此功能的设备只有 16 MB RAM (Ubiquiti Bullet)。 以下是更多信息:

1.) 我将使用 openwrt (linux)。 2.) 显然它必须是轻量级的 3.) 这是一个学校项目,所以我可以使用任何我想要的技术。

显然 PHP 是显而易见的选择,但是还有其他更令人兴奋的东西吗(我并不热衷于 PHP)。

提前致谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

紧拥背影 2024-07-21 14:33:38

OpenWRT 的一些更高版本带有完全用 lua (LuCi) 编写的界面。 您检查过它是否适用吗? 它在标准 CGI 上运行,并由已在 OpenWRT 上运行的嵌入式 Web 服务器调用(这意味着您不必添加另一个软件包)。

查看他们的网站 luci.freifunk-halle.net,它显然是一个功能齐全的 Web 框架,包括MVC,让您能够更快上手!

LuCI 是一个用于嵌入式设备的免费 Lua 软件集合。 它包括几个对开发人员有用的工具和库,以及 MVC-Web 框架和 Web 用户界面,这是从 8.09 版本开始的 OpenWrt Kamikaze 的一部分。 LuCI项目的目标是创建和维护用户友好、稳定可靠的用户界面和开发框架。

PHP 对于路由器来说相当大,我认为它不能完全提供您正在寻找的速度! Lua 并不是一种很难上手的脚本语言,它与 PHP 没有什么不同,Lua 网站非常好,有大量的 文档

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!

醉城メ夜风 2024-07-21 14:33:38

用 C 语言编写。

轻量级网络服务器和内置模块,或者快速CGI。 实际的网络内容是用 C 编写的。您将学会欣赏高级语言,并且可能会使用更少的 RAM。

或者,找到一个不错的小型 http 库并将 http 服务器嵌入到您的网络中用户界面。

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.

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

江挽川 2024-07-21 14:33:38

我属于 C 阵营 - 选择您能找到的最小的服务器,它还允许您插入自己的 API 来控制路由器。 使用 javascript 将尽可能多的逻辑卸载到浏览器,以检查发送到后端的命令,并让您的设计在后端保持简单的表单/url 处理。

此链接包含您可以查看的许多服务器的列表。 Once 声称只有 1k 行代码,这真是太小了
http://www.ibm.com/developerworks/web/library/wa -ltwebserv/

I'm in the C camp - go with the smallest server you can find that also allows you to plug in your own API to control the router. Off load as much logic as you can to the browser using javascript to check commands being sent to the back end, and keep yours design to simple form/url handling on the back end.

This link has a list of a number of servers you can look at. Once claims to be only 1k lines of code which is rockin' small
http://www.ibm.com/developerworks/web/library/wa-ltwebserv/

╭⌒浅淡时光〆 2024-07-21 14:33:38

网络服务器不是问题。 任何支持 CGI 的轻量级 httpd 选项都可以完成这项工作。 对于内容生成,我绝对不会用 C 语言来做。使用 LuCI 框架,并设计一个好的界面!

The webserver is not the problem. Whatever lightweight httpd options supporting CGI will do the job. And for the content generation I would definitely NOT do it in C. Use the LuCI framework, and design a good interface !

客…行舟 2024-07-21 14:33:38

考虑制作一个 Webmin 插件。 Webmin:

  • 带有自己的 Web 服务器,可以执行 SSL
  • 可能会毫不费力地挤进 16MB
  • 是专门为修改 Unix 和 Linux 系统的 GUI 前端而设计的
  • 有一个记录良好的插件 API
  • 有大量的示例模块(插件)你可以从中学到

这不是灵丹妙药,但对于它所服务的利基市场来说,它100%满足了它。 唯一的缺点是,该 API 拥有悠久的历史,但并不十分优雅,而且您不会用它赢得任何流行词奖项。

Consider making a Webmin plugin. Webmin:

  • Comes with its own web server which can do SSL
  • Will probably squeeze in 16MB no sweat
  • Is specifically made for being a GUI front-end to modify Unix and Linux systems
  • Has a well-documented plugin API
  • Has a ton of example modules (plugins) you can learn from

It's no silver bullet, but for the niche it serves, it satisfies it 100%. The only downside is that the API, having a long legacy, isn't exactly elegant and you won't win any buzzword awards with it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文