Friday, August 1, 2014

Implementing Forum Support for API Store (new feature)

Introduction to API Manager
As an organization implements SOA, it becomes beneficial to expose its core processes, data and services as APIs to the public. External parties can mash up these APIs in innovative ways to build new solutions. A business can increase its growth potential and partnership advancements by facilitating developments that are powered by its APIs. For example, the WSO2 Gadget Server leverages the Google Gadget API, ensuring that users of WSO2 Gadget Server can easily develop and deploy their own or third-party Google gadgets in it, in a simple, decentralized manner.


However, leveraging APIs in a collaborative manner introduces new challenges in exercising control, establishing trust, security and regulation. As a result, proper API management is crucial.
WSO2 API Manager overcomes these challenges through a set of features for API creation, publishing, life cycle management, versioning, monetization, governance, security etc. It provides Web interfaces for development teams to deploy and monitor APIs, and also an easy way to consumers to subscribe to, discover and consume APIs through a user-friendly storefront.

The WSO2 API Manager is an on-going project with continuous improvements and enhancements introduced with each new release to address new business challenges and customer expectations.

Implementing Analytics Dashboard for API Store (new feature)

Introduction to API Manager

As an organization implements SOA, it becomes beneficial to expose its core processes, data and services as APIs to the public. External parties can mash up these APIs in innovative ways to build new solutions. A business can increase its growth potential and partnership advancements by facilitating developments that are powered by its APIs. For example, the WSO2 Gadget Server leverages the Google Gadget API, ensuring that users of WSO2 Gadget Server can easily develop and deploy their own or third-party Google gadgets in it, in a simple, decentralized manner.
However, leveraging APIs in a collaborative manner introduces new challenges in exercising control, establishing trust, security and regulation. As a result, proper API management is crucial.
WSO2 API Manager overcomes these challenges through a set of features for API creation, publishing, life cycle management, versioning, monetization, governance, security etc. It provides Web interfaces for development teams to deploy and monitor APIs, and also an easy way to consumers to subscribe to, discover and consume APIs through a user-friendly storefront.

The WSO2 API Manager is an on-going project with continuous improvements and enhancements introduced with each new release to address new business challenges and customer expectations.

Netflow-Udp Input Event Adaptor for Complex Event Processor

NetFlow is a network protocol developed by Cisco for the collection and monitoring of network traffic flow data generated by NetFlow-enabled routers and switches. NetFlow-enabled routers export traffic statistics as NetFlow records which are then can be collected and used to analyze network traffic flow and volume to determine where traffic is coming from, where it is going to, and how much traffic is being generated.


NetFlow exports flow information in UDP datagrams in several formats ( for eg. Version 5, version 6, 9) .


For the real time analysis of a netflow information using a Complex Event Processor (CEP ) several steps must be taken before hand. Netflow udp datagrams should be collected by an appropriate listener and the desired netflow information must be extracted . Then the extracted details can be published as events to the CEP which can be received by an available CEP input event adaptor. wso2event , jms , email , ws-event-local and ws-event are the input event adaptor type implementations available in WSO2 CEP 3.0.0 by default. CEP can process and analyze the received events and output the results.


I’ve implemented a Netflow-Udp input adaptor to solve above problem.
In the Netflow-Udp input event adaptor jflow [1] library is used to listen on a given port for the Netflow Udp and to extract the information in the packet. Jflow supports netflow version 5 and 6.


Flow record format of netflow version 5



































Flow record format of netflow version 6



































These extracted netflow data are added to a java.util.Map and sent as an event.Then the desired input attributes can be easily mapped and written to a stream through a event builder.

Adding a new Netflow-Udp input event adaptor.


(Assumed that the particular adapter is deployed in the CEP  as an OSGI bundle)
  
Log in to the CEP management console, select Input Event Adaptors and click Add Input Event Adaptor.


Enter details in the form that appears and click Add Event Adaptor button at the end of the form.


For an example
























Fields of the above screen are described below:

host : Netflow data sending router IP
port: Netflow data receiving port


After the adaptor is successfully deployed it starts to listen on the given port for Netflow udp .




























Configuring an appropriate event builder for the newly created adaptor, user can decide on which
information should be sent to the CEP processor.


























For example below screen shows how the the newly created  event builder maps the two attributes Source Address and Current Data and writes in to a stream.