[Architecture] BAM Milestones

Samisa Abeysinghe samisa at wso2.com
Wed Sep 23 09:02:46 EDT 2009


For BAM events, I have documented the event formats in the code itself, as
of now.
I will extract those to formal docs as we go on.

If one is implementing using another stack, they can publish the events in
the given formats, and our mesage receivers can pupulate those data to the
DB.

I have given below the message formats copied from the code comments:

Service Data:

/**
 * Statistics Eventing MessageReceiver can process the messages fired by the
BAM service statistics data publisher.
 * It is capable of picking up, sytem, service and operation level stat data
from the messages received.
 * Expected message format:
 *
 * (01) <statdata:Event xmlns:statdata="
http://wso2.org/bam/service/statistics/data">
 * (02)     <statdata:ServiceStatisticsData>
 * (03)         <statdata:ServerName>http://127.0.0.1:9763
</statdata:ServerName>
 * (04)
<statdata:AveageResponseTime>16.4</statdata:AveageResponseTime>
 * (05)
<statdata:MinimumResponseTime>0</statdata:MinimumResponseTime>
 * (06)
<statdata:MaximumResponseTime>109</statdata:MaximumResponseTime>
 * (07)         <statdata:RequestCount>21</statdata:RequestCount>
 * (08)         <statdata:ResponseCount>20</statdata:ResponseCount>
 * (09)         <statdata:FaultCount>0</statdata:FaultCount>
 * (10)         <statdata:ServiceName>HelloService</statdata:ServiceName>
 * (11)         <statdata:OperationName>greet</statdata:OperationName>
 * (12)     </statdata:ServiceStatisticsData>
 * (13) </statdata:Event>
 *
 * Note that ServiceName element MUST be present if the message represents
service specific data.
 * If the message is about operation specific data, then both ServiceName
element and OperationName element MUST be
 * present. If it is system level data, nither the ServiceName nor the
OperationName are expected in the message.
 *
 * Schema for message format:
 *
 * <?xml version="1.0" encoding="utf-8" ?>
 * <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 *           targetNamespace="http://wso2.org/bam/service/statistics/data"
 *           tns="http://wso2.org/bam/service/statistics/data">
 *
 * <xsd:element name="Event">
 *   <xsd:complexType>
 *     <xsd:sequence>
 *       <xsd:element name="ServiceStatisticsData">
 *         <xsd:complexType>
 *           <xsd:sequence>
 *             <xsd:element name="ServerName" type="xsd:string"/>
 *             <xsd:element name="AveageResponseTime" type="xsd:decimal"/>
 *             <xsd:element name="MinimumResponseTime" type="xsd:long"/>
 *             <xsd:element name="MaximumResponseTime" type="xsd:long"/>
 *             <xsd:element name="RequestCount" type="xsd:integer"/>
 *             <xsd:element name="ResponseCount" type="xsd:integer"/>
 *             <xsd:element name="FaultCount" type="xsd:integer"/>
 *             <xsd:element name="ServiceName" type="xsd:string"
minOccurs="0"/>
 *             <xsd:element name="OperationName" type="xsd:string"
minOccurs="0"/>
 *           </xsd:sequence>
 *         </xsd:complexType>
 *       </xsd:element>
 *     </xsd:sequence>
 *   </xsd:complexType>
 * </xsd:element>
 * </xsd:schema>
 */


User defined data (We use the same for capturing mediation data)

/**
 * Server level User Defined Data Eventing MessageReceiver can process the
messages that contain sever level user
 * defined data that has key/value pairs defined by users to capture custom
data to be stored with BAM database.
 * Expected message format:
 *
 * (01) <svrusrdata:Event xmlns:svrusrdata="
http://wso2.org/bam/server/user-defined/data">
 * (02)    <svrusrdata:ServerUserDefinedData>
 * (03)        <svrusrdata:ServerName>http://127.0.0.1:8280
</svrusrdata:ServerName>
 * (04)        <svrusrdata:Data>
 * (05)
 <svrusrdata:Key>EndpointInMaxProcessingTime-simple</svrusrdata:Key>
 * (06)            <svrusrdata:Value>15</svrusrdata:Value>
 * (07)        </svrusrdata:Data>
 * (08)        <svrusrdata:Data>
 * (09)
 <svrusrdata:Key>EndpointInAvgProcessingTime-simple</svrusrdata:Key>
 * (10)            <svrusrdata:Value>15.0</svrusrdata:Value>
 * (11)        </svrusrdata:Data>
 * (12)        <svrusrdata:Data>
 * (13)
 <svrusrdata:Key>EndpointInMinProcessingTime-simple</svrusrdata:Key>
 * (14)            <svrusrdata:Value>15</svrusrdata:Value>
 * (15)        </svrusrdata:Data>
 * (16)        <svrusrdata:Data>
 * (17)            <svrusrdata:Key>EndpointInCount-simple</svrusrdata:Key>
 * (18)            <svrusrdata:Value>1</svrusrdata:Value>
 * (19)        </svrusrdata:Data>
 * (20)        <svrusrdata:Data>
 * (21)
 <svrusrdata:Key>EndpointInFaultCount-simple</svrusrdata:Key>
 * (22)            <svrusrdata:Value>0</svrusrdata:Value>
 * (23)        </svrusrdata:Data>
 * (24)        <svrusrdata:Data>
 * (25)            <svrusrdata:Key>EndpointInID</svrusrdata:Key>
 * (26)            <svrusrdata:Value>simple</svrusrdata:Value>
 * (27)        </svrusrdata:Data>
 * (28)        <svrusrdata:Data>
 * (29)
 <svrusrdata:Key>EndpointInCumulativeCount-simple</svrusrdata:Key>
 * (30)            <svrusrdata:Value>3</svrusrdata:Value>
 * (31)        </svrusrdata:Data>
 * (32)        <svrusrdata:Data>
 * (33)
 <svrusrdata:Key>EndpointOutCumulativeCount-simple</svrusrdata:Key>
 * (34)            <svrusrdata:Value>0</svrusrdata:Value>
 * (35)        </svrusrdata:Data>
 * (36)    </svrusrdata:ServerUserDefinedData>
 * (37) </svrusrdata:Event>
 *
 * Schema for message format:
 *
 * <?xml version="1.0" encoding="utf-8" ?>
 * <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 *           targetNamespace="http://wso2.org/bam/server/user-defined/data"
 *           tns="http://wso2.org/bam/service/statistics/data">
 *
 * <xsd:element name="Event">
 *   <xsd:complexType>
 *     <xsd:sequence>
 *       <xsd:element name="ServerUserDefinedData">
 *         <xsd:complexType>
 *           <xsd:sequence>
 *             <xsd:element name="ServerName" type="xsd:string"/>
 *             <xsd:element name="Data" minOccurs="0" maxOccurs="unbounded">
 *                <xsd:complexType>
 *                   <xsd:sequence>
 *                     <xsd:element name="Key" type="xsd:string"/>
 *                     <xsd:element name="Value" type="xsd:string"/>
 *                   </xsd:sequence>
 *                </xsd:complexType>
 *            </xsd:element>
 *           </xsd:sequence>
 *         </xsd:complexType>
 *       </xsd:element>
 *     </xsd:sequence>
 *   </xsd:complexType>
 * </xsd:element>
 * </xsd:schema>
 */



On Tue, Sep 22, 2009 at 9:10 PM, Paul Fremantle <paul at wso2.com> wrote:

> Is there a clean published WS-Eventing API that we could implement in
> .NET or another stack?
>
> Paul
>
> 2009/9/20 Samisa Abeysinghe <samisa at wso2.com>:
> > I have added a mediation stat pub component that is capable of collecting
> > mediation data from ESB with eventing model. I have updated the BAM
> > component to sub and receive these event data from ESB.
> > I used server level custom data table with key/value pairs to collect
> these
> > data. So this is also a POC of the custom BAM data collection capability
> > that is available for the users to do their own monitoring.
> > As of now, we just have the data published to the database. We need to
> > design a stat and pattern collection based on these raw data. Also, I am
> yet
> > to upgrade to the new eventing component.
> > Thanks,
> > Samisa...
> > On Sun, Sep 6, 2009 at 1:44 PM, Ruwan Linton <ruwan at wso2.com> wrote:
> >>
> >> Samisa Abeysinghe wrote:
> >> >
> >> >
> >> > On Sat, Sep 5, 2009 at 9:18 AM, Ruwan Linton <ruwan at wso2.com
> >> > <mailto:ruwan at wso2.com>> wrote:
> >> >
> >> >     Sanjiva Weerawarana wrote:
> >> >     > One of the things that will be useful (for BAM) is the ability
> to
> >> >     > queue up the events and only pump them out asynchronously. The
> >> >     > advantage of course is that the main business of the server is
> >> > least
> >> >     > affected by the presence of BAM that way.
> >> >     >
> >> >     > Ruwan, I don't think you've started on the priority queue stuff
> >> > yet
> >> >     > right?
> >> >     You are right! :-) I didn't get a chance to go for it yet.
> >> >     > I wonder whether there's a way to share that work here ..
> >> > basically
> >> >     > what's needed is a queue plus a work thread (or threadpool) to
> >> >     execute
> >> >     > the event publish call. Conceptually that's no different than
> >> >     picking
> >> >     > up messages from transports, queuing them up to different queues
> >> > (or
> >> >     > whatever we for managing priorities) and then having the work
> >> >     threads
> >> >     > dispatch them to the Axis engine for processing.
> >> >     Yes, it should be possible. What we need is a library which
> supports
> >> >     message queuing and use that for the transport when you need it
> >> >     (priority queuing should be plugable and configurable) and for BAM
> >> > by
> >> >     default.
> >> >
> >> >
> >> > So like in the case of event broker, I suppose priority queuing will
> >> > be a "service" offered by a component?
> >> Yes.. we need to make it work that way :-)
> >>
> >> Ruwan
> >> >
> >> > Samisa...
> >> >
> >> > P.S. I love this component model, I just have to do my bit, and the
> >> > rest just works :) e.g. eventing, queuing all are up for grabs for
> free
> >> > :)
> >> >
> ------------------------------------------------------------------------
> >> >
> >> > _______________________________________________
> >> > Architecture mailing list
> >> > Architecture at wso2.org
> >> > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
> >> >
> >>
> >>
> >> --
> >> Ruwan Linton
> >> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> >> WSO2 Inc.; http://wso2.org
> >> email: ruwan at wso2.com; cell: +94 77 341 3097
> >> blog: http://blog.ruwan.org
> >>
> >>
> >>
> >> _______________________________________________
> >> Architecture mailing list
> >> Architecture at wso2.org
> >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
> >
> >
> >
> > --
> > Samisa Abeysinghe
> > Director, Engineering - WSO2 Inc.
> >
> > http://www.wso2.com/ - "The Open Source SOA Company"
> >
> > _______________________________________________
> > Architecture mailing list
> > Architecture at wso2.org
> > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
> >
> >
>
>
>
> --
>
> --
> Paul Fremantle
> CTO and Co-Founder, WSO2
> OASIS WS-RX TC Co-chair
> VP, Apache Synapse
>
> Office: +44 844 484 8143
> Cell: +44 798 447 4618
>
> blog: http://pzf.fremantle.org
> paul at wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> _______________________________________________
> Architecture mailing list
> Architecture at wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>



-- 
Samisa Abeysinghe
Director, Engineering - WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wso2.org/pipermail/architecture/attachments/20090923/a33b2998/attachment.html>


More information about the Architecture mailing list