Tibco Rendezvous - 尺寸限制
我试图将一个可能很大的字符串放入集合点消息中,并对大小限制感到好奇。我知道整个消息有一个物理限制(64mb?),但我很好奇其他一些变量会如何影响它。具体来说:
- 钥匙有多大?
- 字符串的存储方式(在一个字段与多个字段中)
对于上述任何主题或任何其他可能相关的任何建议,我们将不胜感激。
注意:我想将消息保留为原始字符串(而不是字节码等)。
I am attempting to put a potentially large string into a rendezvous message and was curious about size constraints. I understand there is a physical limit (64mb?) to the message as a whole, but I'm curious about how some other variables could affect it. Specifically:
- How big the keys are?
- How the string is stored (in one field vs. multiple fields)
Any advice on any of the above topics or anything else that could be relevant would be greatly appreciated.
Note: I would like to keep the message as a raw string (as opposed to bytecode, etc).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自关于超大消息的 Tibco 文档:
至于实际限制,Add 字符串函数采用 C 风格的 ansi 字符串,因此理论上是无界的,但是考虑到
采用 u32 的 AddOpaque 的签名,声明限制可能是 4GB 而不是 64MB 似乎是明智的。
也就是说,使用 Tib 传输如此大的数据包可能会成为严重的性能瓶颈,因为它在尝试将此类消息发送给所有消费者时可能必须缓冲大量流量。默认情况下,rvd 缓冲区只有 60 秒,因此如果您的流量很大,您可能会发现自己遭受消息丢失。
tibco 中的消息开销在很大程度上非常简单:
注意:如果您使用嵌套消息,只需递归上述内容即可。
在您的情况下,与名称相比,有效负载开销将非常巨大(只要它们合理且简单),尝试优化这些没有什么意义。
您可能会发现,如果您以压缩形式传输字符串,可以通过使用启用压缩的 rvrd 或通过更改生产者/消费者以使用快速但有效的东西(例如 deflate)来传输字符串,从而在线路/缓冲上获得相当高的效率(或者如果你感觉像 QuickLZ、FastLZ、LZO 等深奥的东西,尤其是那些具有固定内存占用压缩/解压缩引擎的东西)
你没有说出你的目标平台 api(例如 .net/java/C++/C)并且这会让事情变得有点色彩。在线路上,无论 java/.net 默认情况下是否使用 UTF-16,所有字符串数据都将为每个字符 1 个字节,但是,将这些数据放入消息中/从消息中读取它们会产生大量翻译成本,因为底层缓冲区无法重用在这些情况下,必须执行复制(以及分别压缩/扩展)。
如果您坚持使用不透明的字节序列,则通过托管包装器 api 可能会在简单的实现中产生复制开销,但如果您不需要将数据作为本机字符串使用,则开销至少会更少。
From the Tibco docs on Very Large Messages:
As to actual limits the Add string function takes a C style ansi string so is theoretically unbounded but, given the signature of the AddOpaque
which takes a u32 it would seem sensible to state that the limit is likely to be 4GB rather than 64MB.
That said using Tib to transfer such large packets is likely to be a serious performance bottleneck as it may have to buffer significant amounts of traffic as it tries to get these sorts of messages to all consumers. By default the rvd buffer is only 60 seconds so you may find yourself suffering message loss if this is a significant amount of your traffic.
Message overhead within tibco is largely as simple as:
Note: If you use nested messages simply recurse the above.
In your case the payload overhead will be so vast in comparison to the names (so long as they are reasonable and simple) there is little point attempting to optimize these at all.
You may find you can considerable efficiency on the wire/buffered if you transmit the strings in a compressed form, either through the use of an rvrd with compression enabled or by changing your producer/consumer to use something fast but effective like deflate (or if you're feeling esoteric things like QuickLZ,FastLZ,LZO,etc. Especially ones with fixed memory footprint compress/decompress engines)
You don't say which platform api you are targeting (.net/java/C++/C for example) and this will colour things a little. On the wire all string data will be in 1 byte per character regardless of java/.net using UTF-16 by default however you will incur a significant translation cost placing these into/reading them out of the message because the underlying buffer cannot be reused in those cases and a copy (and compaction/expansion respectively) must be performed.
If you stick to opaque byte sequences you will still have the copy overhead in the naieve implementations possible through the managed wrapper apis but this will at least be less overhead if you have no need to work with the data as a native string.
正如 OP 中推测的那样,消息的总体最大大小为 64MB。来自“Tibco Rendezvous Concepts”文档:
The overall maximum size of a message is 64MB as was speculated in the OP. From the "Tibco Rendezvous Concepts" document: