4

I need to define a binary protocol and use it from both C and Python written application. My question is, what is the right tool for the job so I won't need to implement the protocol parsing and building code in C and Python? I heard about Google's Protocol Buffers but their C implementation is not mature enough for the protocol. Is their a better substitute?

2
  • 2
    Are you planning on serialization of data and saving/loading from those applications, or on a RPC-like use? As I'm not sure of your question, this might/might not help: en.wikipedia.org/wiki/Thrift_%28protocol%29 Commented Oct 22, 2011 at 16:20
  • 4
    Protocol Buffers C++ implementation is very stable. My approach to a similar problem is to use C++ for the protocol and C for the functional part. Commented Oct 22, 2011 at 22:04

2 Answers 2

1

Look for state machine compilers like Ragel. They will generate compilable code based on a state machine specification.

Sign up to request clarification or add additional context in comments.

Comments

1

Take a look at MessagePack.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.