Structure names used during (de-)serialization are unqualified
--------------------------------------------------------------

                 Key: THRIFT-8
                 URL: https://issues.apache.org/jira/browse/THRIFT-8
             Project: Thrift
          Issue Type: Bug
            Reporter: Johan Stuyts


When a structure is serialized it passes its name to the protocol. This is done 
to enable reflection-based protocols.

The name passed to the protocol is unqualified, so all structure names are part 
of a single namespace. This can easily lead to name clashes. The problem not 
only affects user-defined structures but also functions of services, as each 
function introduces two structures (one for its parameters and one for its 
result).

I suggest that a new namespace is used to qualify structure names, for example: 
thrift.serialization:
{code:none}namespace thrift.serialization com.acme.product.component{code}

In addition names of structures for function parameters and results should be 
qualified with the name of the service the function is part of:
{code:none}com.acme.product.component.SomeService.someFunction_args
com.acme.product.component.AnotherService.someFunction_args{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to