protocol-buffers

Organization of protobuf files in a microservice architecture

时间秒杀一切 提交于 2020-01-03 08:53:10
问题 In my company, we have a system organized with microservices with a dedicated git repository per service. We would like to introduce gRPC and we were wondering how to share protobuf files and build libs for our various languages. Based on some examples we collected, we decided at the end to go for a single repository with all our protobuf inside, it seems the most common way of doing it and it seems easier to maintain and use. I would like to know if you have some examples on your side ? Do

Organization of protobuf files in a microservice architecture

孤街浪徒 提交于 2020-01-03 08:53:10
问题 In my company, we have a system organized with microservices with a dedicated git repository per service. We would like to introduce gRPC and we were wondering how to share protobuf files and build libs for our various languages. Based on some examples we collected, we decided at the end to go for a single repository with all our protobuf inside, it seems the most common way of doing it and it seems easier to maintain and use. I would like to know if you have some examples on your side ? Do

Jmeter protobuf testing. Could not read Protobuf message

夙愿已清 提交于 2020-01-02 22:06:14
问题 I am testing one project via protobuf protocol and using HTTP Request Sampler. The target appserver is also written on Java. There is a problem with errors in reponses: "Could not read Protobuf message: Protocol message contained an invalid tag (zero).; nested exception is com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero)" The case is that it is happening not in 100% requests. When i used HttpClient4 it was about 30-40% of failed requests.

have to create java pojo for the existing proto includes Map

妖精的绣舞 提交于 2020-01-02 10:04:36
问题 I have tried converting proto to java pojo . But got the error [Stderr] Order.proto:12:18: Expected "required", "optional", or "repeated". [Stderr] Order.proto:12:21: Expected field name. optional int32 orderID = 1; optional int32 quantity = 2; map<string,string> map_field = 4; repeated string product = 3; Please help me what needs to be changed. i searched on google protobuf developer site https://developers.google.com/protocol-buffers/docs/proto#maps It says that Map fields cannot be

google.protobuf installed, but module not found

点点圈 提交于 2020-01-02 09:27:24
问题 I have installed protobuf but when I run my script that uses pb.py it complains: from google.protobuf import descriptor as _descriptor ImportError: No module named google.protobuf However when I run protoc --version I see libprotoc 2.6.1 The previous posts say to see if protobuf is within the path of python, I can't find the protobuf path though. Can anyone tell me what I'm doing wrong? I'm running Yosemite. 回答1: I had that exact problem yesterday. Basically you have protoc already, you just

Several shared object using same proto leading the the error: file already exists in database

人盡茶涼 提交于 2020-01-01 19:01:26
问题 An error related to protobuf3 I have a project that have an c++ executable core, and several shared objects (.so, .dll) called plugins. When the core launches, it will load those plugins with dlopen. The core and plugins using protobuf as communication protocol, so they have to compile the generated .pb.cc and .ph.h files into their binaries to have the copy of the serializer/deserializer. And libprotobuf.so link to both the core and plugins. When I launch the core, it crushes with error:

Serialize protocol buffer file into xml/text format

折月煮酒 提交于 2020-01-01 17:08:30
问题 I am using protocol buffer in .net http://code.google.com/p/protobuf-net/. I installed the visual studio support version, which I can just write proto file in project and it generates csharp class files automatically. A lot of times that I need to dump the files into xml(or another text format if available) file. I found that there is a method Serializer.Serialize() which takes an XmlWriter parameter. I tried to use it but it complains that the protobuf type I defined must be convertible to

Build protobuf on Windows with MinGW

送分小仙女□ 提交于 2020-01-01 15:36:19
问题 I have been following the steps in Peter's answer to How to build Google's protobuf in Windows using MinGW? but make does not complete and errors out. I am on Win64 and have MinGW with installed the mingw-developer-toolkit , mingw32-base , mingw-gcc-g++ , msys-base and additionally mingw32-phtreads-w32 . Under MinGW/msys/1.0 I create the folder /home/<username> and paste the protobuf-3.1.0 source downloaded from github. I open an MSYS shell, cd into the protobuf dir and run ./autoconfig : the

Automate compilation of protobuf specs into python classes in setup.py

你。 提交于 2020-01-01 14:42:53
问题 I have a python project that uses google protobufs as a message format for communicating over the network. Generating python files from the .proto files is straight-forward using the protoc program. How can I configure my setup.py file for the project so that it automatically calls the protoc command? 回答1: In a similar situation, I ended up with this code (setup.py, but written in a way to allow extraction into some external Python module for reuse). Note that I took the generate_proto

Using Google Protocol Buffers with Java NIO?

血红的双手。 提交于 2020-01-01 11:56:52
问题 I'm currently playing around with java.nio , which I haven't been using for a long time. I use Google Protocol Buffers for serialization and for communication with other parts of my system. Now I can't figure out if/how it is possible to get use protobuffers with java.nio classes. I can't imagine that Google is using only "one thread per connection" with networked protocol buffers. Could anyone give me a pointer on how to integrate the two? Thanks in advance! Martin 回答1: I suggest Netty,