我正在开发一个由 Linux 开发板和温度传感器组成的个人项目。我想看到房子里任何地方的温度的漂亮的 Web 2.0 实时图。来自硬件/驱动程序背景,所以我不太熟悉数据库或网络服务器。我一直在试图弄清楚如何将新的温度值从应用程序发送到本地网络服务器(也在开发板上运行),该服务器可以从客户端网络浏览器同时查看。我附上了一张图片,显示了我正在尝试执行的操作:
http:// img193.imageshack.us/img193/4742/92898822.jpg
我已经编写了驱动程序、应用程序,并尝试使用 GWT 制作应用程序。我一直在试图弄清楚如何制作服务器端应用程序和数据库,即我是否需要制作一个嵌入 SQL 的单独可执行文件以通过 http 与应用程序和客户端通信,或者是否有更简单的现有方法来执行此操作?
提前致谢。
凯文
I'm working on a personal project that consists of a linux dev board and temperature sensor. I'd like to see a nice web 2.0 real time plot of the tempature from anywhere in the house. Coming from hardware/driver background so i'm not very familar with databases or webservers. I'm stuck trying to figure out how i can send new temperature values from an application to a local web server (also running on the dev board) which can be simulataneously viewed from a client web browser. I've attached a picture which shows what i'm trying to do:
http://img193.imageshack.us/img193/4742/92898822.jpg
I've written the driver, application and played around making an app using GWT. I'm stuck trying to figure out how to make the server-side application and database i.e. Do i need to make a seperate executable that embeds SQL to talk to both application and client via http or is there an easier, existing way to do this?
Thanks in advance.
Kevin
发布评论
评论(1)
GWT 通常与 Java 应用程序服务器一起使用。您可以使用 JSON 或 XML 与任何类型的服务器进行通信,但我不知道这有多容易。
在非嵌入式服务器中,您将安装 Java 和应用程序服务器。您还可以安装数据库服务器,但对于简单的项目,您可以通过使用嵌入式数据库来避免这种情况,例如 HSQL 或 < a href="http://db.apache.org/derby/" rel="nofollow noreferrer">德比。对于你的情况,我认为没有必要。
问题是你的平台可以使用什么样的应用服务器?所有应用程序服务器都支持某种CGI 通信。通过这种方式,您可以将服务器与对温度值进行采样的应用程序连接。我认为不需要 SQL 或嵌入式数据库。
GWT is usually used with a Java application server. You can use JSON or XML to communicate with any kind of server, but I don't know how easy this is.
In a not embedded server you would install Java and an application server. You would also install a database server, but for simple projects you could avoid this by using an embedded DB like HSQL or Derby. For your situation I don't believe this is necessary.
The question is what kind of application server can you use in your platform? All application servers support some kind of CGI communication. This way you could connect your server with the application that samples the temperature values. I don't think there is a need for SQL or an embedded database.