Coder Social home page Coder Social logo

zmqpbexample's Introduction

---------------
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

zmqpbexample's People

Contributors

joshrotenberg avatar

Stargazers

Andrew Kapocsi avatar  avatar  avatar Robert Edwards avatar Masaya Kataoka avatar  avatar  avatar Joe Gilkey avatar Pankaj Raghav avatar  avatar jinlj avatar Junhyeok Ahn avatar Guillaume Beuzeboc avatar  avatar biangbiangmian avatar  avatar Mikhail avatar Carlos Gomes Martinho avatar  avatar  avatar NASA avatar  avatar  avatar Denis Trailin avatar apppur avatar chenbk avatar Xe Iaso avatar Remy Goldschmidt avatar Angus H. avatar Marin Atanasov Nikolov avatar PraveenKumar Vasudevan avatar Michelangelo Partipilo avatar Yang Xiaowei avatar szhou avatar  avatar Dillon Erb avatar kannan avatar D avatar  avatar Scott MacDonald avatar C.S. Lim avatar Dmitry Ledentsov avatar Sebastian Lauwers avatar Don avatar Oli N. avatar Ben Brandt avatar Darcy Tang avatar Hung Le avatar  avatar harmy avatar  avatar

Watchers

 avatar James Cloos avatar  avatar Carlos Gomes Martinho avatar  avatar  avatar  avatar

zmqpbexample's Issues

Example with python

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?

Example not working with newer versions of protobuf

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.