Getting Started with IBM Bluemix: Web Application Hosting Scenario on Java Liberty

IBM Redbooks Solution Guide

Published 16 February 2015

Authors: Vasfi Gucer

Abstract

Based on the open source Cloud Foundry technology, IBM Bluemix is an open-standard, cloud-based platform for building, managing, and running applications of all types such as web, mobile, big data, new smart devices, and so on. Bluemix abstracts and hides most of the complexities that are associated with hosting and managing cloud-based applications. As an application developer, you can focus on developing your application without having to manage the infrastructure that is required to host it. For mobile apps, you can use the pre-built services that are provided by Bluemix. For web apps, you can upload your application to Bluemix and indicate how many instances that you want running. Bluemix then takes care of the rest. In this document we give a brief overview of IBM Bluemix and show you a sample Web Application Hosting scenario implemented on Bluemix Java Liberty runtime environment.

Contents

Based on the open source Cloud Foundry technology, IBM Bluemix is an open-standard, cloud-based platform for building, managing, and running applications of all types such as web, mobile, big data, new smart devices, and so on. Bluemix abstracts and hides most of the complexities that are associated with hosting and managing cloud-based applications. As an application developer, you can focus on developing your application without having to manage the infrastructure that is required to host it. For mobile apps, you can use the pre-built services that are provided by Bluemix. For web apps, you can upload your application to Bluemix and indicate how many instances that you want running. Bluemix then takes care of the rest. Figure 1 shows the Bluemix catalog.



Figure 1. Bluemix catalog

This document provides a brief overview of IBM Bluemix and shows you a sample Web Application Hosting scenario implemented on Bluemix Java Liberty runtime environment.


Did you know?

Bluemix has a Garage! Bluemix Garage is an IBM community and consulting labs that join startups, enterprises, and agile design practices with Bluemix and IBM expertise to enable collaboration and success at every level. On an ongoing basis, IBM will identify products created in the Garage, as well as startup offerings, that would benefit IBM’s clients, making them available as software-as-a-service (SaaS) capabilities in IBM’s Cloud marketplace.

Currently, there are two Bluemix Garage locations: San Francisco South of Market, which is home to more startups per square foot than anywhere in the world, and London, Canary Wharf, which is home to over 100 startups and growing fast.

Have a great idea for a killer application? Maybe you can build it in the Garage with help from IBM Bluemix experts and host it on Bluemix. Head over to San Francisco or London!


Business value

Bluemix has the following benefits:

  • Reduce time for application/infrastructure provisioning
  • Allow for flexible capacity
  • Help to address any lack of internal tech resources
  • Reduce Total Cost of Ownership (TCO)
  • Accelerate exploration of new workloads – social, mobile, big data


Solution overview

Hosting applications on Bluemix provides users with many advantages. Bluemix is an end to end offering that provides developers with a complete set of DevOps tools and integrated services to simplify development, testing, building, and deployment of applications. Moreover, Bluemix-hosted applications have access to the capabilities of the underlying cloud infrastructure. This infrastructure provides the best support for non-functional requirements that are needed to support enterprise applications such as scalability, performance, availability, and security. Furthermore, Bluemix provides a rich set of services to extend your application through incorporation of sophisticated analytics, and social and mobile capabilities. Finally, the Bluemix platform frees developers and organizations from worrying about infrastructure-related plumbing details so they can focus on what matters to their organizations; Business scenarios that drive better values for their customers.

We based the scenario in this document on the web application hosting reference architecture at http://www.cloudstandardscustomercouncil.org/web-app-hosting-wp/index.htm at the Cloud Standards Customer Council Resource Hub (http://www.cloud-council.org/resource-hub.htm). This reference architecture covers, in detail, everything from the user requesting the initial URL all the way through the backend data calls.

Figure 2 shows the high-level architecture.


Figure 2 - Web application hosting reference architecture

The following list explains the components of this reference architecture:
  1. Inbound user requests are initially handled by Domain Name Services, which route your traffic to the proper infrastructure endpoints.
  2. The Content Delivery Networks provide the least latency and the highest speed to create an exceptional user experience for all your static application content.
  3. The Firewalls provide a boundary to help keep intruders out while your web application operates smoothly.
  4. The Load Balancers allow configurability and flexibility to manage the traffic and resource usage of server nodes in your environment so that no single device gets overwhelmed.
  5. The Web App Server component is the heart of your web application, serving up your core application to users. Build your server infrastructure using high performance containers, virtual machines, or Cloud Foundry-based run times, all of which can be similarly integrated across the architecture.
  6. The User Registry Services enable authorization and authentication to secure resources across your application.
  7. The Session and Data Caching ensures low latency data access and prevents data loss for a robust user experience. Additionally, storage services allow you to customize and have total control over a SAN or NAS solution that fits your storage needs.
  8. The Managed Database Services deliver high-performance database support, while allowing you to focus on your application and not database maintenance. These databases range from standard SQL databases to newer NoSQL databases to big data services.

This architecture has multiple tiers and multiple components in each tier that are critical to the optimal performance of your web application. We simplified the original reference architecture to map it to the needs of the scenario in this document. We deployed our application (Bluemix-Java-CacheLab) in the Web Tier, incorporating the Auto-Scaling service. This is a sample application that shows how to use Java Native API to access the Data Cache service.

As part of the Service tier, we incorporated the capabilities of the Data Cache service and the Load Impact service. In the Dev Tier, we used the Delivery Pipeline and Monitoring and Analytics services to help during the automatic build and deploy, as well as monitoring the health status of our Bluemix application.
Figure 3 shows the scenario components.


Figure 3. Scenario components

The list of Bluemix services that are used in the scenario are summarized below:
  • Data Cache: An Bluemix service that supports distributed caching scenarios for web and mobile applications. The caching service uses the technology of a data grid in which you can store key-value objects. Data Cache offers a business-ready, in-memory data grid (IMDG) that places the data close to the logic and keeps it there as the business scales up.
  • Auto Scaling: In Bluemix, you can automatically manage your application capacity depending on incoming loads and policies. The IBM Auto-Scaling for Bluemix service enables you to automatically increase or decrease the compute capacity of your application. The number of application instances are adjusted dynamically based on the Auto-Scaling policy that you define. The service also provides metric statistics for the instances of your application. You can see the average statistics and select specific instance statistics.
  • Monitoring and Analytics: This Bluemix service provides you with the visibility and control you need over your application. You can determine the response time that your users see, understand the performance and availability of the application components, and use analytics to keep your application up and performing well. The service also provides capabilities for diagnosing problems faster by quickly identifying the root cause of application problems with line of code diagnostics. It also provides the ability to intelligently search through logs and metrics data to find the answers to applications problems.
  • Delivery Pipeline: This Bluemix Dev-Ops service allows developers to automate builds and deployments, test execution, configure build scripts, and automate execution of unit tests. It also provides capabilities for automatically building and deploying your application to IBM's cloud platform, Bluemix.
  • Load Impact: This third-party service provides for unlimited testing, on-demand from multiple geographic locations where you can create sophisticated tests using the simple GUI or connect directly to Bluemix through the API.
The following screen captures show the output that we get from these services in this scenario. For a full description of scenario steps, see Bluemix Architecture Series: Web Application Hosting on Java Liberty, REDP-5184. Figure 4 shows how to access the Data Cache service.


Figure 4. Sample application that shows how to use Java API to access the Data Cache service

Figure 5 shows the performance statistics available with the Monitoring and Analytics service.


Figure 5. Performance statistics of the application using the Monitoring and Analytics service

Figure 6 shows the load test results that you can get using the Load Impact service.


Figure 6. Load test results using the Load Impact service

Figure 7 shows using the Auto-Scaling service to display the Application Scaling History.


Figure 7. Application Scaling History - using the Auto-Scaling service


Solution architecture

Bluemix is an environment for you to build applications and use services when you develop applications. Bluemix also provides an environment to host application artifacts that run on an application server such as Java Liberty. Bluemix sits on infrastructure (networking, storage, servers) hosted by IBM Softlayer and by using SoftLayer, Bluemix deploys virtual containers that host each deployed application.

Figure 8 shows the Bluemix architecture (we simplified it for our purposes) within the context of our scenario.


Figure 8. Bluemix architecture within the context of our scenario

Consider these concerns about the Bluemix architecture:
  1. You start by pushing your code through Cloud Foundry. Developers can interact with the Bluemix infrastructure by using a browser-based user interface or a Cloud Foundry command-line interface, called cf, to deploy web applications. In our case, we pushed the sample app Bluemix-Java-CacheLab. You can obtain this application from https://hub.jazz.net/git/chowdhu/chowWebCache. For more information, see Bluemix Architecture Series: Web Application Hosting on Java Liberty, REDP-5184. You can deploy your apps to different Bluemix regions. You can choose to deploy either to one region or across multiple regions. In our scenario, we only used one region.
  2. Cloud Foundry interprets which language you’ve used and associates your code to the appropriate run time, which is Java Liberty in our case.
  3. Your application can now pull prebuilt services (IBM, third party, or community built) in from the marketplace and use their functionality. In our scenario, we used several IBM services (Data Cache, Auto Scaling, Monitoring and Analytics, and Delivery Pipeline) and one third-party service (Load Impact).

    Although not used in our scenario, your app can also connect to Community Services. In addition, your app can connect to traditional IT (on-premises) systems with a secure connector (IBM Cloud Integration for Bluemix service) as part of a hybrid cloud solution or connect to other clouds that you use with a secure connector. We did not use these features in our scenario.
  4. When your app is ready to go, it can be accessed by anything with a web browser and a connection to the internet, a smartphone app (by using the Bluemix SDK) to use backend services, or another type of app or system using the REST/HTTP APIs.


Usage scenarios

The following are some scenarios where using Bluemix makes a lot of sense:
  • A start-up company with a small IT team wants to try out a new web application, but cannot afford the large up-front costs associated with typical application development and deployment, including the complexities of setting up hardware and software infrastructure for the application.
  • A large manufacturing company would like to develop and connect their Systems of Engagement applications (typically decentralized, incorporate technologies that encourage peer interactions) with the Systems of Record applications (typically on-premises applications and databases that store business records and automate standardized processes).
  • A midsize company in a highly competitive industry needs to develop and market new and innovative applications in agile fashion using several programming languages.
  • A large telecom company wants to develop born-on-the cloud applications for a new business initiative and implement an integrated developer experience for mobile and cloud with DevOps services.
  • A Software Development company wants to create a new SaaS offering and would like to integrate several composable services from IBM and partners into their product.
  • An insurance company would like to equip their employees with mobile analytic tools and is looking for a cloud platform that allows for easy development of mobile backend applications with connections to on-premises databases.


Integration

Bluemix platform has native integration with many IBM services such as DB2, BigInsights, and Watson, so that your applications can have immediate access to many leading applications from IBM and partners. In addition, it is possible to connect your Bluemix apps to traditional IT (on-premises) systems with IBM Cloud Integration for Bluemix service as part of a hybrid cloud solution. By using the Cloud Integration service, you can create a Cloud Integration API and publish the API as a private service for your organization. See the Solution architecture above for more details.


Supported platforms
  • Hardware requirements: Accessing Bluemix requires an Internet connection and a browser.
  • Software requirements: Accessing Bluemix requires an Internet connection and a browser.


Ordering information

This product is available by using Passport Advantage or IBM Cloud Services Agreement. It is not available as shrinkwrap. Ordering information is shown in Table 1.

Table 1. Ordering part numbers and feature codes
Program nameProgram numberCharge unit description
IBM Bluemix Platform Subscription and Support5725-S00 Pay Per Use, Per Month, Per Month with Support, Partial Month, Overage


Related information

For more information, see the following documents:
  • IBM Redpaper: Bluemix Architecture Series: Web Application Hosting on IBM Containers, REDP-5181
  • IBM Redpaper: Bluemix Architecture Series: Web Application Hosting on Java Liberty, REDP-5184
  • IBM Redbooks Point-of-View publication: Accelerate Development of New Enterprise Solutions for the Cloud with Codename Bluemix, REDP-5184
  • IBM Bluemix product page
    http://www-01.ibm.com/software/bluemix/
  • IBM Offering Information page (announcement letters and sales manuals):
    http://www.ibm.com/common/ssi/index.wss?request_locale=en

    On this page, enter Bluemix, select the information type, and then click Search. On the next page, narrow your search results by geography and language.


Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.

Follow IBM Redbooks

Follow IBM Redbooks