Hi,

I have a Tuscany component that exposes a service via binding.rest and
this forms the public API of my application. I would like to be able
to version this service so that old clients can use the older version
of the API if they want to. Clients could specify the version they
want to invoke using a custom HTTP header, but if the header is
missing the request should be routed to the latest version of the
component by default.

Are there any suggestions on the best way to achieve this with Tuscany?

I could make a copy of the component for each supported version of the
API. Each component would expose the slightly different interface. But
can the be exposed at the same URL and requests routed based on a
header value? One possibility I considered was to make a new component
that would have a reference to all components that implement the
different API versions. But this routing component would itself need
to have a generic interface that accepts all incoming requests. I'm
not sure how to accomplish that.

Thanks
Anuj

Reply via email to