Hi All,

As per the APIM C5 architecture, the gateways can be registered in APIM
Core, specifying it's label and accessURLs. When creating/updating APIs,
the API can be moved to a gateway by assigning the label of the gateway
which registered under APIM Core. Once a label is assigned to an API, that
particular API will be deployed and available to the gateway/gateways
represented by the given label/labels.

Basically, all the API related actions(API create/update/delete/status
change) are published to JMS topic along with label information. The
gateways are responsible for listening to the topic, capture events which
are relevant and process them. Ideally, gateways should filter the events
based on API label and only process the events generated for APIs which are
assigned with their gateway labels and rest of the events should be
ignored.

But when it comes to label update, the gateways should behave differently,
due to the scenarios explained before. Though API label update is populated
as an API update event, some of the gateways have to process this API
updates differently(May be as an API create or may be as an API delete)

   - Moving API to a new gateway: When a new gateway label is assigned to
   an API, the event generated for the gateways with newly added label/labels
   is an API create event and the API should be deployed to the
   gateway/gateway with newly added label/labels.
   - Remove API from a gateway: When a label is removed from an API, the
   event generated to the gateway with the removed label is an API delete
   event and API should be undeployed from that gateway.

We came up with few solutions in order to handle label related API update
events.

   - Introducing a new event on API label update:

           During an API update, we need to identify whether there is a
label change and populate a label update event with label change details
(ie: newly added label/previous labels).  The gateways can read the label
change information and decide whether it is relevant to process the event
and perform API deploy/undeploy actions accordingly.

   - Introducing a header/property to force every API gateway to process an
   label update related event:

            If there is a label update, a property is set to JMS event so
that every gateway should process the events generated with that particular
property. Ideally, the gateways process API events generated with its own
gateway label, but in this case, they have to process the event if it comes
with this property.

Any suggestions on this? Your thoughts and suggestions are highly
appreciated

Thanks
Thilini

-- 
Thilini Shanika
Senior Software Engineer
WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3

E-mail: [email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to