Saturday, July 26, 2014

Platform-as-a-Service Comparative: Openshift vs CloudFoundry

In previous posts, I wrote about the importance of moving ASAP to cloud and I suggested 3 essential things to help you understanding the cloud computing.

To complete this series, I have written the current post to describe the "middle-layer" of cloud computing: PaaS.

Platform-as-a-service (PaaS) is a category of cloud computing services. From architectural view, it is situated between IaaS (lower layer) and Saas (higher layer). PaaS enables to cloud consumers the creation of software using tools and/or libraries, as well as, it guarantees the continuity of software building cycle with tools for testing and integration. In addition, PaaS providers provide the networks, servers, storage, and other services required to host applications.
The flexibility of PaaS packages helps to abstract the implementation and deployment of applications from the complexity of buying and managing the underlying hardware and software and provisioning hosting capabilities.

My first "cloud" project consisted in moving a legacy application to cloud. The purpose was to implement a Software-as-a-Service based on an existing java servlet application. The first step was to select the suitable Platform-as-a-Service which guarantees a soft migration of the web application. The multiple PaaSs existing in the market made the choice very difficult. Therefore, I decided to draw up a comparative table following predefined criteria. Each PaaS got a rate for every criteria between 0 and 5. +Cloud Foundry and +OpenShift were the best platforms that matches to my requirements because they gathered the important average which was calculated based on coefficient that indicates the importance level. 

Following the resulting table:

Port a legacy application (Java based)3Red Hat provides both fully supported JBoss EAP (App Server) and Tomcat cartridges for running legacy Java applications.4Tomcat4,5
Configuration Complexity1,5Red Hat enables you to quickly deploy apps via the OpenShift Web Console, CLI or Eclipse IDE with minimal configuration required.34
Security (PCI, SAE, etc.)2Red provides security CVE monitoring & patching for the OpenShift platform and all supported runtime cartridges (Java, Ruby, PHP, Python, Node.js, Perl, MySQL, Postgres, MongoDB, etc.). In addition OpenShift integrates SE Linux isolation for security at the paltform container level.44
APIs and Documentation (for Java)2Complete API documentation included for both OpenShift and specific cartridge runtime documentation like JBoss EAP and EWS/Tomcat.4
Mysql support2Red Hat provides a fully supported MySQL cartridge for both OpenShift Online and Enterprise.5Pivotal Integrates natively ClearDb in the market place. Additiannaly, any other mysql service can be used5
Lock-in Level1,5There is no lock-in with OpenShift. Customers can always choose to use the free open source upstream OpenShift Origin distribution if the choose. And OpenShift makes use of standard, unmodified application runtimes like JBoss, Apache, Tomcat, etc. so your apps can be easily migrated off of OpenShift if needed.4,5No lock-in4
Hybrid PaaS1,5Red Hat supports both OpenShift Enterprise for Private PaaS and OpenShift Online for Public PaaS.3CloudFoundry can be public, private, hybrid and micro4
Performance and Scalability1,5The OpenShift platform is proven to perform at scale, with hundreds of thousands of applications live and running in OpenShift Online Public PaaS and numerous enterprise customers deploying OpenShift Enterprise Private PaaS.44,5
Community1Red Hat has built a huge developer community around OpenShift Online with tens of thousands of registered users and over a million apps deployed. See our Developer Spotlight here: OpenShift Origin ( is the upstream open source contributor community for OpenShift. See for details. 4over 10x on total open source contributors to a PaaS project with 1,213 individuals5
Private Cloud1OpenShift Enterprise can be deployed in a customer's Private Cloud environment or on-premise data center.4,5CloudFoundry can be installed in any server4,5
Eclipse IDE Integration1Full Eclipse IDE integration via JBoss Developer Studio plugin4Natively Integrated with Spring Tool Suite IDE4
Major Firmware Support/Partner 1Red Hat4The Cloud Foundry open-source project looks set to become a standard piece of technology in the thriving distributed systems ecosystem: its main backer, Pivotal, has persuaded IBM, HP, SAP and Rackspace to join a new foundation dedicated to the tech.5

Finally, I would like to thanks both cloud foundry and openshift communities, specially Mr. +Joe Fernandes  and Ms. +Diane Mueller .

NoteThis comparative post was written following personal requirements. Certainly, non-mentioned criteria or questions would be better to use them to elaborate a more objective comparative (someone asked : your questions don't make it seem like this is about a PaaS; where is health management, logging services, ID management?). Same for the others PaaS. Indeed, in my case, the main issue was to move a legecy/existing java application to cloud.

Sunday, July 20, 2014

Three Things to know before You start building your "Cloud"

In the previous post, "Why Moving Legacy Applications to cloud is important" I tried to explain the necessity of moving your old applications to cloud as soon as possible.
When I decided to move to "cloud", I had a blurred view of cloud computing meaning. On the one side, I heard about the Amazon Cloud (AWS) which  provides a large computing capacity much faster and cheaper than building a physical server farm. On the other side, many people cited gmail, google docs (google drive now) or drop box as major samples of cloud computing. As you see, there is large difference between those examples. The first one is showing a powerful technical platform that only high skilled people can manipulate it, while the second is dealing with scalable public online services.

After long research, I can summarize three major things that helped me to understand cloud computing:
  • Cloud Architecture
  • Cloud Patterns
  • Mechanisms

Cloud Architecture

The “cloud” in cloud computing can be defined as the set of hardware, networks, storage, services, and interfaces that combine to deliver aspects of computing as a service. Cloud services include the delivery of software, infrastructure, and storage over the Internet (either as separate components or a complete platform) based on user demand.

It is often described as a stack, as a response to the broad range of services built on top of one another. Three major layers compose this stack

  1. Infrastructure-as-a-Service (IaaS) is the hardware and software that powers it all – servers, storage, networks, operating systems ...
  2. Platform-as-a-Service (PaaS) is the set of tools and services designed to make coding and deploying those applications quick and efficient.
  3. Software-as-a-Service (SaaS) applications are designed for end-users, delivered over the web

Cloud Patterns

Cloud Computing is composed by multiple patterns modeling the architecture from different sides, dynamic or static.
Cloud patterns summarize the different cloud components which verify the requirements of automated administration, rapid provisioning, shared resources … These patterns are using different technology mechanisms (newer and older) to build the cloud. Indeed, cloud patterns suggest flexible and scalable solution to the project requirements.
Software-as-a-Service is one of the compound patterns. It is composed by a set of  complementary and interlinked cloud patterns. Following UML Components diagram that shows SaaS composition.

saas pattern


Technology mechanisms represent computing models or ways to implement  platforms. Cloud computing, specially cloud patterns, requires the establishment of a formal level of mechanisms to be able to explore how a given pattern can be applied differently via alternative combinations of mechanism implementations. 
Following some cloud mechanisms:
  • Audit Monitor
  • Automated Scaling Listener
  • Billing Management System
  • Resource Management System
  • Resource Replication
  • SLA Management System

Finally, you can check for more information.

Saturday, May 31, 2014

Why Moving Legacy Applications to cloud is important

Cloud Computing is emerging as a dominant approach changing the IT platforms architecture and verifying the increasing business requirements. In addition to being a Service-Oriented, it is also a business model. Accordingly, Cloud Computing compasses a broad spectrum of business, marketing and technical opportunities and issues.

Since the spectacular Dot-com bubble in 2000, companies from all over the world have continued to develop and implement more scalable e-business strategies. They tried to rethink or refine their business models and what they offered to customers. Many newer companies decided to offer services considering internet as a base part of the service. Cloud computing was the right environment to take off as multi-tenant architectures highly prevalent.

Regardless of the long-debate in the recent years about cloud computing efficiency, several companies and government institutions have switched to it. Indeed, cloud computing came with very huge model composed by many layers which made it very flexible. It can be fully or partially adopted by enterprises. Similar to electricity grid, use sharing resource over a network and Pay as you consume model have offered the best way for enterprises to reduce costs related to the IT infrastructures’ supports and enhancements , as well as, an opportunity to minimize risks.

Both business and technical people admitted that cloud computing is a must. Today, cloud services are used everywhere due to the cloud elasticity which helped cloud vendors to parametrize different packs that verify expectations from all kind of business, major accounts and small companies.  According to analysts, Cloud computing market is expected to grow from $37.8 billion in 2010 to $121.1 billion in 2015 at a CAGR of 26.2 per cent from 2010 to 2015. By 2020, the cloud computing market is forecast to exceed $241 billion, announces The researchers posed several cost-related questions about software-as-a-service (SaaS) to companies that had already migrated to the cloud, but the findings are also relevant to the needs of midsize firms that could be served by the cloud. Smaller firms seek the same benefits that enterprise seeks, including cost savings.

The key issue for enterprises was to find the optimized way to migrate their existing platforms and applications to a cloud-based infrastructure. Obviously, many organization tried to follow an incremental approach to cloud migration. Indeed, migrate to cloud is a big project that goes beyond technical tasks to redefine relationship between business and IT and to re-organise procedures and rules

On the other hand, cloud computing came with multiple advantages for software vendors. The cloud patterns are the main issues that help vendors to maintain and monitor their cloud by respecting standards.

The popularity of SaaS is steadily increasing because it simplifies deployment and reduces customer acquisition costs.In addition, developers can take control easily of the support by managing no more than one version of a product. This approach, called multitenancy, allows companies to scale as fast and as much as needed without replacing costly infrastructure or adding IT staff.
Besides, the subscription-based SaaS pricing model can keep IT budget costs consistent or lower than packaged or homegrown software.

Moving existing business applications to cloud is an important thing to follow up the evolution trend and take profit of technical and functional benefits. This migration can be done by rewriting the application to exploit the cloud features or replacing the application with an equivalent  software as a service (SaaS)  or relocating the application to the cloud environment.

Wednesday, January 22, 2014

Parse HTML Table with Jsoup

Hi All,

Let me share with you the java code that helps me to extract data from html table. The code is based on the Jsoup library that you can add it to your project through Maven repository


or you add the Jsoup jar into the project build path (JAR available here : )

package org.tunindex.parser;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

public class MainClass {

 public static void main(String[] args) {
  Document doc = null;
  try {
   doc = Jsoup.connect("").get();
  } catch (IOException e) {

     for (Element table :"table")) {
         for (Element row :"tr")) {
             Elements tds ="td");
             if (tds.size() > 6) {
                 System.out.println(tds.get(0).text() + ":" + tds.get(1).text());


 Hope it helps you

Good night :-)

Monday, January 13, 2014

Server Tomcat v7.0 Server at localhost failed to start

Hi All,

Hope you are doing good.

A weak error, I faced today with eclipse when I was trying to deploy a java web application on Tomcat, occurred during Tomcat Startup. Following the error message shown in Eclipse:
Server Tomcat v7.0 Server at localhost failed to start

To resolve this problem, follow the instructions:

  1. Delete tmp0 folder inside
  2. Do the Eclipse Magic Steps: Clean the workspace and restart Eclipse
Let me know if you have more efficient solution

Good Bye :-)