Home > Blogs > VMware vFabric Blog > Monthly Archives: April 2012

Monthly Archives: April 2012

Application Director in 5 Minutes

The Problem

As architects, developers of software, and managers of IT infrastructure, we spend quite a bit of time (and often frustration) installing operating systems, setting up applications and components, and configuring them. These activities can be time consuming, tedious, manual, and error prone.

Application Director's Purpose and Key Concepts

Enter VMware vFabric Application Director. The key purpose for Application Director is to automate the provisioning of infrastructure and applications so it happens faster, with fewer errors, and with less headache. If you’ve ever used a standard catalog of parts, you’ll get the idea immediately because Application Director stores information in a visual representation called a blueprint. What’s in a blueprint? Basically, a blueprint includes everything you would use to build, configure, and deploy a server or group of servers to build out your application. Blueprints define all the components like the operating system, virtual machine templates, web server, application server, database server, monitoring software, packaged software, EAR, SQL, or WAR, etc.  All these components are available to drag and drop onto your blueprint’s canvas from a standard catalog. Once the core building blocks are in place on your blueprint, you can further tailor your application build plan by including dependencies, policies, and configurations.

About the Demo

Continue reading

VMware Partner Q&A: 10 Things About vFabric Worth Hearing

This interview is with Jeff Reed, Application Development Executive with Logicalis.

Q1: How have you partnered with VMware?

Answer: Logicalis is a Global Systems Integrator and premier partner of VMware.  Virtualization and Cloud Computing are major world-wide practices for us, with proven experience not only in VMware’s virtualization suite of products, but also in VMware vFabric application development, deployment, and management suite of products. We provide public cloud solutions to our customers utilizing the VMware products, as well as help our customers deploy their own private clouds.  VMware is the market leader in virtualization and a leader in the transition to cloud computing. We’re collaborating on solutions and opportunities to address the needs of today’s Enterprises as well as tomorrow’s.

JeffR_Logicalis_Pt1_FINALHD_605x300

Jeff Reed, Logicalis on working with VMware vFabric

Q2) What’s your firm’s background with Java, Spring, and Applications Development and Deployment?

Continue reading

Using AspectJ for Accessing Private Members without Reflection

During development of Insight plugins we sometimes come across the need to access a private member of some 3rd party library.

The common approach for this is to use reflection:

While this is a widely accepted and simple approach, we searched for a way to improve this, mainly due to performance concerns as we try to maintain a very low overhead for our code agent.

Following is an alternative way we came up with for doing this with AspectJ.

The main idea is to use a mixin aspect (using inter-type declarations) that introduces a getter for the private member to the accessed class.
Then an around advice can be written to intercept calls to this getter method, in which the private member is returned and no call to proceed() is made.
This is similar to the useful idioms described in AspectJ in Action, Second Edition (Section 5)  for providing a default interface implementation or for introducing members to multiple types, with the addition of the around advice that "hijacks" calls to the new getter.

It is important to note here that while it seems that we have declared an interface that any class can implement, the implementing aspect relies on the actual instrumented object being of the concrete SomeClass type.
This means that SomeClass must be visible to your code (public). Otherwise refelction is still the only option.
The aspect is declared as privileged in order to enable the access of the private member of the target object once it has been cast into the concrete SomeClass  type.

Here are the classes in play:

  • The class with the private member
  • The interface declaring the public getter
  • The privileged aspect, containing the mixin declaration of the interface and the around advice
  • Example of accessing private member from a different class

Two things should be noted when using load-time weaving:

  • Since AspectJ will only weave during load time, the interface should be declared in a separate java class. This is necessary in order for the java compiler to recognize these calls from other classes : ((PrivateMessageExposer)privateClass).getPrivateMessage();
  • In order to protect your code from API changes in 3rd party libraries, you should  catch NoSuchMethodError exceptions that will be thrown during runtime.

Following is a summary of some basic performance tests we ran, where we compare execution times of a loop that is executed n times with reflection/weaving. The loop simply accesses the privateMessage field of the same instance n times consecutively.
The tests were run with the following hardware – 8 Cores x Intel Xeon E5410 @ 2.33 GHz. 16 GB memory (Heap 1GB).
As the table shows, the performance gain reaches 31% as the number of execution times gets higher, but there seems to be some performance degradation for lower numbers.

Conclusion

Depending on your needs and existing use of AspectJ, this could be a simple way to gain a performance improvement. In order to know if this will indeed result in a performance improvement and of what magnitude, you should run your own performance tests, since the results above are not conclusive, and moreover, represent a very simlified use case.

In addition to the possible performance gain, you gain more type safety than with reflection, as can be seen by this line of code : return ((SomeClass )obj).privateMessage;

  – Talya Gendler, Spring Insight Engineering

Hyperic monitoring its own Oracle 11g r2 repository

Below are some screen shots of what Hyperic 4.6.5 shows in regards to monitoring Oracle 11g RDBMS running on a VM running Redhat 5.7 guest OS. The database it's monitoring is the actual repository database being used by Hyperic itself. The screen shots below show the main dashboard with the Oracle 11g resource overall status as well as viewing a DB writer process for the running instance itself.

Img1

Img2

The plugin to monitor the Oracle instance is provided as one of the 80+ plugins available with Hyperic out of the box. Once the HQ agent discovers the Oracle instance we are left with simply providing the config to a DB user which has access to all data dictionary tables. The easiest way to do that is to ensure the user you connect wih has the following granted.

grant select any dictionary to {user};

To me given I own the VM / Oracle instance so I will use the system DBA user as the user to query the data dictionary as shown below. Once setup your good to go.

Img3

For more information on vFabric Hyperic use the link below.

http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.hyperic.4.6/vFabric_Hyperic_4.6.html