August 28, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Java Cloud Development Platforms, Page 2

  • March 20, 2011
  • By Debu Panda
  • Send Email »
  • More Articles »

Using PaaS for Java Development

PaaS is revolutionizing the way applications are built and deployed. You do not have to worry about the actual physical or virtual machine, application server/middleware platform and database or messaging system. You depend upon the platform provider for these services, similar to what you depend upon with an application server or a database in your on-premise environment.

When you start to build your application, you have to plan your target deployment platform because there is no standard similar to Java EE. If you are using PaaS then you have to use the API /SDK provided by the PaaS vendor. Next, I will examine PaaS offerings from a few popular vendors.

Google App Engine

Google App Engine provides the ability to develop and deploy applications in the cloud using Python or Java.

Google provides an Eclipse plugin to help you build Java-based Web applications and deploy them into their cloud platform. The following figure shows the Eclipse plugin that can be used for building and deploying applications to Google App Engine. As you can see, the deployment of the application requires credentials in Google App Engine.

Java Cloud Development -- Google App Engine

Google App Engine provides a Web container environment in the cloud. You can use Servlets, JSP, JPA or JDO and GWT to build Web-based applications. For persistence, you have to use Google Bigtable. Bigtable is a high-performance and proprietary database for storing structured data and is based on distributed file system.

Google App Engine supports Java Persistence API (JPA) with BigTable. However, JDBC is not allowed from Google App Engine and you cannot use any relational database on the cloud or an on-premise database on a hybrid cloud. This is a big limitation for any application that you want to build using an existing database. The Eclipse-based IDE allows you to deploy an app directly to Google App Engine.

Google App Engine is not Java EE compliant and does not support many features that you may be using with your Java Web application. You cannot move an existing Java Web application directly to Google App Engine without making source code changes.

If you are building an application that is oriented to external users and requires services such as BlobStore, Images, Mail Storage, XMPP, Map Reduce, etc., then you may consider Google App Engine. Google App Engine also allows integration with existing applications such as Oracle CRM using Web services.

Force.com

The Force.com platform allows developers to build applications on the cloud using Apex code and VisualForce, proprietary technologies developed by Salesforce.com. Apex code is a strongly-typed programming language that can be used to build server-side code such as business logic, database triggers, etc.--Java is not natively supported in the Force.com platform.

Following is an example of an Apex class. If you look carefully, it looks similar to Java.

 public interface ConfirmOrder {

Double getRebate();


}



public class OrderConfirmation implements ConfirmOrder {




static final double DEFAULT_REBATE = .10;



public Double getRebate() {

return DEFAULT_REBATE;


}



}

Salesforce.com provides an Eclipse plugin named Force.com IDE that you can use to build, test and deploy applications in the Force.com platform. Developers can also share their applications in the AppExchange, which is similar to the Apple AppStore. The following figure shows a screen shot of the Force.com IDE and type of components that you can build with it.

You can use VisualForce to build visualization for applications that are deployed on the Force.com platform. VisualForce provides an MVC paradigm to build user interfaces (UIs). You can use Force.com IDE to build VisualForce pages.

VMForce

The VMForce platform is a joint venture between Salesforce.com and VMware and is supposed to provide cloud application platform using SpringSource technologies. At the time of writing, this service was not available to the public. As per the marketing materials, you should be able to deploy standards compliant Web applications to VMForce. The VMForce platform will be built on SpringSource tcServer--a modified version of the popular Tomcat Web container. It is expected that it will provide better integration between JPA and the Force.com database. Hopefully, VMForce will also enable users to leverage their existing on-premise database by providing support for the hybrid cloud infrastructure.

Amazon Web Services

Amazon Web Services (AWS) not only provides a complete application platform named Elastic BeanStalk (still in beta), where you can deploy your Java Web application, but it also provides some key services such as SimpleDB, Elastic MapReduce, and Simple Queue, which you can use from your application either when deploying to Amazon EC2 or your on-premise application. Amazon also has started Simple Relational Data Service, a fully-functional MySQL database, and plans to start Oracle database services.

You can build Java applications using the Amazon Web Services SDK, either in Java or several other programming languages. You can use Amazon Simple DB with JPA deployed in your application in your Tomcat or WebLogic instance.

Also, a community library is available that provides a Java API for using all Amazon Web services. Amazon provides an Eclipse plugin to build applications using AWS.

AWS Elastic Beanstalk

Elastic Beanstalk provides a Web container environment using Apache Tomcat where you can deploy Java Web applications. You just package your Web application into WAR packages and deploy into Beanstalk either using Eclipse, Amazon's management console, command line tool or using Web services calls. If you use Tomcat or a standard Web application, then it will be much easier to migrate your on-premise application to Amazon Beanstalk. Amazon provides all the benefits of cloud computing such as load balancing and auto-scaling and provides Web interfaces to manage these features. You can use either relational databases such as Oracle or Amazon's Simple DB Service for persisting data from your Web application.

It is apparent from above discussion that most of your existing Java applications will not work as is without requiring application changes. This is due to the fact that there are no standard APIs and you will have to learn the API based on the PaaS provider. If you are using advanced services such as JMS or EJB then you have to make changes to your application because none of the PaaS providers currently supports these API. I hope that a standard will evolve as the PaaS concept gains popularity in the developer community.

Building a Private PaaS for Java Development

Similar to building private IaaS, IT organizations may choose to build their private PaaS using the same characteristics of a public PaaS environment. You can leverage the tools and frameworks from a private cloud management vendor for managing a private PaaS. Your IT organization can provide services such as J2EE or Java EE servers, JMS servers, database, caching services, security, and so on. For example, an organization may build their PaaS environment with Oracle Fusion Middleware (WebLogic, Coherence and SOA) and a database and host these themselves.

As a developer, you build applications using services exposed by your private PaaS and deploy your application into the deployment environment made available to you. Most application server vendors such as Oracle, IBM and JBoss are working to provide infrastructure to help IT organizations provide private PaaS infrastructures. Microsoft's Windows Azure Platform Appliance enables organizations to build their own PaaS environment using Microsoft technologies.

If your IT organization chooses to build its own Private PaaS, your development methodology probably does not have to change a whole lot, except you cannot choose your own versions of the API and libraries. You will be limited to the services provided by your private PaaS. The private PaaS will deliver several benefits, such as standardization across the organization, consistent upgrade and patching policies, optimal resource usage, and so on.

Using SaaS for Java Development

If your company is choosing SaaS, then end users directly use the application as a service and hence there is no IT infrastructure required on premise. For example, your customer may be using CRM from Salesforce.com, a HRMS system from Workday or a help desk system from BMC Software. When using SaaS, there may be some customization required to meet your organization's needs and as a developer you may have to use the platform made available by the SaaS vendor. For example, you have to use Force.com, Apex and VisualForce to customize Salesforce.com's CRM.

There may be several opportunities for developers to integrate new SaaS applications with existing systems based on the size of their businesses. You have to note that an enterprise cannot move their applications to SaaS or cloud-based solutions overnight. For example, an organization may adopt Salesforce.com CRM to replace their old CRM system, but they may have to integrate it with their existing applications such as Oracle eBusiness Suite. The SaaS vendors provide both SOAP- and REST-based Web services to help customers integrate with their existing applications. For example, you can use JAX-WS 2.1 to integrate your existing applications with Salesforce.com.

SaaS for Application Lifecycle Management

Another important aspect of SaaS is for Java developers to use application lifecycle management (ALM) tools such as source code control or continuous integration as services. Several companies such as CollabNet and VMware have started offering these services in the cloud. This frees you from worrying about building these software infrastructure elements in-house and mundane issues such as backup, recovery, availability, and so on.

Conclusion

Cloud computing is changing the way applications are built and deployed. In this article, I provided an introduction to cloud computing and provided some insights on different cloud platforms. Most importantly, you learned how cloud computing will impact your life as a Java developer.

About the Author

Debu Panda is a technologist with more than 18 years of experience. He is the lead author of the top-selling books EJB 3 In Action and Middleware Management. He is a regular contributor to leading technology magazines and a presenter at conferences such as JavaOne and Oracle OpenWorld. He blogs about middleware at http://debupanda.blogspot.com


Tags: Java, Cloud

Originally published on http://www.developer.com.

Page 2 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel