简体   繁体   English

Java:有没有人通过网络使用谷歌协议缓冲区的示例项目?

[英]Java: Anybody have an example project using google protocol buffers over a network?

我不确定如何使用谷歌协议缓冲区发送消息来启动,所以如何构建消息,发送消息和重建消息的示例将是非常棒的。

It is fairly trivial if you are using Spring Boot: 如果你使用Spring Boot,这是相当简单的:

http://spring.io/blog/2015/03/22/using-googl http://spring.io/blog/2015/03/22/using-googl ...

If you are using JavaScript as part of your set up at a front end, there are some gotchas such as jQuery trying to de-seralize your data under the hood etc. Better to use XMLHttpRequest and arraybuffer types if so. 如果你使用JavaScript作为前端设置的一部分,那么有一些问题,例如jQuery试图在引擎盖下取消数据分类等。如果是这样,最好使用XMLHttpRequest和arraybuffer类型。

The outcome of a protobuf is a byte array that can be transported over many protocols like HTTP (using POST). protobuf的结果是一个字节数组,可以通过HTTP(使用POST)等许多协议进行传输。 If you want a low level RPC mechanism then there are many RPC plugins available. 如果您需要低级RPC机制,那么有许多RPC插件可用。 You can find the list here . 你可以在这里找到清单。 You can also get the example usage on their respective websites. 您还可以在各自的网站上获取示例用法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java和Google协议缓冲区:有没有人有一个简单的入门例子? - Java & Google Protocol Buffers: Does anyone have a simple example of getting started with this? 将Google协议缓冲区与Java NIO一起使用? - Using Google Protocol Buffers with Java NIO? Google协议缓冲区在网络软件中的作用 - The role of Google Protocol Buffers in network software 哪里可以找到protobuf.jar在Java中使用Google协议缓冲区? - Where to find protobuf.jar for using Google protocol buffers in Java? 在Java EE中使用协议缓冲区? - Using Protocol Buffers in Java EE? 使用Eneter Messaging和Protocol Buffers在3g网络上的端口80上启动tcp服务器的权限被拒绝 - Permission denied to start tcp server on port 80 over 3g network using Eneter Messaging and Protocol Buffers 使用Objective-C和Java的Google协议缓冲区 - Google Protocol Buffers with Objective-C and Java 如何在 Java 中初始化 Google 协议缓冲区时间戳? - How to initialize Google protocol buffers Timestamp in Java? 在带有 Protocol Buffers 的项目中使用 Proguard 有哪些特点? - What are features of using Proguard in project with Protocol Buffers? 将 Spark 的 Kryo 序列化器与具有字符串数组的 java 协议缓冲区一起使用时出错 - Error using Spark's Kryo serializer with java protocol buffers that have arrays of strings
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM