Yes, this is intended to work. The client and server perform a
handshake that ensures that each has the other's protocol. Message
parameters are treated as a record. So, in your example, the server
would ignore the date parameter. If the server adds a parameter then it
should supply a default value to its version of the protocol to allow
for clients that do not supply this parameter.
Doug
On 05/24/2011 08:57 PM, Yang wrote:
> I remember that Avro can handle schema changes, for example: when I
> parse an incoming avro message, I can supply the known schema
> associated with this message,
> and the desired schema to parse it into.
>
>
> but I wonder if this ability is automatically available in RPC too?
>
> for example , originally I define a remote call echo() to be
>
> echo ( message {
> date: integer,
> content: string,
> }
> )
>
>
> now the client still uses the old code, but server changes to
>
> echo ( message {
> content: string
> }
> )
>
>
> would that still work? if so, I wonder where the server gets the
> incoming schema?
>
> Thanks a lot
> Yang