问题标签 [ddp]
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.
meteor - 是否可以将您当前的用户 ID 传递给远程 DDP 服务器的“this.userId”?
我有两个使用相同数据库的流星应用程序,一个是移动应用程序(主要),另一个是桌面应用程序。
从桌面应用程序中,我想调用远程移动方法来创建列表,这样我就不必重复代码'Listing.create'
。
我假设Meteor.userId
在调用远程移动方法时会转移我在桌面应用程序上的登录信息,但这不是真的,因为它是未定义的。
我也有 Oauth 和电子邮件身份验证,并且似乎没有一种简单的方法可以使用 OAuth 登录(通过调用“登录”登录非常适合密码)。
调用远程方法的最佳方法是什么,因为它在没有登录的情况下失败?我想我可以将 userId 作为字符串传递,但这会打开该方法以进行黑客攻击
javascript - Meteor DDP:如何在将新文档添加到集合时收到通知
我正在编写一个通过 DDP 连接到 Meteor 服务器以读取数据的软件。
我面临的问题是弄清楚如何区分添加到集合中的新文档和收到有关已存在文档的通知。
当我第一次连接到服务器时,我会收到一系列added
消息来填充客户端集合。我不知道如何区分这些消息和后来的消息,表明新文档已实时添加。当 DDP 客户端需要重新连接到服务器时,情况会变得更糟,此时所有当前文档都会再次作为added
消息发送。
c# - 使用 Json.NET 将 Meteor.js DDP 日期转换为 C# DateTime
问:如何让 Json.NET 成功将此 json 日期结构转换为 C# DateTime?
您好,我正在尝试使用 DDP 协议将现有 Meteor.js 应用程序上的方法调用的返回值反序列化为已知/严格的返回结构。
我正在使用动态来实现最基本的东西,但是,转向严格的结构以从 C# 方面的类型安全和智能感知中受益。
但是,它无法使用 javascripts Date() 的 ddp 序列化结构将 Javascripts Date() 成功反序列化为 C#s DateTime:
问:如何让 Json.NET 成功将此 json 日期结构转换为 C# DateTime?
如果“协议”中间件是可能的,那么将 DateTime 用于 DDP 的 Date() 也会很糟糕。
我的结构:
我要转换为 loginReturn 的返回值:
meteor - 连接超时。未收到 DDP 心跳
我正在尝试从 CSV 上传超过 5,000 条评论,然后将它们插入到集合中。
我得到以下信息:
手头的脚本:
如何在不因连接超时错误而崩溃的情况下完成这项工作?
在本地,它似乎工作得很好,但在生产 (modulus.io) 上它突然结束了。
javascript - 如何查看流星 DDP 流量?
流星在袜子/网络套接字上使用 DDP。我如何获得浏览器调试控制台中发生的任何类型的视图?在 chrome 的网络面板中,至少只有一个“websocket”连接,没有太多关于通过它运行的流量的信息。
我知道 arunoda 的DDP 分析器和代理,但正在寻找其他方法来获取有关流量的基本信息。我原以为 chrome 的调试工具会对 HTTP 以外的协议提供更多支持,并且有兴趣知道其他人认为还有什么有用的。
javascript - 使用 Node.js 创建 DDP 服务器
由于 node.js 版本的限制,最近版本的 Meteor 不能在系统上使用。必须使用常规 node.js 创建 DDP 服务器,Meteor 设置将连接到该服务器。
可以使用node-ddp-client在 node.js 中创建 DDP 客户端,但是我们如何创建 DDP 服务器呢?
meteor - how to use normal websocket events in a meteor app?
I'm working on a multiplayer game that sends a lot of data over sockets, and using the meteor stack.
What is the best way to hook into DDP to send/receive events, and act on them yourself? or should i try and mix normal websocket events in?
Checking the DDP spec here RPC is supported from client to server, but I don't see the other way around. From server to client is Added/Updated/Removed collections type messages. I guess i could just use one of these, but is there a lower level for sending your own message types? eg If I want to send different types of messages ("playerMove") from the server to the clients, what might be a way to do that?
If I could pub/sub to a channel, and send my own msgs back and forth that get mapped to client events / methods that would save more infra/plumbing in the app.
Pointers/code snippets appreciated!
reference: - DDP spec - Android DDP client
ssl - 通过 SSL 与 Meteor 应用建立 DDP 连接
当 Meteor 客户端用于DDP.connect()
连接 DDP 服务器时,它以明文形式发送。我们如何建立 SSL 加密的 DDP 连接?
javascript - 使用外部 DDP Meteor 实例时,Meteor 不渲染 css 并不断重新加载应用程序
我试图找出各种原因,以及这是如何发生的,但我似乎无法弄清楚。我已经在 freenode 上的#meteor 上问过这个问题,但那个频道有点不靠谱。
问题是,当我使用第二个流星应用程序作为 DDP 源时,我的应用程序停止渲染 css 并继续重新加载页面。(DDP_DEFAULT_CONNECTION_URL)。
好吧,它会在一瞬间渲染 css,然后再次重置 css 完全从浏览器/dom 中消失。
我把我的源代码放在github上,无法呈现css的应用程序是:github.com/mdahiemstra/tripster/tree/master/src/app
流星ddp服务器是:github.com/mdahiemstra/tripster/tree/master/src/api
相当标准的流星设置,没什么太花哨的。当我不包含 DDP 连接 URL 时,应用程序运行良好。
我也在网上放了一个演示,看到它在运行中失败了:应用程序:http ://oozio.nl:5000 /(使用流星应用程序“api”的 DDP)
提前感谢您的任何帮助/指点!
--EDIT 在#meteor 上的一位 irc 用户的帮助下,我们现在通过删除自动更新解决了它,但它几乎不是一个修复程序,我认为它是一个核心流星错误。