Attention Administrators: vSphere Java API is for You too!

May 10th, 2010 No comments

Most people have the perception that vSphere Java API is for developers. It’s true but actually more than that. Administrators can take advantage of it as well.

Today, William Lam (@lamw) posted a Java version of his vdf tool which was originally written in Perl. For people don’t know William yet, he is a system administrator at Salesforce.com now and Yahoo before. He created and maintains the famous vGehtto script repository that almost every VI Perl developer knows about. William is also a vExpert and the No.1 contributor to the VMware developer community. Having not touched Java for 4+ years, William got his first HelloVM with VI Java API working in less than 5 minutes, and got the code converted in about one hour.

Categories: vSphere API Tags: , , ,

Top Ten Things a CIO Should Know About VMware vCloud

May 7th, 2010 1 comment

Since the term “vCloud” was made public at VMworld 2008 in Las Vegas, VMware has been working hard to define and implement its vCloud vision and strategies.

In 2009, VMware announced vCloudExpress with service provider partners such as Terremark. VMware also submitted its vCloud API spec to DMTF so that the industry could benefit from the standardized management of APIs. VMware also acquired SpringSource in 2009. The acquisition attracted a lot of attention, scrutiny and questions.

Earlier this year VMware acquired Zimbra, the leading provider of SaaS collaboration software, and subsequently it also bought RabbitMQ. Both are now part of the VMware SpringSource portfolio. Last week, VMware and Saleforce.com announced vmforce.com which is a joint venture targeting enterprise PaaS cloud. Yesterday VMware announced acquisition of GemStone (pending).

With these acquisitions and announcements, the company’s strategy is clearer than ever. Looking back again, VMware has been building a cloud product and service portfolio under the vCloud umbrella. Some previously misunderstood acquisitions become well aligned in the vision and strategies of vCloud.

vCloud is not the only player in the industry but VMware is well on its way. Given its deep roots in enterprise data center virtualization, no one can ignore the potential of VMware in cloud computing.

To help enterprises better understand vCloud, I offer ten things you should know:

Facebook HipHop Compiler for PHP: What Is It For You?

May 6th, 2010 2 comments

I attended a great seminar at Stanford by Haiping Zhao on the open source compiler which converts PHP code to C++ yesterday. Haiping is the tech lead for the open source HipHop project at Facebook.

As many have known, Facebook is a PHP shop with all the front end dynamic pages written in PHP. The upside of using PHP is that it’s very easy to read, write and debug, plus platform independent. The downside is that it’s really slow, probably one of the slowest scripting languages.

Why PHP is slow?

Haiping summarized three reasons, which he thinks are common contributors for slowness of scripting languages in general:

  1. Byte-code interpreter.
  2. Dynamic symbol lookups, including functions, variables, constants, class methods, properties, etc.
  3. Weakly typing. The zval has to evaluate the data type of any variable before any operation. Plus, the PHP array is too generic because it can represent any collection. 

Why Should Facebook Care?

When Haiping joined Facebook, new servers cannot catch up the new users. The server farms became so big that any percentage saving could save the company millions of dollars. Like all the big web companies, Facebook does not disclose the number of servers they have. The size of the datacenter is guarded as a secret. One of the professors did an estimate in his questions anyway: 15,000 to 30,000 servers.

4 Rules for Converting Onyx Generated Code

May 5th, 2010 No comments

VMware PM Carter Shanklin (@cshanklin) once gave a great presentation on how to use Onyx with Java development at PEX 2010. I covered it briefly in a previous blog, and left out the “4 rules” hoping Carter would help.

As many of you have already known, Carter moved on to SpringSource division as the PM for tc server. So he has been pretty busy with his transition. With his coverage on both administrator and developer oriented products, he is right on the wave of devops movement. Make sure you follow him at Twitter.

Categories: vSphere API Tags: , ,

vCloud API Spec 0.9: What’s New?

May 4th, 2010 2 comments

Some of you may have noticed that VMware released vCloud API Spec version 0.9 last week. The 9 page document describes all the functions and corresponding REST syntax of version 0.9. Better than I had expected, it highlighted changes from version 0.8. So if you have read previous version, you can just scan for the changes with keywords: CHANGED, NEW, REMOVED.

The vCloud API includes the following categories of functions.

Basic functions

Tutorial: Easy vSphere Web Apps with Grails and the VI Java API

May 3rd, 2010 No comments

In a previous post, I blogged about a tutorial on using the open source VI Java API in Groovy by Aaron Sweemer. Two weeks later, he wrote a new tutorial Easy vSphere Web Apps with Grails and the VI Java API.

In his new tutorial, Aaron introduced detailed steps in how to use the VI Java API for a simple web application with Grails framework. The web application displays a web page that lists all the virtual machines with the corresponding guest OS names and whether they support multiple snapshots.

Categories: vSphere API Tags: ,

Top 20 Most Popular Programming Languages

April 30th, 2010 1 comment

If you are a software engineer, you might have known Tiobe popularity index of programming languages. The index is updated on monthly basis. The following table shows the top 20 most popular languages this month.

The index caught many people’s attention this month because C regained its No.1 position. Java, used to be No. 1 for years, dropped to No. 2. Although percentage wise Java is still very close to C, the declining of Java popularity can be eye-catching.

What Does DevOps Mean for Cloud Professionals?

April 29th, 2010 No comments

I heard about DevOps a while back but didn’t really look into it. My initial understanding was that the roles of developer and system administrator would merge into one called devops. Last week, I attended a DevOps meet up at Palo Alto and got the chance to learn from others about DevOps.

The hosting organization even wrote up a good blog defining what a DevOps is. According to the blog,

DevOps is, in many ways, an umbrella concept that refers to anything that smoothes out the interaction between development and operations. However, the ideas behind DevOps run much deeper than that.

So the DevOps is more about a movement than merging of two roles. The basic idea behind the DevOps is to breach the wall between development and operations.

Traditionally developers ship products which are then run by operators in other companies. In this new age where much of software is delivered as services, the developers run their software directly. When there is a problem, the developers must fix it right away. That is why you see engineers at Google required to rotate on calls for support. When more companies ship software as services, it’s natural that more engineers will have two hats on their heads. The DevOps concept is not really new, but the terminology is.

Key Takeaways from VMForce Announcement

April 28th, 2010 No comments

Today VMware and Salesforce.com announced vmforce.com finally after several weeks of speculations on what the joint project is about. The following diagram I captured from the live webcast of the event answered the question nicely.

The event attracted about 3,500 online viewers, not to mention the audience onsite. This was a very successful event, resulted in more media coverage than anyone can read. If you missed the live webcast, you can check out the recorded one from the website.

Among all the blogs and news coverage, I think you should read the one by Steve Herrod who has done a great job in explaining the joint adventure in a big picture. His blog also has links to other bloggers.

Looking beyond the exciting keynotes and demos, I think the key takeaways from the announcement are as follows:

What The CTO Wants YOU to Know?

April 27th, 2010 2 comments

I just read a book by Ram Charan What The CEO Wants You to Know? Using Business Acumen to understand how your company really works. Having grown up in India, the author has earned D.B.A and M.B.A from Harvard Business School, and has taught at Harvard and Northwestern.

In the book, Ram coined a new term “business acumen” to describe the fundamental capabilities for business success. He claims, “Every business is the same inside, cutting through to cash margin, velocity, growth, and customers.”

Here are more quotes from the book:

When you come down to it, the business is very simple. There are universal laws of business that apply whether you sell fruit from a stand or are running a Fortune 500 company. Successful business leaders know them. They have what I call business acumen – the ability to understand the building blocks of how a one person operation or a very big business makes money. You, too, may learn the fundamentals of cash, margin, velocity, return on investment, growth, and customers.

You can develop your own business acumen. While these ideas may sound complex, they are not. Think more about your best teacher in a subject like chemistry. Once you understand that the atom was made up of protons, electrons, and neutrons, you then had the fundamentals to solve any problem in chemistry. I want to show you that it’s the same with business . When you know the fundamentals, you can “get” the basics for how any business works.

This made me think what the CTO wants you to know, and what “technical acumen” is. Here is my paraphrased version:

Really Easy Way to Clone a Session: Yet Another Contribution from NetApp

April 26th, 2010 1 comment

Recently there were questions in the vSphere Java API forum on how to clone a new session from an existing one. Although vSphere Java API wraps around the basic Web Services API cloneSession() method, simply calling the method doesn’t get what you want.

Why? The signature of cloneSession() is as follows. It returns UserSession, which is embedded inside ServiceInstance managed object in vSphere Java API. While using the API, you always starts from the ServiceInstance.

public UserSession cloneSession(String cloneTicket) throws InvalidLogin, RuntimeFault, RemoteException;

In vSphere Java API, the ServiceInstance and UserSession have one to one mapping. Without a new ServiceInstance around the new UserSession, the UserSession is not much helpful.

Luckily, we got yet another contribution from Eric Forgette who works at NetApp. The contributed code includes a new overloaded method cloneSession() method to return a ServiceInstance object.

As I described before, we’ve been trying very hard to keep the vSphere Java API as close to the basic Web Services as possible. In this case, we decided to break the rule a little bit for good reasons, mainly for usability.

Categories: vSphere API Tags: ,

Zimbra Architecture Overview – A Must Read Document

April 23rd, 2010 2 comments

It’s been a while after VMware acquired Zimbra. In a VMware Console blog, VMware CTO Steve Herrod explained how Zimbra fits in VMware’s mission to simplify IT.

After the acquisition, I actually tried the online demo at Zimbra website. The impression I had was that the Zimbra client was very much like Microsoft Outlook in a browser.

Synchronous versus Asynchronous Calls in vSphere API

April 22nd, 2010 No comments

In a previous article Top 10 Best Practices Using VMware VI and vSphere SDK, I mentioned synchronous versus asynchronous calls in the second best practice “Choose Right APIs.” But no detail was provided there. In this article, which is based on my book VMware VI and vSphere SDK , I discuss all the details.

Some methods defined on managed objects in vSphere API are asynchronous, meaning they return right away whether the operations are done successfully or not. That makes sense for long-running operations; you don’t want to block your current thread by waiting for the return of the call, and you might want to cancel it before it’s done.

For these asynchronous methods, the VI SDK provides a way to track the progress and results after the invocation is returned. As a naming convention, a long-running asynchronous method has _Task as a suffix in the method name, and it returns MOR to a Task. With MOR pointing to the Task object, you can track the progress and even get the result of the operation. For example, the cloneVM_Task() method defined in VirtualMachine is a long-running method that returns MOR pointing to a Task managed object.

Categories: vSphere API Tags: ,

SOA and Cloud Computing: Are They The Same?

April 21st, 2010 No comments

SOA has been a buzzword in enterprise computing for a while. Cloud computing is relatively new one but gaining stronger momentum than SOA. With these two terms, many people get a little confused: is cloud computing just a new name for SOA? And can they play together?

Definitions

Before drawing a conclusion, let’s take a look at the definitions from wikipedia.org:

Service Oriented Architecture (SOA): is a flexible set of design principles used during the phases of systems development and integration. A deployed SOA-based architecture will provide a loosely-integrated suite of services that can be used within multiple business domains.

Cloud Computing: is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility.

What’s Common?

As we’ve read in various articles and books, SOA is mainly for enterprise; the cloud computing is, as its definition points out, Internet based services. In my previous blog, I mentioned cloud as architecture pattern (CAA), which can be leveraged in enterprises as well. If we compare the SOA and CAA, they look somewhat similar and share some core principles:

Categories: Cloud Computing Tags: ,

Tutorial: Easy VMware Development with VI Java API and Groovy

April 20th, 2010 5 comments

Every time I google for VI(vSphere) Java API, I get something new. Here is yet another one I just found. It’s a blog article Easy VMware Development with VI Java API and Groovy by Aaron Sweemer. By reading his blog site, I came to know Aaron is actually my colleague at VMware working as a Sr. System Engineer in Cincinnati Ohio. He is the principal blogger at Virtual Insanity.

Virtual Appliance: Is It a Virtual Machine or an Application?

April 19th, 2010 6 comments

With the growth of virtualization, a new term “virtual appliance” has been coined for a special type of virtual machines that are used like applications. What does it really mean?

First, a virtual appliance is still a virtual machine. When seen in vSphere Client, the virtual appliance does not look much different from other typical virtual machines. Secondly, the functionality of the virtual machine is limited to that of an application. More often than not, the virtual machine is installed with one application. Because of this, the underlying OS is stripped down only to the minimum required to support that application. This type of OS is also called Just Enough OS (JEOS). All the existence of the JEOS is to support the application in the virtual appliance.

Now, is it a VM or an application? It could be either, depending how you look at it. For ESX/vCenter, a virtual appliance is a virtual machine. You can manage it just like any other virtual machine. For application users, it’s an application, a special one that is different from a normal application.

Software Engineering: Do We Need Yet Another Theory?

April 17th, 2010 No comments

Today I read a blog by Martin Fowler, the author of the famous Refactoring: Improving the Design of Existing Code and other books. The blog explained why he declined the invitation to be part of the SEMAT (Software Engineering Method and Theory) initiative by Ivar Jacobson, Bertrand Meyer, and Richard Soley. Ivar Jacobson is known for his contribution to the UML, together with Grady Booch and James Rumbaugh. All of them worked for Rational Software, now part of IBM, which I was part of from year 2000 to 2005.

Martin added his rationale for his declining:

…From here I got the distinct impression that the central thrust of the initiative is to create a software meta-method-kernel – essentially a set of common process elements for software developments that you can rigorously compose into a method for your own project.

How to Use HTTP with vSphere Client?

April 16th, 2010 No comments

If you have viewed the video about Onyx by Carter Shanklin (@cshanklin), you may have noticed a little trick with the vSphere Client.

Normally on the login dialog box, you enter a hostname or IP address. By default, the vSphere Client use HTTPS to communicate with the server. That means you cannot easily see what’s passed back and forth on the wire. As shown in the Onyx video, Carter showed how to use HTTP instead of the default HTTPS with the following in the IP Address / Name field:

http://localhost:1545

So the vSphere Client does support HTTP. In Onyx case, it points to localhost on which the Onyx is installed. You can actually point to a real vCenter or ESX/ESXi server directly – just change the localhost to the IP address of the server and the port to the default port 80 or remove the port part.

Before connecting the server, you need to change the server a bit for it to support HTTP. 

Categories: vSphere API Tags: , ,

Amazon AWS SDK for Java: It’s Not Quite There Yet

April 15th, 2010 1 comment

Amazon released its SDK for Java last month. It’s a complete set of APIs that cover almost all the services from EC2, S3, SQS, RDS to SimpleDB. Overall Amazon has done a consistent job, but the SDK is NOT really object oriented. And that I think is critical for higher development productivity. 

Structure of the SDK

Before explaining why it’s not quite there, let’s take a look at the structure of the API itself. The SDK includes many packages. For each service, you find two or three packages: basic, model, and possibly util package.

In each of the basic packages you can find the two interfaces, and two implementation classes. Let’s pick EC2 as a sample here. The AmazonEC2 and AmazonEC2Async are two interfaces and implemented by AmazonEC2Client and AmazonEC2AsyncClient respectively. More methods are defined in the synchronous than the asynchronous versions with the majority of them overlapping with similar method names.

AllocateAddressResult allocateAddress()
AllocateAddressResult allocateAddress(AllocateAddressRequest allocateAddressRequest)
Future<AllocateAddressResult> allocateAddressAsync(AllocateAddressRequest allocateAddressRequest)

The first two versions wait and get you results upon return. The third version doesn’t wait and gets the result later.

Invalid property? A Trick With vSphere PropertyCollector

April 14th, 2010 9 comments

As I discussed extensively in my book, the PropertyCollector is very powerful yet not easy to use. There was a question posted at vSphere Java API forum related to the property collector which I think worths sharing here. Although it’s found using vSphere Java API, but it really goes beyond the API to the vSphere API itself.