joshrotenberg / zmqpbexample Goto Github PK
View Code? Open in Web Editor NEWexample of zeromq with protocol buffers
License: Other
example of zeromq with protocol buffers
License: Other
--------------- zmqpbexample This is just a small example of using Protocol Buffers with ZeroMQ in C++. I'm using another queue-based system with Protocol Buffers and wanted to play around with ZeroMQ as an alternative without rewriting everything right away, and figured this example might be useful to someone else as well. This example produces a small library for a server class, and a binary that runs the server and acts as a client, so it is completely self contained, i.e. running the zmqpbexample is all you need to do to see it in action. Obviously, the code itself is more interesting than running it, but this setup makes it easier to test. Dependencies: * ZeroMQ - http://www.zeromq.org/ * Protocol Buffers - http://code.google.com/apis/protocolbuffers/ Build: bash$ ./configure bash$ make Run: bash$ ./src/zmqpbexample Note: This example might not work with newer versions of protobuf. In that case you will need to regenerate the protobuf related files and then build. Regenerating protobuf files: bash$ protoc -I=protobuf --cpp_out=src/ protobuf/zmqpbexample.proto
Hi,
First of all I really appreciate valuable example here.
As a newbie for zmq and protobuf, the example is super helpful.
Could you also write a similar example with python?
Hey! Thanks a lot for the amazing example. However, I had to recompile my protobuf with the following command protoc -I=. --cpp_out=src/ .zmqpbexample.proto
from the home folder for the example to work. Do you want to include it in the README or as a part of the configuration? I can create a PR if you want the former option.
Error message fyi:
In file included from zmqpbexample.pb.cc:5:0: zmqpbexample.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^~~~~ zmqpbexample.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^~~~~ zmqpbexample.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^~~~~ zmqpbexample.pb.cc:13:10: fatal error: google/protobuf/wire_format_lite_inl.h: No such file or directory #include <google/protobuf/wire_format_lite_inl.h>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.