Events notification (presentation) using WSO2 technologies

The post is about creating a dashboard to display event notifications using few of WSO2 Technologies.

Requirement : Capture events from an event sender and display it in a dashboard

Used Technologies : WSO2 Enterprise Service Bus, WSO2 Application Server, WSO2 Gadget Server

Architecture : In brief, events are generated randomly, ESB will act as an event sink, and it will publish the events to the subscribed parties (to a service deployed in WSO2 AS). There is a gadget deployed in WSO2 Gadget Server where it will poll the received events from the service periodically.

HOWTO :

The ESB

At the ESB end we will have to set up the event sink as following,

https://gist.github.com/1653037.js?file=synapse.xml

Then you need to create a topic in the ESB and subscribe the created service. Steps in doing so is documented here

The Service

A very simple service to accumulate the events (this is not at all production grade, who whats to keep all the event in memory 😉 )

https://gist.github.com/1653077.js?file=TrafficEventReceiverService.java

The Client

Its too long to post, you can check it at https://gist.github.com/1653062

You can run the client like “ant trafficevent -Dtrpurl=http://localhost:8280 -Devent=traffic.is.crazy

The Gadget
https://gist.github.com/1653079.js?file=TrfficEventGadget.xml
In Action

 

A simple tool for all sorts of diagrams

Recently I had to draw some solutions architecture diagrams, and searched some good tools for diagramming. I have used Visio, long time back, nice tool, but I wanted to stick to Ubuntu and didn’t like switching back and forth. I tried Dia and Umbrello but they couldn’t really content me.

What I really digged in a nice architecture diagram is mainly its simplicity (Simple way the complex scenarios are drawn), fresh, elegant and rich look, as for a diagramming tool, it has to be simple (don’t have to be an artist) and flexible (should be able to draw new shapes if needed etc)

Sometime back I have used “Pencil” to draw some wire frames for a web app I was creating, I really liked the tool, and the final look and feel of the diagram it created. Non of the advance diagramming tools generated such a rich look and feel. So I thought of creating few custom stencils to graduate Pencil from a wire-framing tool to a full fledged multipurpose diagramming tool.

I created Three stencils to draw most of the enterprise architecture diagrams, following diagram is a sample solutions architecture diagrams I created using Pencil, and the custom stencils I created.

The stencils I have created are,

So if you are interested go ahead download the stencils, and install them in “Pencil” and if you still haven’t tried “Pencil”, I highly recommend it.

“Jaggery” – A web{app/service} completely in Javascript

At WSO2 we are busy with something new for the new year 🙂 and we have just pushed the milestone-1 of it, not so complete but you can sure taste it. Everybody knows that WSO2 is big on Web Services, but over the years we have seen that the barrier between Web Services and Web Applications hasn’t been lowered. “Jaggery” is an effort to diminish this barrier and to merge the development process of services and applications.

By definition it is a framework to write webapps and HTTP-focused web services in pure Javascript for all aspects of the application: front-end, communication, Server-side logic and persistence, and yes as I mentioned one of the intents of the framework is to reduce the gap between writing web apps and web services.

In general web engineers are fond of javascript (and JSON of cause), so why not write the server piece, persistence logic and the communication in-between also in JS itself ?

“Jaggery” helps you to do just that! Right now, the Javascript you compose will be fetched by Rhino engine and execute at the server, At Milestone-1 we have pushed features such as,

  • Compose server side web pages (HTML templates) : Server logic written in javascript (.JSSP)
  • Compose server side scripts purely in javascript (.JSS)
  • Includes support for,
    • HTTP request/response and session
    • JSON send/receive
    • Server side XMLHttpRequest
    • Web Service invocation
    • File I/O
    • Email
    • Atom
    • Read/write feed
    • Relational database
    • WSO2 Registry/Repository
    • Open Social gadgets

A hello world server-side script looks as follows,
https://gist.github.com/1506790.js?file=HelloWorld.jss

and a HTML mixed, server page looks like,
https://gist.github.com/1514681.js?file=gistfile1.txt

For more information and samples you can visit Jaggery M1 Homepage, and stay tuned for more updates soon 🙂

Tribute to Steve Jobs

Here’s to the crazy ones.
The misfits.
The rebels.
The troublemakers.
The round pegs in the square holes.

The ones who see things differently.
They’re not fond of rules.
And they have no respect for the status quo.

You can praise them, disagree with them, quote them,
disbelieve them, glorify or vilify them.
About the only thing you can’t do is ignore them.
Because they change things.

They invent. They imagine. They heal.
They explore. They create. They inspire.
They push the human race forward.

Maybe they have to be crazy.

How else can you stare at an empty canvas and see a work of art?
Or sit in silence and hear a song that’s never been written?
Or gaze at a red planet and see a laboratory on wheels?

We make tools for these kinds of people.

While some see them as the crazy ones,
we see genius.

Because the people who are crazy enough to think
they can change the world, are the ones who do.

From Apple Computers

WSO2Con is NOT just for “Hard Core” Techies

Well, maybe I am too late to write this post; but hopefully I will be able to discard a misconception in some of you. As you all know by now WSO2Con starts tomorrow and goes on till Friday (16/09). Its a great tech feast, and there weren’t many such in recent history in Sri Lanka. Maybe am not the best person to write all the good stuff about it and asking you to take my word. But if I forget the fact that I am a member of wso2 team, and look at it as a Sri Lankan techie, the agenda still sounds pretty awesome.

Yesterday I meat a friend of mine (lets say Bob 🙂 ) at a dinner, and Bob was saying, “you guys are doing a software conference right; I saw in media, sounds great !!”. I was head over heels (didnt wona say I am doing a talk; wanted to be bit modest 😉 ) I asked excitedly, “So are you coming ?”. But his reply surprised me. He said “Well I dont think its for us you know. Its too hard core; you guys are doing open source, SOA and cloud stuff. I don’t think we are there yet”. If I add little bit of context, Bob is the senior IT manager in a well reputed insurance company in Sri Lanka. So as I felt he had all the reasons to attend to WSO2Con.

I see several misconceptions in his comment, maybe people in Sri Lankan IT services (not directly software, but software is a supporting system like for IT systems for banks) industry are bit behind the game. For one, some people say SOA and Web Services are dead  🙂 it’s no news neither a buzz, Yes cloud stuff is kinda new, but you have it every where now, I guess its high time to check that out too. But whats so hard core about Open Source ??? !@#$.

So yeah WSO2Con is NOT just for “Hard Core” Techies. It certainly feels awesome that people think like that, but the truth is its a week of discussions on software systems. Maybe little bit more about distributed and service oriented systems, But isn’t everything distributed and service oriented these days ? :).

If you checkout the agenda its mostly about enterprise systems, issues in enterprise systems, how to solve them, how open source software can help and most of all, its a week of discussions on experience. Why experience in bold; well if you read the abstracts of many talks, its all about how people solved their enterprise integration problems. It a talk show of first hand experiences. There are, IT consultants, Architects and Visionaries coming from around the world to share there knowledge and experience. What else can you ask for ?

So I guess, if you are a manger who has even a slight influence in IT matters, this is something you goto check out; maybe you do have the same problems as some of these speakers had some time back. It would be a great opportunity to talk to them in person and get some insight.

Well hope I did make some change of your attitude; and I do hope to see you :).

FYI you can still register at wso2con.com

Facebook never really remove your pictures, even you removed them from your profile

I did a small test today; I checked out the actual “img src” link of a picture in my facebook profile, and kept is saved. I deleted the picture from my profile and again checked the link I saved via the “img src”, and freakishly its still available.

I don’t know if this is temporal, maybe it takes time to update the cache (hmmm whats up with that too 😉 ). Anyways what does this mean ?? Frankly I don’t know, but whats up with data protection policies and the free will ?? !@#$%^&