cloud interoperability demo

Post on 08-May-2015

881 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

"Project Lightning" Consume an Azure cloud service from Java

TRANSCRIPT

“Project Lightning” Demo

Consume an Azure cloud service from Java

Access an Azure cloud drive from a Java client

− The cloud drive API is not part of the Windows Azure Tools for Java that Microsoft distributes.

− The cloud drive API is only designed to work when called form a cloud-based application. We will get it to work from a desktop application.

− Our application will allow us to explore the contents of a normally opaque cloud drive.

Microsoft’s Azure tools for Java do not support Azure Cloud Drives. This demo does.

Azure

JNBridgePro

JavaClient

Cloud Drive

ProxiesCloud Drive

Step 1

− Upload assemblies and generate the proxies used to access the cloud drive API,

− Or use cloud-resident assemblies/APIs.

Azure

Java Proxies

.NETAssemblie

s

.NETAssemblie

s On the ground

Fill in the name of the project

Go to Azure-based website that hosts the JNBridgePro proxy generation tool

Browse for the FileSystemView DLL that contains the API we want, and upload it.

Enter the names of the classes we want proxied. The tool will automatically proxy any additional classes that are needed.

Name the proxy jar file. We’ll give it the same name as the project, “TestSeven”.

Build the proxies

The proxy generator’s output displays the generated proxies. The proxies will remain in the cloud until downloaded by the user.

Step 2

− Ensure the proxies are distributed to the clients that need them

− Download the generated proxies

− Note: proxies also contain pointers to cloud resources

Azure

Java ClientOn the ground

JNBridgePro

Java Proxies

Java Proxies

Cloud Drive APIs

A different Web page for users to download previously-generated copies of the proxies

The proxy distribution page allows you to choose which previously-generated proxy jar files to download.

As we’re generating the cloud drive explorer, we’ll download the previously-generated proxy jar file generated as part of the FileSystemView project.

Opening the jar file, we see it contains its own copy of the Java-side config file jnbcore_tcp.properties.

We supply it as part of the proxy jar file because we already know where in the cloud the Java side will be, and the user doesn’t have to.

Opening the property file, we see that the proxy generator has supplied a host address in the Azure cloud. This address can be used without modification.We’ve also included the JNBridgePro Java-side classes, which simplifies deployment.

Step 3

− Integrate the proxies with our Java project

− Use the proxies to access the Windows Azure cloud drive

Azure

Java ClientOn the ground

JNBridgePro

Cloud Drive API Proxies

Cloud Drive APIs

Cloud Drive

In Eclipse, we reference the generated proxy jar file.

This special cloud-enabled jar file contains the Java-side configuration and the JNBridgePro Java-side runtime components, so no additional Java-side components need be included.

We’ve modified the open-source project Java File Manager (JFM). Ordinarily used to explore on-disk file systems, it now uses the Azure cloud drive API associated with FileSystemView.jar, and shows the content of the cloud drive.

The cloud drive appears as virtual drive L:

Now we can drill down into the folders in the cloud drive, and manipulate the files as if they were on a local drive. This capability enables us to:

– Use an API designed only for the cloud in a desktop application.

– Use the API in a Java application, without a Java-based version of the cloud drive API.

– Know the contents of our cloud drive, and modify them.

Why is this useful?

− Access Windows Azure APIs from Java-based applications

− Access Windows Azure APIs from desktop applications

− Make .NET-based services, APIs, and components accessible to all, including:

− Components that are not Web-service enabled− Users running Java or .NET clients

Azure

JNBridgePro

JavaClient

Java Proxies

.NET Library

.NETClient

.NETProxies

Why is this useful?

− Distribute and deploy APIs, even where WSDL doesn’t work

− Simple, easy, and transparent distribution.

Azure

JNBridgePro

JavaClient

Java Proxy

.NET Library

Java Proxies

Why is this useful:

− A possible first step towards devising a “hardware abstraction layer”

− Legacy applications can run in the cloud by “thinking” they have access to non-existent legacy facilities like the registry and file system

− Enables migration to the cloud without completely rewriting the app

JavaClient

Cloud Drive

“Registry”“File

System”

.NETApp

Page Blob

Hardware Abstraction Layer

Azure

Follow our progresswww.jnbridge.com/cloud

www.jnbridge.com

© 2010 JNBridge, LLC. All rights reserved.  

top related