Category Archives: Software Development

Announcing vijavaNG 6.5 – the smallest, fastest, and most secure Java APIs for VMware vSphere 6.5

On November 15, VMware offically announced the long-waited vSphere 6.5, which is a big release after 6.0 release early last year. Along with this vSphere release were a few other products like VMware vSAN 6.5, VMware vRealize Log Insight 4 and VMware vRealize Operations 6.4. According to the blog announcement, the vSphere 6.5 offers these high level features and benefits:

Also posted in vSphere API | Tagged , , , | 4 Responses

How to Wait for Promises in AngularJS

In one of my previous blogs – How to Cache Results from Asynchronous Calls in AngularJS, I mentioned a technique that downloads data from remote server via $http service as a promise. This is quite often used in Web application development, for example, you want to save configuration, user preference on remote server and download them on fly.

Posted in Software Development | Tagged , , | Leave a comment

Google Cloud Platform: Hello World with Service Account

In my last post, I showed a sample with OAuth. It works well for application on others’ behalves. For the hello world program, it’s better to run without any user’s manual interaction. Google has provided “Service Account Key” for that purpose.

When you create a new credential, the console asks the type of key. You can select the service account key, and then select the “Compute engine default service account” with P12 as the key type. The generated key will be downloaded automatically. Save it safely and it cannot download again. You can then copy the key to the project home with a name as key.p12.

Also posted in Cloud Computing | Tagged , | 1 Response

Google Cloud Platform: Hello World with OAuth 2

Google Cloud is the 3rd public cloud I tried after Amazon AWS and Microsoft Azure. I used its AppEngine before and it worked pretty well. Google started very early in the cloud game but it lost the opportunity to Amazon because it over-estimated the attractiveness of its own infrastructure that runs Google search.

Also posted in Cloud Computing | Tagged , , | Leave a comment

Azure Service Management APIs: The Old APIs That Works

After the initial bad experience with the new Azure Resource Management APIs, I took a different approach – try the old Service Management APIs. While transitioning from old system to new system, the old one may still be the best for an unexpected long period of time. Like VMware vSphere Client, VMware has declared end of life many times, but it’s still the favorite for most customers, while the future Web Client remains “future” since 2011.

Also posted in Cloud Computing | Tagged , , , | 3 Responses

What I Learned about Microsoft Azure and its Resource Management APIs

It was my plan to go over the popular cloud services on their management APIs. After familiarizing myself with Amazon AWS Java SDK with a few samples, I started with Azure and it turned out to a painful process.

In the following I will walk you through what I had experienced, and what works and not. Hope my experience will help you save some time with Azure.

Also posted in Cloud Computing | Tagged , | Leave a comment

Amazon Web Service Java SDK Tutorial: List All Networks

In my previous posts, I showed samples on virtual machine creation, virtual machine instances listing, storage volume listing. This sample shows how to list all the networks that you have.

With the information about your networks, you can get all the private and public IP addresses.

To run the following sample, you can check out the previous post for the pom.xml file and how to get AWS credentials from AWS console.

65fa1261b149c7fe39367c4958bcee3a026

Also posted in Cloud Computing | Tagged , , , | 1 Response

Amazon Web Service Java SDK Tutorial: List All Volumes

In my previous posts, I showed samples on how to create a new virtual machine instance, and how to list all the virtual machine instances you own. This sample shows how to list all the disk volumes that you have.

To run the following sample, you can check out the previous posts for the pom.xml file and how to get AWS credentials from AWS console.

package org.doublecloud.awssample;
 
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.services.ec2.model.DescribeVolumesResult;
import com.amazonaws.services.ec2.model.Volume;
 
public class AwsEc2ListVolumes
{
  public static void main(String[] args) throws Exception
  {
    AWSCredentials credentials = new PropertiesCredentials(AwsEc2ListVolumes.class.getResourceAsStream("/AwsCredentials.properties"));
    AmazonEC2 ec2 = new AmazonEC2Client(credentials);
 
    DescribeVolumesResult volReq = ec2.describeVolumes();
 
    int count = 1;
    for (Volume vol : volReq.getVolumes())
    {
      System.out.println("Volume " + count   + "\n Details: " + vol);
      count++;
    }
  }
}

The output will be something as follows:

Also posted in Cloud Computing | Tagged , , , | 3 Responses

Amazon Web Service Java SDK Tutorial: Create New Virtual Machine

In my previous post, I showed a sample on how to list virtual machine instances. While that is helpful, maybe even more so is to create a new virtual machine. Here comes another sample that creates new virtual machine instance using the Amazon Java SDK.

Also posted in Cloud Computing | Tagged , , , | Leave a comment

How to Create Plugin Framework Using AngularJS

As I mentioned earlier, the AngularJS is an amazing JavaScript framework. It separates the model from view, and really makes programming in JavaScript pleasant. We actually use it in our recently released product DoubleCloud vSearch. I have personally used it for almost one year now and like it a lot even though I am not yet an expert.

Posted in Software Development | Tagged , , , | Leave a comment

Amazon Web Service Java SDK Tutorial: Simplest Hello World

I looked at Amazon Web Services SDK a while back and started to work with it recently. While searching it the Internet, I got all the results on the first two pages on Google pointing back to Amazon, which is great. After reading these documents, however, I got headaches. Why? For one thing, they are pretty long and sometimes run over different Web pages. Do you want to read for an hour to get your first program running? Or you are like me who would like to get my first program like Hello World to run in 5 minutes or even shorter. We should then read more if we don’t understand some parts. If you have gone through the Amazon documents, you’d know it’s impossible.

Also posted in Cloud Computing | Tagged , , , | 2 Responses

Book Review: The Go Programming Language

After launching our flagship product “Super vCenter”, I finally got a little time to catch up with my other works. One of these is to write a book review for Alan Donovan and Brian Kernighan on their new book The Go Programming Language. I received a copy a couple months ago from the publisher Pearson which also published my book VMware VI and vSphere SDK in 2009.

Posted in Software Development | Tagged , | 1 Response

DoubleCloud Inc Announces “Super vCenter” with Unlimited Scalability

After leaving VMware and VCE, I founded DoubleCloud Inc. While working with many of my clients, we found it’s really a pain point for people to use vSphere Web Client which is quite slow and based on obsolete Flash technology. The old vSphere Client is a lot better in performance and usability, but VMware stopped upgrading it with new features.

Also posted in Virtualization | Tagged , , | 4 Responses

Download Files in PHP Code

Although I created my company Web site using PHP a while ago, I actually used only a very basic feature of the PHP that I can include header and footer on very page. Web site is not a typical software, but the DRY (Don’t Repeat Yourself) rule still applies. When a new major product release coming soon, I started to update the Web site and consider some advanced feature of the PHP.

Posted in Software Development | Tagged | 1 Response

How to Cache Results from Asynchronous Calls in AngularJS

Coming from many years of Java programming, I started to program a lot with JavaScript from a few months ago. Overall the programming fundamentals are the same except the some differences on the language syntax. These differences can be adapted over the time, not quite easily, but gradually easier with more practices.

These days I found myself typing double quote for Java string and single quote for JavaScript strings, even though the double quote works just fine with JavaScript. But keep that difference helps remind me that it’s Java or JavaScript.

Also posted in Uncategorized | Tagged , | Leave a comment

VMware ovftool as Development Tool: Good and Bad Parts

If you want to export a virtual appliance for internal deployment, it’s quite easy. The vSphere Web Client or ovftool command line can take care of this easily. But it’s a different story to build a virtual appliance based software product, which should not only make it work, but also include product information.

Here are some information I learned and decisions I made from packaging an OVF product recently. Hope it would be useful for you. You can also check another post on how to compact the virtual disk for smallest OVA or VMDK.

Also posted in Applications & Tools | Tagged , | Leave a comment

How to Print out Http Request Headers in Java Servlet

While developing a new project, I need to check a request header from client side AJAX call in Javascript. This is not a difficult problem at all, but I found it’s pretty helpful with the headers printed in the log file, especially while debugging. The following code snippet iterates through all the headers and add their values into the string buffer, and further into logger of the Servlet. Notice that the value of a header is not a primitive value, therefore the inner loop is needed to go over each element.

Posted in Software Development | Tagged , , | 1 Response

Setting Up Development Environement for HTML5 and JavaScript

While JavaScript getting more popular with HTML5 these days, it’s also getting more complicated with various libraries. It’s no longer an easy, if possible, job to manage the dependencies by hands.

As I started to play with JavaScript and HTML5, I have installed several tools for the development. If you’re intested in HTML5, the following steps and links may be helpful to you too.

Posted in Software Development | Tagged , | Leave a comment

Simple Script to List and Remove All Stopped Docker Containers

While using Docker command lines, I found it’s sometime a bit confusing to deal with containers. For the underlying operating system, a container is like a process. That is why the docker command use “ps” as the command to list these commands.

However, the typical “ps” command lists all the running processes. When a process dies, it is gone and there is no need to list it at all. For the containers, the story is different. The container can also be stopped, paused, which is different from running state. But you can still bring them back to running state later.

Posted in Software Development | Tagged , , | 3 Responses

How to Pretty Print JSON with Gson and Jackson

In my last article, I compared two leading JSON APIs in Java: Jackson and Gson. If you have tried the samples there, you may have noticed that the two samples print the JSON string into one line. While it’s pretty efficient for machine, it may not easy for human consumption when the Json string is long. Sometimes I have to copy a long Json string into an editor to find out what are there.

Posted in Software Development | Tagged , | Leave a comment
  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.