Tuesday, November 22, 2011

Auto Scaling with WSO2 Load Balancer


Load Balancer is a crucial component in scalable architectures. WSO2 Load Balancer not only balances the load across the application instances, but also scales the system automatically to cater the dynamically changing load. WSO2 Load Balancer is a WSO2 Carbon based product. In this post, we will look how autoscaling works with the Load Balancer.

WSO2 Load Balancer ensures high availability and scalability in the enterprise systems. WSO2 Load Balancer is used in cloud environments to balance the load across the server instances. An ideal use case of the Load Balancer is WSO2 StratosLive, where the service instances are fronted with the load balancers and the system scales automatically as the service gets more web service calls. Having the Apache Tribes Group management framework, Apache Axis2 Clustering module, Apache Synapse mediation framework, and autoscaling component as the major building blocks, WSO2 Load Balancer becomes a complete software load balancer that functions as an autoscaler and a dynamic load balancer.

Architecture

WSO2 Load Balancer can be configured to function as a load balancer with autoscaling on the supported infrastructure. Currently the autoscaler supports EC2 API. Thus the Load Balancer can be configured as a dynamic load balancer with autoscaling, on Amazon EC2 and the other infrastructures compatible with the EC2 API. The autoscaling component uses ec2-client, a Carbon component that functions as a client for the EC2 API and carries out the infrastructure level functionalities. Spawning/starting a new instance, terminating a running instance, managing the service groups, and mapping the elastic IPs are a few of the infrastructure related functionalities that are handled by the autoscaling component.


The autoscaling component comprises of the synapse mediators AutoscaleInMediator and AutoscaleOutMediator and a Synapse Task ServiceRequestsInFlightEC2Autoscaler that functions as the load analyzer task. A system can scale up based on several factors, and hence autoscaling algorithms can easily be written considering the nature of the system. For example, Amazon's Auto Scaler API provides options to scale the system with the system properties such as Load (the timed average of the system load), CPUUtilization (utilization of the cpu at the given instance), or Latency (delay or latency in serving the service requests).

NEXT >>
Now you know the basics of the WSO2 Load Balancer. You might now want to learn,
1) How Auto Scaling works with WSO2 Load Balancer?

Resources
Blog posts
WSO2 StratosLive - An Enterprise Ready Java PaaS
Summer School 2011 - Platform-as-a-Service: The WSO2 Way

Saturday, November 19, 2011

Time/Money Duality

This post can be considered the part-II of one of my previous posts - LATE. The movie "In Time" was the major motivation behind this post.


Time spent and perceived.
I have heard the phrases "Don't waste money!" and "Don't waste time" more often than any other suggestions asking not to waste something. "Don't waste electricity", "Don't waste water", and other similar suggestions are indeed the derivatives of "Don't waste money", or are driven by some sentiments such as "Don't waste food - give it to the poor instead!" We can simply conclude that "Money" and "Time" are considered two equivalent and most valuable assets. We spend money to save time, and also spend time to save or earn some money. I see this duality as the reason behind the routine of the humans. Everyone makes the world a better  ('better' is a relative term. so someone's better may be another's worse though) place to live, at least by a tiny bit, through their job and otherwise, by investing their time.


Being a complex quantity, Time has its own real and imaginary counterparts. Each of us has 24 hours. But the effective time differs from person to person. I feel, in terms of physics, we can't define Time as a vector or a scalar rigidly. May be, we should research further on the nature of the multi-dimensional time!

If we consider time as a complex number, what we measure will be the time's projection on the x-axis, the real counterpart of the complex quantity. When we are waiting for something or someone even a few minutes go like an hour - we can explain this using the above "Complex-time" concept. 

"Busy" is a relative term. I can be busy for task-1 or person-1, but may be available for task-2 or person-2.

The time and the money spent and the duality
"Can you spend five minutes with me regarding this project?"
"Sorry, I am afraid. I have to catch the train in 5 minutes to my home."
"Oh, it is fine. I am also on the same route. Let's discuss on the train"
Now, I am not busy for the discussion, since the talk is not going to consume my time.

Currently, it is impossible for us to travel by time, or purchase it. So either we spend much time or less of it - we can earn time relatively, but not absolutely. In natural terms, we can't earn time, but just spend it effectively. Time does have a monetary value. The In Time  movie attempts to make Time as money, focusing on the time-money duality. It discusses the sharing of time, and transfer of time between different individuals. The rich have more time, and lesser the poorer.

Since Time is used as the money, the rich have more money, making them living forever, almost, where the poor keep running searching for time, awaiting their end, everyday. For them, "tomorrow is a luxury they (you) can't afford" and even idling becomes costly (of course, idling costs in the real world too, in the time scale, as of the above image).

Wish if we can buy some time, utilizing this time/money duality in the future.

Friday, November 18, 2011

3 Most Annoying Status Updates in Facebook!

Expressing love for their dad!
1) Tribute over the Facebook.
"May I ask a personal favor, only some of you will do it (and I know who you are). If you know someone who has fought cancer and passed away, or someone who is still fighting, please add this to your status for 1 hour as a mark of respect and remembrance, I hope I'm right about the people who will.. Let's save the world from cancer by posting.. ♥"

Come on! You are NOT contributing anything by posting/re-posting that stupid status for 1 hour. Just annoying the users over the Facebook. To make it worse, somehow these posts tend to become famous and spread like Viruses. You can even notice the 50+ likes, and believe me. These guys have never shown love to the cancer patients outside Facebook!


2) Stupid claims 97%
"All of us have a thousand wishes. To be thinner, have more money, a new phone. A cancer patient only has one wish, to kick the cancer . I know that 97% of you won't post this as your status, but my friends will be the 3% that do. In honor of someone who died, or is FIGHTING cancer, post this for at least one hour." 

"NO.. I have heard about many cancer patients who had greater wishes.. for their family or even for the country.. The above status is just an insult to cancer patients.. ewwww... :("

3) I love my brothers (over the facebook)!
<- When some one starts to love his/her parents, siblings, spouses, friends, etc *using* facebook.

People are such sweet hearts (by caring everyone and love them by facebook (errr...) and posting statuses that make no sense at all!) :P

Sunday, November 13, 2011

Are you allowed to choose your *name*?

Facebook, Google+, and probably many other sites do not allow accounts to be registered under a name that looks "artificial". That means, you can register an account only on a name of a human. The reason given is, they do not want to have people registering *fake* accounts, and welcome only the *real* persons to be in! 

Names such as the below are not allowed or at least challenged.

1) Kathiravelu பிரதீபன் - You can't mix two language scripts, though this one indeed is my name, where the first name is written in English, and the last name in Tamil script.

2) Prad33ban, Pradeeban_, or Pradeeb@n - Numbers or special characters are not allowed in the names. Only the alphabets of a single script are allowed.

3) Pradz or PradROX - Suspicious name, most probably a fake!

4) Rock Buddy, Superman, Monkey Gurl, or Fen0023 - Doesn't look real.

5) Pearl Kitty or Brownie - Kitties and puppies aren't allowed!

6) K.K, PDN, pra, or pdn - Initials, pen names, or pseudonyms aren't allowed.

7) Dr.Vijay - Salutations aren't allowed.

8) Sucker - Sounds offensive.

9) kaThiRaVeLu PrADeeBaN - Improper capitalization.

10) Fxx or Bot - Bots are not allowed.

11) Double Rainbow, Firefly, or Stone - Natural objects and insects! No!

12) Colombo Library, Llovizna&Sons, or OpenGroupForum - Libraries, Companies, or organizations aren't allowed to create a profile. Use a 'group' or a 'page' instead.

This regulation has gained severe opposition from those who prefer to have their online identity to be hidden or are interested in having a second life. Some of them choose to have a second life an independent one from their real, offline, or *first* life. They have a valid reason to have a different online identity, I feel. Whatever the name, let it sound like a bot, library, or a kitten, still there is a human behind the name. What matters the most is, no one's privacy should not be violated.

However these rules do not prevent the fake profile creators anyway. They just create fake profiles under real names. People are getting more into deeper fake stuff - SCIgen is an example, which allow you to generate fake papers, mostly used for a good motive of course - to identify the fake conferences by getting the fake papers auto-generated accepted.

Saturday, November 12, 2011

Copyrights - "Safely ignored"s in the Internet

I recently found an exact copy of one of my blog posts in another blog, without any credit or pointer to my blog. I tried to comment on his blog post with the link to the original post. He never approved my comment. Hence I decided to report his blog to google, for the copyright violation.

In the topmost banner of the blogger blogs, you can see "Report Abuse". I just clicked, and reported the post.

Google replied with,
Thanks for reaching out to us!

We have received your legal request. We receive many such complaints each

day; your message is in our queue, and we'll get to it as quickly as our
workload permits.

Due to the large volume of requests that we experience, please note that

we will only be able to provide you with a response if we determine your
request may be a valid and actionable legal complaint, and we may respond
with questions or requests for clarification.  For more information on
Google's Terms of Service, please visit http://www.google.com/accounts/TOS

We appreciate your patience as we investigate your request.


Regards,

The Google Team

After within a few hours, Google took the page that violated the copyrights down in accordance with DMCA (The Digital Millennium Copyright Act of 1998), and sent me this message.

Hello,

Thanks for reaching out to us.

In accordance with the DMCA, we have completed processing your
infringement complaint and the content in question no longer appears on
the following URL(s):
http://{blog-name}.blogspot.com/
2011/07/{post}*.html
Please let us know if we can assist you further.

Regards,
The Google Team

* I have removed the blog url to avoid harassing the blogger who copied the blog post.



One of my friends mentioned, why would I report that person's blog post. My friend mentioned that the person who copied my post is indeed helping me by spreading my thoughts to the followers of his blog. 

No, it doesn't work that way. If someone finds his post in web search instead of me, further interaction with the reader will not be possible. If my view point is challenged in the blog post of that person, he will not be in a position to advocate for my thoughts. Most probably he himself would have forgotten the original post that he copied from, leaving the discussion to a nowhere-zone.

In print, everyone takes utmost care about the copyrights. But when it comes online, it is taken for granted that anyone can violate others' copyrights. It is common to see posts that are copied from the web, even in newspapers as "Thanks: The Internet" or "Thank you: The web". No one bothers to give the exact url or the author of the post, which is in fact a bad practice, and offensive just like any other pirated material.

I, however support open knowledge. Some restrictive licenses prevent others from using the content at all, than merely reading and understanding it. Licenses should be open, just like the open source licenses. In "Llovizna" (and wherever online/offline), I made sure to use only the content or images that are in the public domain, or made sure to provide the credentials to the original license holder, whenever I reused others' contents. Many images with supportive licenses, or those are in the public domain can be found in wikipedia or wikimedia. We need more of them.

Sharing is not just a copy-pasting. It should provide value to the original content, while giving the appreciation that it deserves, and engaging with the content.