向服务器、FTP 或网站读取/写入数据

发布于 2024-09-06 15:12:50 字数 192 浏览 3 评论 0原文

我正在编写一个应用程序,它会定期将信息发送到远程服务器,然后从该服务器获取有关其他用户的相关信息回本地数据库。处理发送此信息(即:XML 或二进制)并将其写入远程服务器的最佳方法是什么。

另外,我如何确保当 500 多个用户的数据同时到达服务器或 FTP(或更好的替代方案?)时,相应的字段会被覆盖或添加,而不会跳过任何内容或覆盖整个内容?感谢您的帮助。

I'm writing an app that will periodically send information out to a remote server, and then get relevant information about other users from that server back to the local database. What's the best way to handle sending out this info (i.e.: XML or binary) and writing it to the remote server.

Also, how can I assure that, when 500+ users' data get's to the server or FTP (or better alternative?) at once, the appropriate fields gets overwritten or added, without skipping any or overwriting the entire thing? Thanks for the help.

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

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

发布评论

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

评论(2

叹梦 2024-09-13 15:12:50

我也在寻找这个答案,并且发现了一些不错的教程。不幸的是它们不是英文的,但你可以理解一个原理。

这是教程的第四个视频(http://vimeo.com/29332913)。只需点击作者姓名即可开始之前的 3 个教程。

希望对你有帮助XD
雅内兹

i was looking for that answer too and i found some nice tutorials. Unfortenly they are not in english, but you can understand a princip.

This (http://vimeo.com/29332913) is the forth video of tutorials. Just click on authors name and start 3 tutorials before.

Hope it will help you XD
Janez

眼眸 2024-09-13 15:12:50

您是否考虑过 JSON?当涉及到二进制数据(大文件等)时,FTP 通常是一个解决方案,但是我假设您想要交换包含文本格式信息的数据,因此对于网站来说,HTTP 将是一个好方法(最好的方法取决于完全取决于您的服务器设置、数据格式和模型)。

我必须补充一点,如果您使用 Ruby,YAML 也是一个非常好的数据格式工具框架,我更喜欢它而不是 JSON(个人经验)。

Have you considered JSON? FTP is generally a solution when it comes to binary data (large files, etc.), however I assume you want to exchange data that contains information in a textual format, so for a website HTTP will be a good way (the best way depends entirely on your server setup, your data format and model).

I have to add, that YAML is also a very nice data format tool if you are using Ruby frameworks, which I prefer over JSON (personal experience).

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