Top 10 Best Practices Architecting Applications for VMware Cloud (part 3)

March 19th, 2010 No comments

This 3rd part contains best practice No.4 ~ 6. To be notified for the rest, feel free to subscribe to this feed, and follow me at Twitter.

#4 Scale Applications as Needed

Most time, people think scalability is to handle more workload when needed. This is true, but not enough. A truly scalable system should scale back. This is how you will save money. This is equally important as the first case where you get more revenue by serving more traffic.

There are different ways to scale:

  • Up and down. This is unique in virtualized environment in which you adjust the memory or CPU allocation and use more or less of them instantly.
  • Out & in. This means you include more machines either physical or virtual into your application.

You have to think over several architecture decision points:

Top 10 Best Practices Architecting Applications for VMware Cloud (part 2)

March 18th, 2010 No comments

This second part contains best practice No.1 ~ 3.

#1 Move Up to Higher Level Software Stack 

“If I have seen a little further it is by standing on the shoulders of Giants.”

 Isaac Newton

Modern software development is all about leverage. You don’t want to build everything from bottom up. Whatever “giant shoulders” you can leverage, you should do so. Remember the keyword here is “giant shoulders.” You got to be selective on what is “a giant” and what is not, for the best quality of your system. Your application’s quality is a function of that of the systems underneath it.

The typical “giant shoulders” includes middleware, high level programming languages, tools. By leveraging these, you should expect your applications portable, and with much less code and higher developer productivity. The portability is very important when you want to deploy your applications in federated cloud environment.

I posted a short article after the cloud demo in VMworld 2009 keynotes. It’s reposted at SpringSource blog. The article introduced “DIY PaaS” concept which you could have a higher level of development platform inside your enterprise in a similar way as would you get from vendors like Google, but without vendor lock-in.

The “DIY PaaS” does not require you to use any specific platforms, middleware or framework. You could use any existing combination of systems on top of Java, .Net, Python, PHP. For example, you could use Java with Spring framework for building your web applications or enterprise integration frameworks. The choice is really yours, not of any vendors. When making a decision, you want to consider various factors like your team’s expertise and preference, total cost of software licenses, design constraints posted by for example existing investments on particular software.

Having decided the combination of software stack, you want to pack them into virtual machine templates that can be re-used by various teams. If you have multiple combinations, you can have multiple virtual machine templates in your catalog.

In general, you want as few templates as possible. Why?

Having less VM templates means less effort to build them, to manage, to upgrade, and to test. This might not seem like a big deal but could become a big deal in a longer term when you have to maintain multiple versions of these templates at the same time.

It also means less storage. vSphere has a special technology called linked clone. The new virtual machine doesn’t fully clone the disks, but links back to the template. If you have least templates, you can have a huge saving on the disk space. High quality storage can be very expensive.

Last but not least benefit is less memory. vSphere has memory page sharing technology which keeps one copy of same page contents, and converts others as pointers to the single copy. It’s only possible when you have identical memory pages. When you have virtual machines cloned from a same templates, the chance of identical memory pages increases dramatically.

There are several techniques to keep the least number of virtual machine templates:

Top 10 Best Practices Architecting Applications for VMware Cloud (part 1)

March 17th, 2010 4 comments

Overview

With more data centers running on purely virtualized systems, more applications are therefore running on top of virtualized environment than ever before. These virtualized systems are interconnected with each other and become a cloud platform. Virtualization is the pre-requisite and starting point of the cloud computing at the IaaS level.

Why Is VMware Intersted in Redis?

March 16th, 2010 2 comments

A high profile open source developer Salvatore Sanfilippo (@antirez) joined VMware engineering team today. He is the project owner of Redis. Welcome Salvatore!

As Derek Collision (@derekcollison) described it at a VMware Console Blog,

Redis is a high performance and scalable advanced key-value store where values can be data structures such as lists, sets, and hashmaps, as well as strings and blobs. Redis supports atomic operations on these data structures, allowing extremely high performance with consistent state to many client applications.

Categories: Cloud Computing Tags:

Why Some vSphere Java API Methods don’t Work with Old Servers? A Story of Compatibility

March 15th, 2010 1 comment

Many of you already know there are some changes in the vSphere API from 2.5 to 4.0. The changes include 20+ new managed object types, additional properties (including sub-properties that embedded inside the first level properties), and several inheritance structure changes.

Several managed objects like Datastore became the subtype of ManagedEntity in vSphere 4, which is different from the hierarchy in 2.5 where it’s a subtype of ExtensibleManagedObject. The changes came for good reasons – we want permission control over these managed objects.

3 Phases and Challenges in Cloud Journey for Enterprises

March 14th, 2010 No comments

As I quoted VMware CMO Rick Jackson in my previous blog, cloud computing is a journey. You may wonder, “If so, what are the phases for that journey?”

A great question! Understanding the phases helps us to better plan our journey and have a smooth transition from phase to phase.

In this blog, I will introduce 3 phases one by one: 100% virtualization, private cloud, and federated cloud. I will go over each of them and discuss the challenges in each.

What’s Hot in the Virtualization Job Market?

March 12th, 2010 3 comments

While asked how each Spring products are used in the market at the end of today’s training, the instructor showed us a nice website as a reference. Here is the diagram showing the numbers of jobs requiring skills of Spring and EJB. A great answer even though not a direct answer.

 

Strictly speaking, the jobs are not products, but well reflect what products are in use. So this is a good index on market shares of different products. If you have your products too easy to use, this index works against you. :-)

Learning Enterprise Integration with Spring

March 12th, 2010 No comments

With SpringSource being part of VMware family, getting a Spring training is certainly a lot easier than before. For one thing, my boss doesn’t need to pay for it.:-)

I just finished my 4-day training starting from this Tuesday. It’s been pretty exhausting given that I had to get up before 7AM to match the central time. But what’s learnt worth the effort.

The coverage of the training includes:

Categories: Software Development Tags: ,

Clojure, Ruby, Scala, and Go: When to Use Which?

March 11th, 2010 No comments

Just came back from a SDForum meeting organized by its emerging technology SIG. The topic was about the 4 languages in the title. It’s not much about any emerging technology per se, but pretty controversial among the developers.

The organizers invited four panelists and one moderator:

  • Clojure advocate – Amit Rathore, author of the forthcoming “Clojure In Action”
  • Go advocate – Robert Griesemer, Google, co-author of Go
  • Scala advocate – David Pollak, lead author of Lift
  • Ruby advocate – Evan Phoenix, lead developer of Rubinius, a high performance Ruby VM
  • Moderator – Steve Mezak, co-chair of the SDForum Software Architecture and Modeling SIG, author of Software without Borders

Each of the panelists had 10 minutes of introduction of the language in the first part. Then, they all answered questions ranging from language strength/weakness, library/tool/IDE support, application framework, advice on migrating existing codebase, to how these languages compare to each other.

Here are introductions from the languages’ homepages. See if you can map them to the languages.

Attention Java Developers: Spring on VMware Promotion

March 10th, 2010 No comments

VMware announced today “Spring on VMware” promotion in which you may get free licenses of the tc Server in a news release.

To help you get started, VMware is pleased to announce the “Spring on VMware Promotion”. Under this promotion, all customer orders fulfilled  between March 8th 2010 and May 8th 2010 that include products (license only) from the vSphere, vCenter, View or ThinApp product family will receive 2 perpetual, production-use CPU licenses of tc Server Spring Edition 2.0 and 60 days of Evaluation Support for SpringSource (collectively referred to as the “Spring on VMware Bundle”).

Categories: News & Events Tags: ,

SimDK – A VMware vSphere Simulator

March 9th, 2010 5 comments

Just got the following email from Andrew Kutz (@sakutz) who wrote the famous VMware Infrastructure (VI) plug-ins whitepaper and created several other great projects like VMM.

David Marshall, Dave McCrory and I, as well as everyone else at Hyper9, are extraordinarily proud to announce SimDK – a VMware vSphere4 simulator which provides vSphere4 API-compatibility for official vSphere4 clients and other applications built using the vSphere4 SDK.. SimDK is an open source project available at http://simdk.sourceforge.net/. You can read more about this exciting announcement at http://akutz.wordpress.com/2010/03/09/simdk.

Categories: vSphere API Tags: ,

Vote for vSphere Java API at VMware Labs

March 9th, 2010 2 comments

Several smart bloggers (Eric Sloof, Justin EmersonIan Koenig, Alessandro Perilli) discovered the VMware Labs web site over the weekend. As many pointed out, it’s absolutely cool.

I actually knew it was going to be online this past weekend, but would like to get official announcement from the company before blogging it. The reason I knew the site to go live is because the vSphere Java API I created is one of the first 10 projects.

Categories: vSphere API Tags:

VMwareExpress Truck: First Hand Experience

March 8th, 2010 No comments

VMwareExpress truck came to VMware headquarter before noon today, parking between the gym and office buildings. I went to check it out this afternoon, also enjoyed ice cream in front of the truck.

The following is a picture of the truck. I could use others, but think this one is better because it has the cloud as background. :-)

Categories: News & Events Tags:

Lightweight Caching Framework in vSphere Java API 2.0

March 7th, 2010 5 comments

In vSphere Java API 2.0, I wrote a lightweight caching framework. It’s still experimental but has a great potential to greatly simplify your development work. Commercial companies already use it in their products.

The motivation behind this framework is simple – instead of keep polling the changes from the server side, you keep a local cache that is made as fresh as possible. The View in the vSphere Perl toolkit is one way to do. It caches all properties of a managed object despite the fact that you don’t need that many at all.

The caching framework in vSphere Java API takes another approach. You tells it what managed objects and what properties you want to be cached. After that, the caching framework does its best to read the properties and keep them as fresh as possible.

Architecturally the caching framework is totally separated from the core of the API. You can take it away without any impact on the rest of the API. This is quite different from other toolkit.

Have enough introduction? Let’s take a look at sample code:

Categories: vSphere API Tags: ,

Who is Hyping Cloud Computing? You Will be Surprised!

March 7th, 2010 2 comments

I came across a blog “5 things VMware must do to fend off Microsoft.” The author Jon Brodkin listed the following musts: cut prices, improve Security, win the desktop war, simplify management, don’t overhype the cloud. Here is a response to the article by Steve Kaplan.

Because I am working on cloud related projects, especially I am the creator of the vSphere Java API that manages the “cloud operating system,” I am curious to know whether VMware is overhyping the cloud computing.

Instead of expressing my opinions, I decided to do a simple research using Google and Wikipedia. To my surprise, the “cloud computing” page does not include VMware in “Cloud computing logical diagram.” The companies listed are Microsoft, Google, Saleforce, Amazon, Yahoo, Rackspace, Zoho. Well, that is good for me to do the next step.

Then, I used Google to search each company’s name and “cloud computing.” I wasn’t testing the performance, but to see how many web pages are there including these keywords. Strictly speaking, the number of hits is not an index of hyping cloud computing, but you can get a good sense on how much marketing effort each company invest into “cloud computing.”

To save you time, I captured the screenshots of each search, and list the most important parts we are interested as follows.

Categories: Cloud Computing Tags:

2 Easy Steps to Add Source Code into Your Blog

March 6th, 2010 3 comments

WordPress is a great blogging software. I am very happy with it except that it does not have nice built-in support to include source code, which an absolutely needed feature for me.

Given the rich set of plug-ins WordPress has, I know there must be some plug-in there already. Today I spent a little time on research. After trying several plug-ins, I decided to use Google Syntax Highlighter for WordPress. You can check out how it looks like as follows.

Building Trusted Datacenters in the Cloud

March 6th, 2010 No comments

RSA just had its annual conference at San Francisco this past week. Intel, VMware and RSA demoed how to build up layers of trust in data centers in the conference.

Using vSphere Java API in Jython and Other JVM languages

March 5th, 2010 2 comments

As a by-product, the vSphere Java API makes Jython programming a lot easier. The following is a very simple sample written in Jython to print out the name of the first virtual machine in inventory.

    from java.net import *
    from com.vmware.vim25.mo import *

    si= ServiceInstance(URL(“https://sjin-dev1/sdk”),\
    “root”, “password”, True)
    rootFolder = si.getRootFolder()
    vms = InventoryNavigator(rootFolder) \
    .searchManagedEntities(“VirtualMachine”)
    print “Hello ” + vms[0].getName()
    si.getServerConnection().logout()

As you can see, it really brings in the benefit of VI Java API into Python community at almost no extra cost.

Categories: vSphere API Tags: ,

5 Easy Steps Using vSphere Java API

March 4th, 2010 2 comments

In my previous blogs, I have introduced the vSphere API object model, vSphere Java API architecture. I assume you’ve run through the 5 minute Getting Started Tutorials with HelloWorld sample.

Now, let’s take a look on how to use the API in general.

1. Always starts with a ServiceInstance with URL/username/password, or URL/sessionID. For example,

ServiceInstance si = new ServiceInstance(new URL(urlStr), username, password, true);

2. From the ServiceInstance object, you can:

Categories: vSphere API Tags: ,

vSphere Java API Architecture Deep Dive

March 3rd, 2010 2 comments

In my previous blog, I talked about the object model of the vSphere API. Many people like the UML diagram that illustrates how the managed objects are inherited from each other.

Following that blog, I will introduce the object model of the open source Java API that is built on top of the Web Services, as well as some key design decisions I made while designing the API.

The following UML diagram is extracted from the overall model but adds much more details with properties and methods. If you can understand this diagram, you can then easily understand all other managed object types.