protocol-buffers

How to use sbt-scalabuff plugin with sbt 0.13?

别等时光非礼了梦想. 提交于 2019-12-10 22:46:11
问题 I am trying to use sbt-scalabuff plugin, but sbt keeps complaining that the plugin cannot be found. The plugin documentation does not state out a resolver url, either. Is the plugin deprecated or my Scala version is not supported? Details: com.github.sbt:sbt-scalabuff:0.2 (sbtVersion=0.13, scalaVersion=2.10) Here is my plugins.sbt : libraryDependencies += "net.sandrogrzicic" %% "scalabuff-runtime" % "1.3.6" addSbtPlugin("com.github.sbt" %% "sbt-scalabuff" % "0.2") Here is part of the stack

Cross-Platform Protobuf Serialization

本秂侑毒 提交于 2019-12-10 22:38:38
问题 I have three applications that are communicating via ZeroMQ all performing different operations. The different applications are as follows: The first is a C++ application which is an engine for "hard work", this takes a Protobuf message as a request from a client, does some work, and returns a Protobuf message back to that client (or whoever is connected, Request/Reply Pattern). This uses 0MQ version 4.0.4 and using protobuf-2.6.0 where we have built the required header files ourselves, the

Play framework java.lang.NoClassDefFoundError only in dev mode

若如初见. 提交于 2019-12-10 21:18:08
问题 I am working with protobufs with the play framework 2.1.3 without issues. I then needed to convert the protobufs to JSON, so I included "com.googlecode.protobuf-java-format" % "protobuf-java-format" % "1.2" in Build.scala. Trying to covert any protobuf to JSON using JsonFormat.printToString(message); This leads to the following error when running in dev mode (started with play run) play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.NoClassDefFoundError: com/google

Error when decoding the Proto Buf messages in Spark Streaming , using scalapb

丶灬走出姿态 提交于 2019-12-10 21:13:29
问题 This is a Spark Streaming app that consumes Kafka messages encoded in Proto Buf . Using scalapb library. I am getting the following error. Please help. > com.google.protobuf.InvalidProtocolBufferException: While parsing a > protocol message, the input ended unexpectedly in the middle of a > field. This could mean either that the input has been truncated or > that an embedded message misreported its own length. at > com.google.protobuf.InvalidProtocolBufferException.truncatedMessage

App Engine and commons FileUpload

帅比萌擦擦* 提交于 2019-12-10 21:09:22
问题 I'm sending a message built with google's protocol buffer from and android device using this code: // Set up the HttpClient HttpClient client = new DefaultHttpClient(); String url = "http://192.168.2.103:8888/sdroidmarshal"; HttpPost postRequest = new HttpPost(url); // Create the content for the message AbstractContentBody[] parts = new AbstractContentBody[1]; InputStream ins = new ByteArrayInputStream(offers.build().toByteArray()); parts[0] = new InputStreamBody(ins, "sdroidmsg"); // Add the

Python gRPC Server Not Starting

白昼怎懂夜的黑 提交于 2019-12-10 20:59:39
问题 I've create a gRPC server using proto3 and python to do basic health checking on a long running daemon. When I start my application though, it doesn't actually start the gRPC server. I was wondering if anyone could help identify why it doesn't start and serve the gRPC API Proto Definition: health.proto syntax = "proto3"; option java_multiple_files = true; option java_package = "com.redacted.example.worker"; option java_outer_classname = "ExampleWorker"; option objc_class_prefix = "DSW";

Error: Illegal wire type for field Message.Field .protobuf.MessageTypeAck.sourceModuleID: 1 (0 expected)

大城市里の小女人 提交于 2019-12-10 18:42:55
问题 I've app that procude&consume message with kafka and protocol buffer and everything works great. I'm serialize the protocol buffer with SerializeAsString() (this app was written in c++). Now, I've added new node.js website that also consume messages and try to decode them. My js code (using the great ProtoBuf.js module): var builder = ProtoBuf.loadProtoFile("/home/aii/general/proto/All.proto"), protobuf = builder.build("protobuf"), Trace = protobuf.Trace, MessageType = protobuf.MessageType,

Protobuf-net serialization on sockets. No parameterless constructor found ProtoException

核能气质少年 提交于 2019-12-10 18:17:48
问题 I have created an application where interprocess communication is done using sockets. The procedure starts when a client connects with the server that I created and sends a serialized message. This message, I serialize using Protobuf-net, using SerializeWithLengthPrefix and deserialize it using DeserializeWithLengthPrefix. The client sends messages to the server who deserializes it perfectly, but the same is not true in the case of server to client. The main class is BaseMessage, which is

Implement gRPC in an iOS React Native app

China☆狼群 提交于 2019-12-10 17:47:51
问题 As described in this issue, we can't implement a gRPC client using the Node implementation because " RN is not pure Node ". So I started working on an Objective-C implementation using the Native Modules. [service postWithRequest:request handler:^(RequestConfirmation * _Nullable response, NSError * _Nullable error) { if (response) { // This prints correctly in my JS console RCTLogInfo(@"%@", response.message); // This generates an error, see below resolve(response); // This works NSDictionary

Protocol Buffers: How to parse a .proto file in Java

情到浓时终转凉″ 提交于 2019-12-10 17:27:40
问题 I am trying to dynamically parse a given .proto file in Java to decode a Protobuf-encoded binary. I have the following parsing method, in which the "proto" string contains the content of the .proto file: public static Descriptors.FileDescriptor parseProto (String proto) throws InvalidProtocolBufferException, Descriptors.DescriptorValidationException { DescriptorProtos.FileDescriptorProto descriptorProto = DescriptorProtos.FileDescriptorProto.parseFrom(proto.getBytes()); return Descriptors