问题标签 [cloudant]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
664 浏览

arduino - 如何使用 Arduino Wifi Bee 连接到 Cloudant

我们正在尝试将基于 Arduino 的 wifi 蜜蜂(ATmega 328P)连接到 Cloudant 数据库。wifi 蜜蜂使用 wiwhield 库连接到网络。我们可以使用它来连接到 cosm(xively)并发布/获取数据。但是,使用 cloudant,我们无法这样做,并且不断收到 503 服务不可用请求。

我认为问题在于 Wishield 需要指定 IP 地址,而 Cloudant 使用 DNS。我正在使用 wishield 添加代码片段,该代码片段适用于从 weather.com 获取数据,但是当我们修改 cloudant 的变量时.com,它只是给了我一个 503 请求。

请找到不同的代码: 代码片段:GetDatafromCloudant.ino :我们刚刚更改了 Cloudant GET 请求的 IP 地址/端口详细信息。

代码片段:GetDatafromWeather.ino:这很好用,我们可以从weather.com 中提取数据以获取洛杉矶天气数据。

0 投票
2 回答
2020 浏览

cloudant - Cloudant 搜索索引查询限制

为什么搜索索引查询的结果限制为 200 行,而标准视图查询似乎没有限制?

0 投票
1 回答
120 浏览

cloudant - 从多个应用程序访问 Cloudant 数据库

我想用不同的应用程序连接到 Cloudant 上的同一个数据库。只有一个应用程序将写入数据库,而另一个将是只读的。

这样做可以吗?

0 投票
1 回答
394 浏览

ember.js - ember-data adapter to read from cloudant RESTful API

The cloudant RESTful API is fairly simple but doesn't match the way ember-data expects things to be. How can I customize or create an Adapter that deals with these issues...

In my specific case I only want to load records from one of several secondary indexes (ie. MapReduce fnctions).

The URL for this is below, where [name] and [view] would change depending on user selection or the route I am in.

Looking at the ember-data source there doesn't seem to be an easy way of defining URLs like this. I took a look at findQuery and it expects to send any variables through as url params not as part of the actual URL itself.

Am I missing something? Is there an obvious way of dealing with this?

Then the data comes back in a completely different format, is there a way to tell ember what this format is?

Thanks!

0 投票
1 回答
1337 浏览

heroku - Heroku 和 Iris 沙发 vs Cloudant

您对将 Iriscouch 或 Cloudant 与 Heroku 一起使用有什么经验/想法吗?您是否必须使用 Cloudant(因为它是作为附加组件提供的)?

有什么优点/缺点?

我正在开发一个包含大量地理信息并且需要在全球范围内分发的应用程序。在任何特定地区(主要对欧洲和澳大利亚感兴趣),上述任何一项是否更快(更低的延迟)?

谢谢

0 投票
1 回答
765 浏览

ios - 连续复制与一次性复制的成本(使用 TouchDB 和 Cloudant)

我们有一个使用 Cloudant 作为远程服务器的应用程序。尽管如此,Cloudant 与以往经验中的 TouchDB 连续复制并不完全兼容。因此,我们目前的替代方案是以固定频率手动触发一次性复制。尽管如此,我们想知道这种方法是否会比连续复制花费更多的钱,因为连续复制使用 longpoll 并且不需要经常查询服务器。换句话说,以 Cloudant 为目标的一次性拉取复制是否会花费我们一个 GET 请求?

谢谢你,保罗

0 投票
4 回答
1859 浏览

cloudant - 如何使用 PHP 读写 cloudant

我一直在尝试使用 PHP 在 cloundant 上使用 Curl 示例。但是,我尝试的任何方法都不起作用。我想做的只是使用 PHP 在 cloundant 上读取、写入、搜索数据。但是,对于初学者来说,似乎没有一种简单的方法可以做到这一点。

代码在这里:

我得到的错误是:

0 投票
1 回答
7802 浏览

couchdb - Modeling relationships on CouchDB between documents?

I'm trying to model a fairly simple relationship in CouchDB and I'm having trouble determining the best way to accomplish this. I'd like users to be able to create lists of video game objects. I have the video game documents stored in the DB already with "type":"game". I'd like to be able to query a list object's ID (via a view) and get back the list's metadata (title, creation date, etc.) and portions of the game document (such as title and release date). Furthermore, I'd like to be able to add/removes games to/from lists without downloading the entire list document and posting it back (so this means I can't simply store the game's information in the list document) as I'd eventually like to support multiple users contributing to the same list, and I don't want to introduce conflicts.

After reading the CouchDB wiki on EntityRelationships, I've determined that setting up relationship documents might be the best solution.

Game:

List:

Game-List Relationship:

But, from what I understand, this wouldn't allow me to get the list's metadata and the game's metadata in one request. Any advice?

0 投票
2 回答
616 浏览

mongodb - 应用架构 - CouchDB 和 MongoDB

我正在开发一个包含两种类型数据的应用程序:

1) 用户配置文件 - 用户名、电子邮件、用户 ID、访问令牌、会话 ID、AvatarUrl 等。对于每个用户,此数据约为 20kB,对于活动用户,数据将被读取 100 次/天并写入 5 次/天. 我正在考虑使用 ObjectRocket (MongoDB) 或 Cloudant (CouchDB with Clustering) --- 我喜欢 Cloudant 的极端容错性(主/主复制、仅崩溃设计和 Cloudant 的多地理冗余),但我担心如此多的文档修订将非常快地占用磁盘空间,并且整体性能不如 MongoDB。我正在学习 MongoDB。对这种数据类型有什么建议吗?

2) 用户对用户的交易——用户A向用户B发送8分——检查用户A的积分余额,如果>8,则借记UserA并贷记UserB。每笔交易大约 2kB 并且可能永远不会被更新或删除(会计师不使用橡皮擦)。为此,我正在考虑将 CouchDB (Cloudant) 与 Map/Reduce 视图一起使用,其中视图将跟踪用户余额。这些数据当然对应用程序的完整性极为重要,我认为 Couch 可以让我在晚上睡得更好(尤其是在主/主复制、仅崩溃设计和 Cloudant 的多地理位置冗余的情况下)。对于这种数据类型还有其他建议吗?

总的来说,为了简单起见,我想使用一种 DB 类型,但似乎有时要建房子,你需要一把锤子和一把螺丝刀。对数据类型 #1 使用 Mongo (ObjectRocket) 对数据类型 #2 使用 Couch (Cloudant) 是否有意义?

0 投票
2 回答
2046 浏览

couchdb - Cloudant 和本地 CouchDB 安装 2 路复制

我正在尝试同步本地 CouchDB 安装中的数据库(Mac 上的 v 1.3.1)和具有主-主复制的 Cloudant 上的数据库。

在我的本地蒲团http://localhost:5984/_utils中,我已将 Replicator 配置为将我的本地数据库复制到 Cloudant。从本地数据库复制到 Cloudant 数据库时一切正常,但不能向后复制。如果 Cloudant 数据库中的数据发生更改,这些更改不会复制到我的本地数据库中。

本地 -> Cloudant = 有效

Cloudant -> 本地 = 不起作用

这有可能做到吗?任何人都可以帮忙吗?

谢谢!