You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Thilini Gamage <tg...@gmail.com> on 2013/06/01 08:44:59 UTC

Acceptance of GSOC proposal for 'Versioning of Synapse config artifacts'

Hi all,
The proposal for "Versioning of Synapse Configuration Artifacts" (
https://issues.apache.org/jira/browse/SYNAPSE-928#comment-13640199) that I
have submitted to "Apache Software Foundation" has been accepted for Google
Summer of Code 2013.
In the proposal
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/thilinis/1 I
have discussed the strategy to enable versioning for Synapse artifacts in
detail. As the first step of starting the project, I have started studying
how the API versioning is enabled and further as the next step I hope to
start the implementations in order to enable versioning for sequences.
Thank you

Re: Acceptance of GSOC proposal for 'Versioning of Synapse config artifacts'

Posted by Udayanga Wickramasinghe <ma...@gmail.com>.
Hi Thilini ,
Congratulations on your acceptance to GSoC 2013.. API artifacts are a good
place to start from , although implementation will probably differ for
other synapse artifacts that are there. Let me give you a
very brief introduction on how APIs work..Initially when synapse tries to
build APIs (object model) it will look for API elements in respective api
folders (synapse-config/api) and/or synapse.xml at server startup OR at
deployment (synapse-config/api) folders after the server startup. It will
delegate this task to API Factory classes
(org.apache.synapse.config.xml.rest.APIFactory ,
org.apache.synapse.config.xml.rest.VersionStrategyFactory ,etc) and in turn
save them (appropriately converting versioned APIs to a unique name) in
SynapseConfiguration for later use. At runtime when a http request (REST)
arrives on synapse it will delegate this towards RestHandler to process the
given message through one of the available APIs (by searching through all
available APIs in SynapseConfiguration ). Once the respective API is found
( otherwise request would be dispatched to the main sequence and skipping
API processing) request is validated for versions (by request URL ,etc) and
dispatched accordingly to the versioned API artifact in which respective
request handling logic takes place.. (look at
org.apache.synapse.rest.RESTRequestHandler, org.apache.synapse.rest.API,
org.apache.synapse.rest.version.URLBasedVersionStrategy) ..
Note that this dispatching strategy varies by the artifact such as proxy
services,endpoints, sequences,etc and you have to find mechanisms to
dispatch request appropriately which may take some work. For example
externally facing artifacts like proxy services should be dispatched by
request url,body or headers,etc while internal artifacts like sequences
could be dispatched with a sequence key.. Hope the above information helps
you get started..

Regards
Udayanga



On Sat, Jun 1, 2013 at 2:44 AM, Thilini Gamage <tg...@gmail.com> wrote:

>
> Hi all,
> The proposal for "Versioning of Synapse Configuration Artifacts" (
> https://issues.apache.org/jira/browse/SYNAPSE-928#comment-13640199) that
> I have submitted to "Apache Software Foundation" has been accepted for
> Google Summer of Code 2013.
> In the proposal
> http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/thilinis/1 I
> have discussed the strategy to enable versioning for Synapse artifacts in
> detail. As the first step of starting the project, I have started studying
> how the API versioning is enabled and further as the next step I hope to
> start the implementations in order to enable versioning for sequences.
> Thank you
>
>
>
>



-- 
http://www.udayangawiki.blogspot.com