Eating My Own Dogfood: SpringSource + WaveMaker + vCloud APIs + Cloud Foundry + vCloud Director

This is my attempt to “eat my own dog food” and use a handful of VMware products/technologies in my current role in PSO. It is also kind of my way to make sense of the entire Cloud Application Platform. For a quite some time now I’ve been focused on the infrastructure layer of the “cake” but I thought it might be good to start exploring other areas in the very rich VMware offerings.

First, let’s start with the holistic view.

Diagram

This is an overall illustration showing the products mentioned in the subject and how they relate to each other. In the next few sections I’ll talk briefly about my experience with each item and then wrap up with a conclusion on how I was able to benefit from this micro-project in the real world. Let’s get started!

Making the Wave

WaveMaker (WM) is one of the products that really impressed me from the first look. Coming from a web development background, I can tell you that a tool like this would have been instrumental for me when I used to build complex web apps in the old days. You literally drag and drop items here and there and voila! You have a fully functioning web application.

I used WM here to build the application interface and multi-tenancy (i.e. accounting and authorization) as a starting point. I didn’t write a single code in this part, everything is visually available for you to drag, drop and run. That’s it. As you can imagine, this was the easiest part of the whole project and I wouldn’t be exaggerating if I told you that it was done in a matter of minutes.

A sip of Java

Now to the tricky part. More than 15 years ago I used to call myself a programmer. I used Basic, Pascal, C, C++ and then figured that it’s not really my thing. Few years latter to that I found myself dragged by force into the WebDev and hence started learning PHP with mySQL. Again, it wasn’t my area of interest so I stopped and promised myself that it will be my last attempt to learn anything in the programming/scripting world. Of course I was wrong.

I started learning about Java about 2 weeks ago! It was really a very, very fresh start since it’s been years without practicing to write a code. Despite that, I was able to find my way through to build some java methods and use them in WM. Let me explain in a bit detail here.

WM comes with a quite rich “Services” that you can inject in your project and one of which is Java. All you need to do is to inset a new Java service in your project, write your own methods and then call them within the app. Since I was quite fresh with Java and was as good as a newbie to this world, I found the Java SDKs of vCloud Director to be all what I need! I used also here the SpringSource Tool Suite (STS) to test my Java code before porting to WM. Of course I could have used any other IDE like Eclipse or NetBeans but I just wanted to stick with the VMware tools here. Note that switching between WM and STS is quite easy and straight forward. You just need to create a new Java project in STS with the WM sources, do your java coding/testing and then go back to WM and “refresh” your service to pickup anything new you have applied.

Pushing to the Cloud

A working App without a solid foundation to run on is useless. There are many options/places to run my app in but what else would be better than the amazing Cloud Foundry? You literally need to type a “vmc push” command and your app will be in the cloud in a minute. Now, how cool is that?

Prior to pushing my app to CF, I wanted to have a taste of the MicroCloud as well. It’s a complete CF platform running in a VM! You just need to download it and run it in Workstation/Fusion and then test your application exactly as if you were pushing and running it on CF.com. After doing all my trials on the MicroCloud, I pushed my app to CF.com, created a couple of instances with another one-liner and that’s all. My app is running now in the cloud http://cloudwave.cloudfoundry.com

Putting it all together

When I first started creating this app, it was really just for fun. I call some Java methods in the app to go and grab specific information from a vCloud Director environment and return it back in a form of data grids. Now, these vCloud environments are actually real public clouds that I’ve built for customers and they were kind to keep an access for me to them. The application is multi-tenant as I explained earlier, so I can login either as an Admin to view all my clouds, or as a vCloud owner who can only see his/her own environment and call information from it. At the time of writing these lines, I have three public clouds and one private/home cloud registered in the app where I can live-grab information from them and show back in my UI. Here is a simple screenshot.


Conclusion

Now to my favorite part in the whole article. I was doing a vCloud engagement this week for one of my customers and while we were in the middle of the discussions they challenged me on how easy or hard it is to leverage the vCloud APIs for integrating with their own portal. In fact, I always get this question in my vCD engagements especially with Service Providers and I normally talk in high level since it’s not in the scope of the project. This time, I had a better story to tell my customer. In fact I didn’t even talk, I just fired-up my browser, opened my CloudWave application online, logged in, and then pulled live information from the customer cloud to the application. I then looked back at them and said “I built this app with no programming experience, and just during this week in my spare time!”

Every single thing you’ve seen in the diagram or read in the article is a VMware product or technology. Even better, it’s FREE! You can go ahead and download WM or STS for free and play with them, you can download the MicroCloud and run it for free on your PCs/Macs. You can register an account, again for free, on CloudFoundry.com and start pushing your apps to the cloud. You can download and use the vCloud SDKs (be it Java, PHP or .NET) and start coding your own apps leveraging the examples included in the kits.

Teaser

I took it up a notch this morning and decided to go crazy. I’ve built my own Cloud Foundry platform from the scratch on one the public vClouds that I’ve built for a customer. It’s up and running at the time of this writing and I’ve just pushed my very first app to it. Stay tuned for more details soon. http://www.myvcap.com/

Share Button