Distributing the proto files to services written in different languages

478 views
Skip to first unread message

Aleksandar Vidaković

unread,
Apr 10, 2019, 3:12:34 PM4/10/19
to Protocol Buffers
Hi all,

I am new to protocol buffers and would like to get to know my options with the technology.

We have a monorepo with different services written in Java and Python and would like to use protobuf to define messages that are exchanged among these services.

I thought to have a separate folder with common .proto files in the same repo.
Question is how to distribute generated classes to appropriate services from these .proto files.

In the first run I though to do a compilation and copy the generated code to each service, but to be honest, don't know the right way in long run. 
Maybe having separate repo with proto files and do the compilation -> packaging -> publish using language-specific artifact distribution mechanism..

Would be so grateful for any input or idea, just to get out of the dark. :)

Alex

Derek Perez

unread,
Apr 10, 2019, 3:15:00 PM4/10/19
to Aleksandar Vidaković, Protocol Buffers
How do you do builds in your monorepo? If you adopt a tool like Bazel (bazel.build) you can use proto language build targets to automatically link language specific bindings to your neutral protobuf source files. It's really handy!

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages