我如何从一个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.