2 Replies Latest reply on Oct 31, 2012 10:18 PM by cwash

    Google Protocol Buffer transformer?

    cwash

      I saw this JIRA for natively tranforming Google Protobuf style messages, which looks like it's been around for a while:  https://issues.jboss.org/browse/SWITCHYARD-190

       

      I'd be interested in helping out with this if needed - but wanted to check here first and make sure it's still a valid concern...

        • 1. Re: Google Protocol Buffer transformer?
          kcbabo

          It's definitely still a valid concern.  I think the JIRA is really just waiting for someone with that requirement or an interest in the area.

           

          In terms of the configuration and mechanics of the transformer, I expect it would go something like this:

           

          - Create .proto definition

          - Compile .proto definition into Java classes

          - Use compiled Java classes in service contract

          - Define transform.proto in switchyard.xml which identifies source and target message names

           

          The configuration of transform.proto could be limited to source and target name alone, I imagine.  The transformer code simply calls the writeTo() or parseFrom() depending on the direction of the transform.


          One other thing to keep in mind is that the source and target names are pulled from the service contract.  When transforming from Java to GPB ,the source contract would be Java and the target contract would have to be ESB.  The ESB interface type is basically a generic contract for a service with one operation.  If we need to support multiple input/output message pairs (i.e. multiple operations), then we might need to go down the path of defining a GPB service interface which would represent the content of a .proto file.  The protocol definition language appears to support this via a service definition.

          • 2. Re: Google Protocol Buffer transformer?
            cwash

            Thanks, Keith - I'll take a stab at this.