简体   繁体   English

没有HTTP请求的Ruby on Rails

[英]Ruby on rails without http request

I'm currently developing a server that can get data over the internet from specific device i have and log it into a database. 我目前正在开发一个服务器,该服务器可以从我拥有的特定设备通过Internet获取数据并将其记录到数据库中。 Unfortunately I dont have control on the way this device communicate. 不幸的是,我无法控制此设备的通信方式。

Currently I set an IP adress and a port number and the device will open a socket and send a string. 目前,我设置了一个IP地址和一个端口号,设备将打开一个套接字并发送一个字符串。 I dont really want to develop a server from scratch and i would much prefer to base on a web server. 我真的不想从头开始开发服务器,而我更希望基于Web服务器。 but the data is a plain string and not a full http request. 但数据是纯字符串,而不是完整的http请求。

Is there a way around it using Ruby on rails ? 使用Ruby on Rails可以解决吗? Is it possible to do with other web-server-based technology ? 是否可以使用其他基于Web服务器的技术?

Thanks a lot 非常感谢

您可以仅使用常规的旧红宝石插槽接收字符串。

听起来像一个需要使用node.js的应用程序,如果您想要一个预制的node + rails应用程序,该应用程序可以完成您想要在本文中提到的GitHub上的化合物

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM