Re: [protobuf] Define pubsub like rpc in protobuf file

2017-04-12 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Apr 11, 2017 at 3:59 PM, 'Alex Barlow' via Protocol Buffers < protobuf@googlegroups.com> wrote: > Ah yes, > > So I've done something similar, however the problem is that the pub sub > extension would be a library. So using the 'Broadcasts' enum wouldn't scale > as I couldn't foresee all

Re: [protobuf] Define pubsub like rpc in protobuf file

2017-04-11 Thread 'Alex Barlow' via Protocol Buffers
Ah yes, So I've done something similar, however the problem is that the pub sub extension would be a library. So using the 'Broadcasts' enum wouldn't scale as I couldn't foresee all the events that a particular service might implement and I'd want the developer to define their own enum. So I

Re: [protobuf] Define pubsub like rpc in protobuf file

2017-04-11 Thread 'Feng Xiao' via Protocol Buffers
Not sure if this is what you are asking for, but the following proto compiles for me: syntax = "proto3"; import "google/protobuf/descriptor.proto"; enum Broadcasts { HELLO = 0; CREATED = 1; } enum ReturnTypes { HELLO_REPLY = 0; } message Publisher { Broadcasts name = 1; ReturnTypes

[protobuf] Define pubsub like rpc in protobuf file

2017-04-11 Thread 'Alex Barlow' via Protocol Buffers
Hi all, I was hoping for some advice for designing my publish subscribe system on top of protobuf and rpc. The idea is that a developer may have defined set of messages, a normal service and some rpc methods which they then augment with some publishers and subscribers. For example, given this