我如何从一个CouchDB的服务器推送到客户端touchdb? [英] How do I push from a couchdb server to a touchdb client?

查看:124
本文介绍了我如何从一个CouchDB的服务器推送到客户端touchdb?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的CouchDB服务器推送数据到touchdb应用程序(杂货同步采样)在Android x86的虚拟机上运行。与应用程序的复制正常工作,其中应用程序不会在推拉。我无法从服务器到触摸数据库客户端推送。当我尝试,我得到了以下错误:

I am trying to push data from my couchdb server to a touchdb app (grocery-sync sample) running on an android x86 vm. The replication with the app works normally where the app does the pulling and pushing. I am unable to push from the server to the touch db client. When I try I get the following error:

{错误:db_not_found,原因:couldnotopenhttp://192.168.100.101/grocery-sync/}

{"error":"db_not_found","reason":"couldnotopenhttp://192.168.100.101/grocery-sync/"}.

任何援助将AP preciated。谢谢你。

Any assistance will be appreciated. Thanks.

推荐答案

您几乎肯定不希望这样做。你可以认为你的移动客户端将在动态IP地址。 Wi-Fi和蜂窝之间的切换将创建一个新的IP地址。服务器需要一个URL复制到。

You almost certainly do not want to do this. You should assume that your mobile clients will be on dynamic IP addresses. Switching between wi-fi and cellular will create a new IP address. The server needs a URL to replicate to.

TouchDB被设计为所述移动客户端从服务器拉的用例。为了推到客户端,TouchDB需要处理所有正确的HTTP请求的服务器将使。许多这些没有意义的TouchDB目前使用案例,所以我怀疑,他们将很快加入。

TouchDB was designed for the use case of the mobile client pulling from the server. In order to push to the client, TouchDB will need to handle all the correct HTTP requests which the server will make. Many of these don't make sense for the current use cases of TouchDB, so I doubt that they will be added anytime soon.

这篇关于我如何从一个CouchDB的服务器推送到客户端touchdb?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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