The following solution design for a cloud implementation project is based on SAP HANA Cloud Platform. I examine the architectural concepts and characteristics of how to make use of business on-premise data in a cloud computing environment. I also review the end-to-end design of a cloud implementation. Finally, I provide lessons learned.
Principles of Cloud Applications
To use a cloud computing environment for developing new applications for improving existing business processes, you have to leverage a specific set of services. These services are divided into three groups:
- Infrastructure-as-a-service (IaaS) provides virtualized computing resources over the Internet.
- Platform-as-a-service (PaaS) delivers hardware and software applications required for the development of new applications.
- Software-as-a-service (SaaS) is a software licensing and delivery model in which software is licensed on a subscription basis and is centrally hosted.
The decision on which service actually should be used has to be based on the facts of each use case. In this article I describe the implementation of an application on a cloud environment. The PaaS service provides the platform and tools for developing new applications and is thus the required service for the project I discuss. The architecture of a cloud application should consider structural principles that affect the design of the application. These key structural principles are architecture of services, being resistant to failure, security, and location independence.
Architecture of Services
Application program interfaces (APIs) are the core components of cloud applications. APIs abstract an application from the underlying technology implementations as well as vendor-specific implementations. A cloud application architecture should be designed from APIs that address a simple and complete use case. This concept enables a flexible solution. Since web services are based on the HTTP protocol (which is stateless), a server treats each request from a client as an independent transaction that is not related to any previous request.
Developers should design APIs of an application as independent services. These services implement a specific function and do not rely on other API calls within the application. For example, an application that allows end users to book business trips can consist of functions that search for accommodations and flights, recommend hotels in a certain city, and display previous bookings. All these functionalities can be designed as separate API functions that might even be reused within other applications.
Resistance to Failure
Failures in the cloud infrastructure should be handled without interruption of service. Despite the fact that components of an application will fail and services will become unavailable, business applications need to continue to run. Designing applications to overcome failures in a distributed environment affects decisions everywhere in the architecture, but especially in the user experience of an application.
API services of an application need to be able to process users’ requests even if other API functions that are used within an application fail or are unavailable. An API service should be designed to tolerate failures from other API functions. Developers need to consider how to handle failing API functions gracefully within an application. In the example of the business trip application, a failure of the recommended hotel’s API service degrades the quality of the application for end users. However, end users should still be able to book business trips or review previous bookings. Developers need to consider what API services within an application could fail and consider those when designing the application.
Applications need to be based on secure life cycle standards. Security is needed in every layer of the application. Examples are encrypted transports into the cloud computing environment, secure coding, and access control inside an application. It is required that every interface of an application be protected through authentication and authorization mechanisms.
In a cloud environment, all components of an application leverage services. Applications discover these services (e.g., network or storage) dynamically rather than relying on hard-coded dependencies. This leads to the design of granular components of an application that can operate independently in a distributed environment.
So far, I have listed the different services that a cloud computing platform provides. The differences within these services are crucial for deciding which services you have to use when implementing cloud computing. Now I stress the main structural principles of cloud applications. These elements build the root map for designing the application within a cloud computing environment. The following section gives an insight on how these elements influence the implementation process of an application on SAP HANA Cloud Platform.
Design and Implementation of a Cloud-Based Solution
Use case: A business wants to create an application that uses data that is stored in an on-premise system. This data provides users with information that they can access at any time and from any device over the Internet. From the business’s point of view, it is essential that the application provide a user-friendly interface and process user requests rapidly. From this, it follows that data from an on-premise system has to be made available in a cloud environment. In this scenario, SAP HANA Cloud Platform was the chosen PaaS environment.
Technology stack: SAP HANA Cloud Platform is SAP’s PaaS offering to help businesses develop, deploy, and operate applications in a cloud-computing environment. SAP HANA Cloud Platform offers three packages:
- SAP HANA Infrastructure Services (IaaS) provides SAP HANA infrastructure on a subscription basis for companies that already have a license and that want to get up and running quickly without having to invest in hardware.
- SAP HANA DB Services (DBaaS) provides both infrastructure and license subscriptions for SAP HANA. It provides native development capabilities such as SQLScript and Extended Application Services (SAP HANA XS).
- SAP HANA App Services (PaaS) includes all the capabilities of the DB Services package and also provides shared application services and capabilities typically required for the development of new multi-tenant cloud applications or extensions of existing solutions residing either in on-premise or cloud environments.
Given the built-in SAP HANA native development capabilities such as SQL Script and SAP HANA XS, developers can create business functions that can be consumed through different devices. By using native SAP HANA views (e.g., analytic or calculation views) and moving heavy data processing business logic down to the database layer, you can create very sophisticated applications entirely within SAP HANA itself.
The solution architecture of the project in my example consists of three layers built using the SAP HANA Cloud Platform solution offering:
- A Data Integration Layer based on SAP HANA Cloud Integration for Data Services (HCI-DS) allows you to use extracting, transforming, and loading (ETL) logic to move data between on-premise systems and SAP HANA Cloud Platform.
- A Data Management and Calculation Layer based on SAP HANA Cloud Platform offers the flexibility to design database schemas and calculation logic via SAP HANA views.
- A Visualization Layer based on SAPUI5 deployed on SAP HANA Cloud Platform
comes with SAP HANA XS Engine service capabilities. Modern HTML5 applications based on the SAPUI5 library can be developed and deployed on this service of the SAP HANA Cloud Platform.
I describe the components of the solution architecture in more detail in the following sections.
Data Integration Layer
The first step in building the solution architecture of the application was the analysis of the on-premise source systems and finding an optimal way to integrate the on-premise data into the SAP HANA Cloud Platform database. The source system consisted of an Oracle database and Simple Object Access Protocol (SOAP) web services that allowed access to the on-premise data. A key requirement was regular data extraction on a daily basis, thus making sure that the latest relevant data is always available in the cloud application. The HCI-DS solution was used to implement the Data Integration Layer of the project.
The HCI-DS solution consists of two main components:
- A web application to design and schedule ETL jobs
- An SAP Data Services Agent (HCI-DS Agent) deployed on the on-premise environment of the organization to execute ETL jobs and securely communicate with SAP HANA Cloud Platform
The web application of the HCI-DS solution is the environment for building and managing ETL jobs. ETL jobs are grouped into projects. A project can consist of multiple tasks; a task consists of one or multiple data flows that implement the ETL logic to extract data from a source and load it into a target system. A task can be scheduled to run on a regular basis.
Figure 1 displays the project perspective of the HCI-DS web application. This perspective lists the tasks that are assigned to a project and their status.
Project perspective of the HCI-DS web application
The project perspective of the HCI-DS web application can be accessed after logging on to the HCI-DS web application via https://hcids.hana.ondemand.com/DSoD/session/logon/<Customer Number and then clicking the Projects menu item.
Within the user interface of the HCI-DS web application, the tasks and data flows belonging to a project can be modified. The ETL logic of a data flow can be designed through a drag-and-drop interface of the web application.
To create a new task, the project in the HCI-DS web application needs to be selected first. A new task can be created by clicking the Create Task button. Figure 2 shows the user interface of the HCI-DS web application to create a new task within a project.
Create a new task within a project
To modify an existing data flow, a task within a project needs to be selected first. The details of the data flow can be accessed by clicking the Edit button in the menu. Figure 3 shows the user interface of the HCI-DS web application when a task of a project is selected.
Select an existing data flow of an HCI-DS project to edit the data flow
After you click the Edit button, a window with detailed information of the data flows within a task opens. The data flows within a task are grouped by target table. Figure 4 displays the detailed window of a task where two data flows (DF_TABLE1 and DF_TABLE2) are defined. The two data flows are grouped by the target tables into which they load the data. In the example in Figure 4, data flow DF_TABLE1 loads to table TABLE_1 and data flow DF_TABLE2 loads to table TABLE_2.
Data flows of a task
An existing data flow can be modified by selecting the data flow from the list, clicking the Actions button, and selecting the Edit sub-item. Figure 5 displays the user interface for selecting the Edit option for a data flow. After you select the Edit option, the design canvas of the HCI-DS solution opens.
Editing the data flow of a task
Figure 6 shows the design canvas of the HCI-DS solution that allows the mapping of source data to target data structures and implementing of data mapping logic.
Design canvas of the HCI-DS web application
After you design the ETL logic within the HCI-DS web interface, you need to configure the HCI-DS Agent. The HCI-DS Agent is the technical component that executes ETL jobs and takes care of secure communication with the SAP HANA Cloud Platform environment. In my example scenario, the HCI-DS Agent was deployed on the on-premise environment of the organization. It communicates directly with the on-premise source systems and loads data into the SAP HANA Cloud Platform environment via secure communication channels. The steps to install and configure the HCI-DS Agent are described in “An Introduction to SAP Data Services on the Cloud.” Once the HCI-DS Agent is configured correctly, it can be monitored via the web interface of HCI-DS.
The status of the HCI-DS Agent can be accessed in the HCI-DS web interface under the Agents menu item. Figure 7 displays the Agent that is configured in the HCI-DS web interface. A developer uses the Status information of the Agent to confirm the technical connectivity between the HCI-DS solution and the HCI-DS Agent that is installed on an on-premise system.
Monitoring the HCI-DS Agent via the HCI-DS web interface
After you design the ETL jobs and configure the HCI-DS Agent, you can schedule ETL jobs in the HCI-DS application to run in regular intervals. To schedule a task within a project, you need to select the task first in the HCI-DS web interface. A Schedule button appears after you select the task. Figure 8 displays the step to schedule a task within the HCI-DS interface.
Schedule a task via the HCI-DS web interface
When you click the Schedule button a new window appears that gives a developer the opportunity to configure details on when and how often a task should be executed. Click the Submit button to make the schedule for the task active and to start it running on the specified intervals. Figure 9 displays the interface for specifying the details for scheduling a task.
Specify details to schedule a task via the HCI-DS web interface
Data Management and Calculation Layer
SAP HANA Cloud Platform offers the same flexibility in terms of designing the database components (schemas and tables) and implementing the calculation logic (SAP HANA views) as an on-premise SAP HANA system. As a development environment, SAP HANA studio with the SAP HANA Cloud tools was used in the development phase of the project. Figure 10 illustrates an SAP HANA calculation view created in SAP HANA studio and the SAP HANA cloud tools. For a comprehensive overview on how to design SAP HANA views with SAP HANA studio, read the SAP HANA Modeling Guide 2016 at http://help.sap.com/hana/SAP_HANA_Modeling_Guide_for_SAP_HANA_Studio_en.pdf.
SAP HANA studio data modeling perspective
After you design the SAP HANA views for the application, the views need to be made available for a front-end application via web services. The SAP HANA XS component offers the standard Open Data Protocol (OData) to expose SAP HANA views as web services.
The SAP HANA Web-based Development Workbench can be used to expose an SAP HANA view as an OData service. To access the Development Workbench for your SAP HANA Cloud Platform account, open the following URL in a web browser window: https://<HCP account name>.hana.ondemand.com/sap/hana/ide/. The Development Workbench displays in the web browser window. Figure 11 displays the Development Workbench start page.
SAP HANA Web-based Development Workbench
A developer needs to select the Editor menu item to access the Editor to create new OData services. A developer then creates a new file with the suffix xsodata. In this file, a developer specifies the location of the SAP HANA view in the SAP HANA repository. Once the file is saved and activated, the data of the SAP HANA view can be accessed via the OData interface from an HTML5 application. A detailed tutorial on how to create XSOData services is available at http://help.sap.com/saphelp_hanaplatform/helpdata/en/8d/78eb6f6e8f4307be939a6bc684b9ca/content.htm and the available configuration parameters are discussed in this guide: http://help.sap.com/saphelp_hanaplatform/helpdata/en/1a/8c8a3eaefc4e2aa7ab23195b684b16/content.htm. Figure 12 displays the XSOData service definition for an SAP HANA view in the SAP HANA Web-based Development Workbench.
XSOData definition in the SAP HANA Web-based Development Workbench
You can create new XSOData services in the SAP HANA Web-based Development Workbench by right-clicking a package under the Content folder on the left menu and selecting New > File. Figure 13 displays the steps to create a new file using the SAP HANA Web-based Development Workbench.
Creating a new file in the SAP HANA Web-based Development Workbench
As a front-end component, a custom-built application leveraging the SAPUI5 framework was created using the SAP HANA Web-based Development Workbench. Just like an on-premise SAP HANA system, SAP HANA Cloud Platform comes with SAP HANA XS Engine service capabilities. These services allow the development and deployment of modern HTML5 applications directly on the SAP HANA Cloud Platform. The SAPUI5 framework is already available by default on the SAP HANA Cloud Platform.
Since end users can access the application through any device, it was key to implement a responsive design that is able to cater to different devices (smartphones, tablets, or desktop clients). The SAPUI5 framework is an ideal framework that offers responsive layout components that take care of different screen resolutions of devices and present the application in an optimal way.
The SAPUI5 ResponsiveGridLayout control was used to arrange front-end elements in a responsive way. The SAPUI5 components already deliver features that automatically optimize the layout of an application based on the available size on a screen. These features reduce the development efforts. For more information on a responsive grid layout go to https://sapui5.hana.ondemand.com/test-resources/sap/ui/layout/demokit/ResponsiveGridLayout.html.
As mentioned, SAP HANA views were exposed as OData services to be consumable from the front-end application. A further advantage of the SAPUI5 framework is that its controls are optimized for communication with web services that use OData. This ensures an ideal integration of the front-end application with the logic implemented in SAP HANA views.
For an introduction to the use of OData, read the SAPinsider article “OData Protocol: The Basics and Beyond for Mobility Developers.”
Bringing All Components Together
The technical architecture of the project is based on granular components that operate independently in a distributed environment. The solution architecture consists of three layers built using the SAP HANA Cloud Platform solution offering: SAPUI5 deployed on the SAP HANA Cloud Platform as a Visualization Layer; SAP HANA Models on the SAP HANA Cloud Platform as a Data Management and Calculation Layer; and HCI-DS as a Data Integration Layer.
End users are able to access the application through a web browser on any device. The SAPUI5 framework supports front-end controls that enable a developer to create responsive user interfaces. These controls guarantee that the application’s visual image is ideal regardless of which device is used for accessing the application. The Visualization Layer communicates with the Data Management and Calculation Layer through OData.
The business logic is implemented in SAP HANA views by leveraging the available modeling features of SAP HANA as described in the SAP HANA Modeling Guide referenced above. This ensures an optimal performance since data-intensive logic is processed as close to the database as possible. SAP HANA views are exposed as web services through OData, enabling an application built from services. The SAPUI5 framework is optimized for the communication with web services based on OData. These services ensure an optimal integration of the front-end layer with the back-end views that implement data-intensive business logic. The data of the application is stored in the database on SAP HANA Cloud Platform. Data from an organization’s on-premise system is loaded to the SAP HANA Cloud Platform via the Data Integration Layer of the architecture.
Data needs to be integrated from an organization’s on-premise system and updated regularly in the SAP HANA Cloud Platform system. The HCI-DS component allows you to execute data flows (ETL tasks) securely and efficiently to move data between on-premise systems and the SAP HANA Cloud Platform. These data loading tasks can be scheduled to ensure the latest relevant data is available for end users who access the cloud application. The HCI-DS Agent is the technical component that executes HCI-DS ETL tasks and takes care of the secure communication with the SAP HANA Cloud Platform environment. In the project, the HCI-DS Agent was deployed on the on-premise environment of the organization. The HCI-DS Agent communicates directly with an on-premise database via Java Database Connectivity (JDBC) and an organization’s specific web service via SOAP. The data is loaded via the HCI-DS Agent into the SAP HANA Cloud Platform environment via secure communication channels.
Figure 14 summarizes the described solution architecture.
Solution architecture of the project
For developers who are used to working with on-premise SAP HANA systems, the transition to work with an SAP HANA Cloud Platform system does not require any additional efforts. SAP HANA studio (with the relevant cloud add-on) is the main development tool for designing high-performing SAP HANA views. The front-end development of an SAPUI5 application can be done via SAP HANA studio, the web-based Development Workbench, or the SAP Web Integrated Development Environment (Web IDE).
The HCI-DS solution offers a web application to design and manage data integration tasks. The user interface of the application is easy to work with. ETL jobs can be designed via a drag-and-drop interface. No desktop client needs to be installed. Developers who have experience with the SAP Data Services solution will pick up the required skills for the HCI-DS solution quite easily – the features and their configuration are similar to the one in the SAP Data Services solution (and the client design, too).
A developer needs to become familiar with the HCI-DS tool to start developing ETL jobs with the solution. A list of tutorials that give a good introduction in working with the tool is provided at http://scn.sap.com/community/hana-in-memory/blog/2015/04/08/sap-hana-academy-sap-hana-cloud-integration-for-data-services. Furthermore, the product documentation can be found at https://help.sap.com/hci_ds.
Generally speaking, a cloud-based application is designed on an architecture of services. When applications are built on SAP HANA Cloud Platform, business logic is implemented in SAP HANA views and exposed as web services based on OData. Thus, APIs are the core component of cloud applications. The front-end visualization layer needs to consume the web services in an efficient way. APIs facilitate the reusability of the services by other solutions. The combination of OData services on the SAP HANA Cloud Platform and the use of the OData in the SAPUI5 controls is an example of how easy it is to integrate a front-end solution with back-end web services.
All components that are used for the cloud application deployed on SAP HANA Cloud Platform are based on secure life cycle standards. Secure communication channels are implemented in every layer of the SAP cloud solutions: This goes from an end user accessing the front-end SAPUI5 application, to the communication from the front-end controls with OData web services, to the data extraction from an organization’s on-premise systems, to the SAP HANA Cloud Platform system.
One of the key acceptance criteria for the success of an application is its end-to-end performance. Extra efforts need to be considered for making the performance of the solution as optimal as possible. This effort involves not only optimizing the performance of SAP HANA back-end views but also drawing a special focus to the design and interaction of the visualization layer with the back end. To design an application with an optimal performance, a developer needs to consider how the application communicates with the back-end system. The front-end controls of an SAPUI5 application interact with the back-end through OData calls. What needs to be kept in mind is how many OData requests are necessary to retrieve data from the back end.
The performance for an end user heavily depends on the network latency. Thus, already in the early design phase of the application the interaction between the front-end and back-end components needs to consider the implications of different latencies of end users. A very helpful feature during a performance investigation of the end-to-end solution is the OData Execution Tracking Utility at http://scn.sap.com/community/developer-center/hana/blog/2014/12/02/sap-hana-sps-09-new-developer-features-new-xsodata-features. This option allows developers to identify how much run time is spent where in their architecture (e.g., an SAP HANA view or OData). This information allows the setting of the right focus during a performance investigation. It is a good practice to set the performance goals of the application at the beginning of the project so that the solution is designed accordingly and test cases can be planned.
For more information, go to:
 Gartner, Inc. (2016). Bimodal IT definition.
 Mell P., Grance, T. (2011). The NIST Definition of Cloud Computing. National Institute of Standards and Technology. http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf
 Open Data Center Alliance. (2014). Best Practices: Architecting Cloud-Aware Applications
 Steiner, M. (2014). SAP HANA Cloud Platform - The full package.
 SAP HANA Cloud Integration for Data Services. (2016).
 SAP HANA: Development. (2016).
 SAP Development Tools. (2016).
 OData in SAP HANA XS. (2016).
 SAPUI5 Toolkit. (2016).
 SAPUI5 ResponsiveLayout Component. (2016). https://sapui5.netweaver.ondemand.com/test-resources/sap/ui/layout/demokit/ResponsiveLayout.html
 SAPUI5 & OData. (2016).
 Kessler, K. (2015). SAPinsider, Volume 16, Issue 1. A Guide to SAP's Development Environments for SAP HANA and the Cloud
 Biswajit Biswas, Virendra K. Soni, Sunil Mehta (2015). An Introduction to SAP Data Services on the Cloud.
 SAP HANA Modeling Guide (2016).
 Tutorial: Use the SAP HANA OData Interface (2016). http://help.sap.com/saphelp_hanaplatform/helpdata/en/8d/78eb6f6e8f4307be939a6bc684b9ca/content.htm
 OData Service Definition (2016). http://help.sap.com/saphelp_hanaplatform/helpdata/en/1a/8c8a3eaefc4e2aa7ab23195b684b16/content.htm
 SAPUI5 Responsive Grid Layout (2016).
 SAP HCI-DS Tutorials (2016). Retrieved from: http://scn.sap.com/community/hana-in-memory/blog/2015/04/08/sap-hana-academy-sap-hana-cloud-integration-for-data-services
 SAP HCI-DS Product Documentation (2016).
 OData Execution Tracking Utility (2016).