Saturday, August 30, 2008

Extending Model Driven Design beyond codes

Whoever is familiar with Eric Evans should also be familiar with the following diagram:
The diagram pretty much is an essence of a good design. Even though mostly referred when working on one application and how components should be created also has a potential to extend it to higher view for Enterprise solutions. Besides the importance of Entities itself, two interesting pieces of the diagram are "Services" and "Repositories". They are not just a set of APIs but are extended to Infrastructure as well.

  • What about Services? How does a business create Services? How does it manage them? How can these services be orchestrated? And combined to produce a work flow? SOA combined with BPEL is what fills in the services gap.

  • Now what about the Repository and Aggregation? Again its not just API but how would you manage Gigabytes and gigabytes of data in a fault tolerant and high performance way? And how to maintain integrity of your Entities with this data management system. Oracle Coherence is what offers a perfect solution to address the infrastructure behind Repository and aggregation.

Concept of Entities is when an Object has an unique identity, matches perfectly for what a Map is designed for. And Coherence is built for very large data set with a simple Map interface of NamedCache. The question is what to manage in this Map? Entities or Value objects? Entities do have IDs. Vis-a-vis value objects? Why not? Objects already have a behavioral identity in its' hashCode (). Isn't there a difference between an ID and Identifiable. Last part: Factories and layered architecture. Factories can very easily hide behind services and unique interfaces for each individual applications. I can't see any centralized concept for Factories.. Can you?

Monday, August 25, 2008

This what one of the Kashmiri separatist leader has to say..

The statements have been taken from an interview taken with Gilani - A separatist leader of Kashmir wanting to merge the region with Pakistan:
Q: Why not contesting elections?
A: We believe in boycotting of the elections.
Q: Why imposing Islamic rule?
A: If America and India can have democratic rule, others can have Communism, why object to the Islamic rule?
Q: What about agitation in Jammu?
A: They are working on communal lines
Q: Aren't you like Osama bin Laden?
A: Osama has come only during the last few years. People like me have been fighting for this all our lives.
Q: What about differences in Hurriyat?
A:Some of the Hurriyat leaders did not like my being endorsed as a leader by the crowd and walked out.
Q:What do you stand for?
A: First is to impose an Islamic nizam (jurisprudence) in Kashmir. Islam should govern our lives, be it in our political thought, socio-economic plans, culture or the ongoing movement.
Q:So the transfer of land is not an issue?
A:Land is not an issue for us. It has just acted as a catalyst to shape peoples' sentiments into an upsurge.
Q:What was sudden provocation?
A:Its not about 50acres of land. People have started thinking about the 100,000 acres of land that is with the army. Under the guise of "Operation Sadhbhavana," the army has usurped huge parcels of land and seems to be expanding its network. I have information that the army has seized 23 acres of land for opening a school in Pahalgam.
Q:Aren't schools opened for Kashmiri children?
A:I know the schools are meant for Kashmiris. But they are also meant to make them sing Vande Mataram and not offer namaz. The aim of these schools is to turn Kashmiri children into pure Indians. This is cultural aggression on our Islamic values and is not acceptable to us.
Q:On division of people:
A: While I am for Kashmir going to Pakistan, there are voices that seek independence from both India and Pakistan. I also agree that there are people in Kashmir who would like to go with India. They argue that India has done so much for Kashmir. Others are fascinated by its secularism and democracy.

Its the duty of the world and Indian government to save Kashmiris from the leaders like him.

Saturday, August 23, 2008

A magic prime division

2300000/41 = 56097.56097560975609756097 and 56097 repeats itself forever... (A non 10n/3 repeatable result)

Friday, August 22, 2008

And I predicted this last November..

Kashmir - The burning desire

Kashmir has been a flash point among unresolved disputes. A problem largely created by India's neighbor and fueled by Indian government's own apathy. Kashmir as you know is one of the most beautiful places on Earth, beautiful people and a center of Sufism - a culture created by liberal Islamic and Hindu traditions. Even though this region is majority Muslim but almost divided into three equal sub-regions with majority Buddhist, Hindu and Muslim areas. It is painful and ironic that unrest in valley (one of the three regions) has dragged for two decades now with still no resolution in sight. Very recently demonstrations has picked up again and all kind of rhetorics has been coming out. But before people are manipulated again think about the following again:
1. Jammu has valid grievances too. Since the start of unrest in valley, Jammu has always been ignored as the money and power shifted to valley.
2. People listening to leaders claiming to be their sole representative must not forget an evil design that has taken lives of genuine people's leaders like Abdul Ghani Lone.
3. The recent killing of a Hurriyat leader during "Police firing" is very suspicious as per new intelligence report.
4. If Wagah border can be opened then why not Mujjafarabad's?
5. Why is there an economic blockade in Valley? And if there is none what is government doing to address these rumors?
6. You cannot build human colonies on 100 Acres of land at 10000ft.

Wednesday, August 20, 2008

How many updates per second can your UI handle?

View is very important. With any development you always end up having a GUI Application that displays the end result. The question is if there are very high number of updates happening to data, what is the realistic updates per second that any remote GUI application can handle? And even if you can handle it, will it be of any use? What experience have you had?

Saturday, August 16, 2008

A tribute to an Indian legend

No one represents India@61 more than the car on our left. This car in past 50 years has only minutely changed in its design, but is still capable of opening more Gates for you than even a Mercedes Benz. A bone white body with tinted glasses and preferably a blue or a red light at the top. Perfect on the bumpy roads that India has traveled on for past six decades. Engine that can be repaired with a hammer and a wrench like our democracy. Yes it makes noise and is not as smooth as others but it is rugged and is very comfortable inside and it moves. With this car moving don't try to jump off, you are safer behind its steel doors of centuries old values. Salute to our Amby and Happy Independence Day, India!

Friday, August 15, 2008

Managing Coherence as an IT Organization

Scenario: A development manager creates Tasks, gives it to a Technical lead who after assessing the task gives it to the developers of his team to complete. Developers run some logic and algorithms on a piece of hardware, returns the result to his lead who in turn gives it to the manager.
This is a typical workflow in any software organization. The terms and roles could be different but the flow more or less remains the same. Oracle Coherence supports an architecture starkly similar to this flow. *Extend Application (Manager) submits tasks to proxies (Leads) who passes agents like Invocable or EntryProcessors (Tasks) to developers (Storage nodes) who run the logic (Implementation) on a piece of hardware. Now if an overall Director/CTO finds the system to be slower than expected, how would you find the bottleneck? Lets see..

  • Is the manager creating enough tasks? Is your Extend application really pushing Tasks or Objects at a rate the system is designed for?

  • Are you overloading your technical leads with tasks far exceeding than they could handle? If you have too many work to do and only one lead to manage, it is obvious that the technical lead will be overloaded with work. Whats the resolution? Depending on the work load you create more lead roles. In the *Extend scenario you have to be very careful and meticulous in finding the number of Extend proxies you have to run based on the load. This number varies from system to system but I would recommend having at least 30% of total storage nodes would be a good number. If the grid size is 10 storage nodes, configure at least three storage disabled proxies.

  • Do you know if the logic was well written? It is very important in synchronous flows that tasks are short-lived. As a rule of thumb long running processes must always be asynchronous. Make sure EntryProcessors or Invocables that are run on the nodes are well written, fast and use minimum of network traffic. Short lived processes provide maximum throughput.

  • Have you hired the top developers? Make sure that JVM is not in GC frequently. Find stable nodes. Developers leaving group affects an overall delivery response. Stable team is very important.

  • Piece of hardware - Yes. Give them the best you can afford to work on. Make sure CPU has enough power. With agents running on nodes it is important that it is multi-core. Processors take CPU time. More cores the better.

  • Most important - the communication channel. How fast and clear is the communication? This translates to available network bandwidth. Always make sure you have at least 1G network with servers connected to the same switch. More switches lowers the bandwidth. As you see in any organization.. More administrative hops and slower will be the organization.

So its either organizational efficiency or a Coherence data grid, make sure before making any decision check and test where the bottleneck is.

Wednesday, August 13, 2008

Yay! I fixed my treo

I broke my Treo 680's screen a week ago by accidentally tossing a remote on the bed right on top of where my cellphone was. Ordered a replacement screen off of ebay and a Tx5 from Sears.. Yes I replaced the screen myself. While doing it though I dismounted the microphone so now I can hear the voice but they can't listen mine. Perfect as a spy gadget but need to fix it. For now, thank you bluetooth headset, at least I can use it for meaningful conversations.

Monday, August 11, 2008

Its not GM's fault

It is customary to start bashing companies that are not doing so well. GM besides being one of the greatest companies, an American Icon has been in such a receiving end. Three cars that need special mention that I as a driver was very impressed with are Toyota Camry, Ford Escape and Chevy Malibu. One of these cars is owned by GM. With rising gas prices, GM is being criticized for not going green soon enough. Being green in auto industry means Batteries. So far now, no one has any experience of how these giant batteries going to be in 5 years of hard driving. Will they be replaced every 5 years for a huge sum of money? Are they any reliable? I love gadgets at least the ones I can afford. And one thing that has always bogged me down are their batteries. In spite of tall claims of long talk times on your cell phones, the reality is they drain out soon. Once battery is dead, it is easier and more economical to replace the set than the batteries itself. I have one of the worst battery experiences for my Roomba. Twice have been replaced and the last one only ran for two sweeps. Laptop batteries getting hot is a no news. Rechargeable batteries of your home phone falter in less than two years. And if GM did not jump into the band wagon of these "battery run devices", I won't be surprised and blame them. And what else should we blame them for? Making sure that the working and health condition of their workers is decent and not like uninsured bunch working at 1/4th the salary? Yes they are behind but their research centers are at par with the best of their peers. This is one company with so much potential and instead of letting it killed, give it time and all the support needed for it to bounce back to the forefront of the auto industry.

Saturday, August 09, 2008

Oh Boy, The last Lecture!

Once in a while you do come across people who are incredibly inspirational as they speak truth from their heart. This 1hour 16mins and 27seconds lecture will be the best spent time if you can steal one. As an able orator Randy was, I was able to connect right away as he talked about two things - Virtual Reality and Childhood dreams. Not a lot of folks know that my first job out of college was with a research institute associated with Indian department of Atomic Energy. Not sure how come they hired me because I was never a smart guy but when you work with them you tend to believe you are one. One of the projects that I did while working there was on Virtual Reality. Even my manager did not know that I was doing something like that. After doing the regular work, I used to wait for 6PM when everyone was gone and I could spend hours on computer doing something I was so passionate about. The office politics never bothered me. When almost everyone knowing Computers and Programming were leaving for US, I did not bother because I was doing what I loved. I left that job and never got any opportunity to work on VRML again.
I started working for a company as a Contracted programmer. They offered me a job and in the interview process I told them about a project I was doing after hours. A futuristic desktop environment that did not require any device driver installations to use services. A system based on Jini's auto-discovery so that services running in the neighborhood could automatically download itself when you login. I was passionate and excited and discussed every detail of what I was thinking. You should know you are a contractor here, Ashish. You should only be doing what is told to you, was the response. But I am doing it after work and never billed those hours, I said. He was not pleased but they hired me anyway. The project was lost in sub-directories till the Company years later unveiled a futuristic 3D Java workspace. I collected all the courage I had and discussed my project with Hideya Kawahara, the brainchild behind the project looking glass. He was kind enough to allow me to submit my project as an incubator project for Sun Labs for looking glass. I left that company and there are no takers of that project anymore.
Speaking of Childhood dreams, I dreamt of becoming an Air force Pilot. My Mom didn't even allow me to fill an application form. I had weird career choices as well. I thought of becoming a rikshaw puller (a hand pulled taxi) and that I would never fight for money and let the customers give whatever they liked. Even though an idiotic choice but it was philanthropic. I was also fascinated with Doctors for their clean offices, fine pens and amazing hand writings. I also wanted to be a drummer and a scientist and an entrepreneur and a millionaire. Were any of these fulfilled? Came close to being a scientist and I own a drum set but thats pretty much it.

Sunday, August 03, 2008

When you let the Grid do your job

In event driven systems typically a business process needs to be executed when an event is raised. These events are usually a message received from an external system. As infrastructures grow more complex and flexible, computation is shifting from externally run applications to auto-magic processes being run inside the system of records itself. The idea is not new. For number of years companies have relied on scheduled jobs like cron invoked by Operating Systems. Timer services still play an important role in EJB driven systems. The same is true and increasingly getting popular with Oracle Coherence. Oracle Coherence manages data inside a resource called a Cache that behaves like a Map but in a clustered environment. Unlike any off-the-shelf Map implementation, Coherence' NamedCache supports events. A MapListener can be attached to any Cache that can handle events like Inserts, Updates and Deletes. Coherence supports an advanced listener called a Backing Map Listener. A backing map is a data structure that actually manages the data on a node for a given Cache. A backing map listener is like any MapListener but is attached to a backing map and listens to events being generated on a Cache on a specific partition that it is defined on. Backing map listener provides a powerful framework for in-grid-processing. It opens up a facility limited by only your creativity. If a business process is placed inside the backing map listener, these processes will be invoked upon any change in the Cache.
Things to know
1. Events are handled in a synchronous way. It means, the client that raised a Cache event has to wait for BML to return or finish what it is doing.
2. Java5's ExecutorService can be a powerful help to off-load any processing inside the BML for client to not wait for the entire processing to finish.
3. Coherence only manages the flow not how the events should be handled. Process decoupling is left to the business requirements.
Enjoy Coherence!