Thanks for your comments Thierry.

From: Thierry Boileau 
<thierry.boil...@noelios.com<mailto:thierry.boil...@noelios.com>>
Reply-To: discuss 
<discuss@restlet.tigris.org<mailto:discuss@restlet.tigris.org>>
Date: Wed, 7 Dec 2011 05:58:52 -0600
To: "discuss@restlet.tigris.org<mailto:discuss@restlet.tigris.org>" 
<discuss@restlet.tigris.org<mailto:discuss@restlet.tigris.org>>
Subject: Re: Multiple versions of API in production

Hello Paul,

just of few thoughts, I've no precise answer.
Using a Redirector, you keep an API stable pointing to the desired version but 
from the point of view of the client, all of this is transparent and you're 
likely to expose only one API. If this is desired, don't hesitate. The 
Redirector is quite quick, it does not instantiate a new Request each time 
(especially it does not read and rewrite the entity). If you want the clients 
to access any versions, these versions must appear, and the redirections won't 
be transparent. You can still use a Redirector but in one of the following 
modes : MODE_CLIENT_PERMANENT, MODE_CLIENT_FOUND, MODE_CLIENT_SEE_OTHER, 
MODE_CLIENT_TEMPORARY.

Best regards,
Thierry Boileau

Trying to implement some sort of versioning for an enterprise API. It could 
interface with external APIs eventually so I want to do it right.

Resources will likely be grouped into war files (or maybe even JSE apps at some 
point who knows) that will be deployed on the server and the idea is to be able 
to have multiple versions live at the same time if need be. So in the case of 
war files in a container there might be a bundle1012.war with a context base of 
../v1.0.12/bundle and a bundle1013.war with a base of ../v1.0.13/bundle etc.)

I was thinking of having a Redirector running at root and rewriting the URL 
based on conditions (a la ../bundle/resource redirected to 
../v1.0.12/bundle/resource). So for one case it could redirect every call to 
the latest version but then make it easy for me to back out and use the 
previous version. Or it could read attributes of the request and act on those 
to redirect some clients to one version and others to another.

Any thoughts on this? Comments on latency from the redirection? Am I going 
about this the right way? Any recommended reading?

Thanks.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2890410

This message and any included attachments are intended only for the addressee. 
The information contained in this message is confidential and may constitute 
proprietary or non-public information under international, federal, or state 
laws. Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2891962

Reply via email to