[removing dev and adding architecture] On Tue, Jun 20, 2017 at 11:39 AM, Thilini Shanika <[email protected]> wrote:
> 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 > +1 for the second approach of using a header to indicate all gateways should process the message. Introducing new events for all such requirements might lead to having a considerable number of events which are used seldom. Using the header based approach will stop unnecessary processing of events at gateways as well. > > Thanks > Thilini > > -- > Thilini Shanika > Senior Software Engineer > WSO2, Inc.; http://wso2.com > 20, Palmgrove Avenue, Colombo 3 > > E-mail: [email protected] > > -- Thanks and Regards, Isuru H. +94 716 358 048* <http://wso2.com/>*
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
