SAP HANA is the central, powerful data platform for SAP environments, with the ability to process nearly any type or amount of data in real time. There are now many well-established ways to develop applications and business content on SAP HANA to take advantage of its robust features. The ABAP 7.5 stack, for example, is fully optimized for SAP HANA and supports direct OData consumption to enable the rapid implementation of SAP Fiori applications.1 With SAP Business Warehouse powered by SAP HANA, you can build innovative analytics applications and dashboard-like user experiences using SAP HANA views and related artifacts from SAP Cloud for Analytics.
This article provides an overview of XS Advanced and how it builds on the open source principles of Cloud Foundry and the flexibility of a microservices-based architecture — while remaining tightly integrated with SAP HANA — to enable flexible, portable, high-performing applications.
XS Classic: The Initial Step Toward Native SAP HANA Development
The idea of providing a development and runtime environment for native SAP HANA applications is not completely new — SAP HANA extended application services, classic model (known as “XS Classic”) was originally delivered with SPS 05 for SAP HANA. XS Classic offers a lightweight application server, known as the XS Engine, that runs on top of the SAP HANA database. It includes web-based HTTP and OData services for quickly prototyping small, web-based analytical applications that consume SAP HANA database artifacts, such as SAP HANA calculation views, and built-in support for the easy-to-use SAP Fiori user interface.
In addition to the web-based services, XS Classic offers transactional services based on core data services (CDS). CDS is an infrastructure layer for defining semantically rich entity relationship data models that has two variants: one designed for SAP HANA native development and another for ABAP-based development. While ABAP-based CDS implementations build on already-defined tables in the data dictionary (DDIC) of SAP NetWeaver AS ABAP by exposing CDS views in the DDIC,2 SAP HANA-based CDS implementations operate entirely within SAP HANA and go down to the physical table level in the SAP HANA database.
Figure 1 shows the basic components of the XS Classic environment. While initially XS Classic development was carried out using the desktop-based SAP HANA studio, SPS 06 for SAP HANA introduced a web-based option called the SAP HANA web-based development workbench, which offers an easy-to-use, browser-based development environment that supports all major SAP HANA database artifacts and includes catalog tools for viewing and querying artifacts along with user and authorization management functionality.3 All of the metadata and source code of XS Classic applications are stored in the SAP HANA repository.
With XS Classic, you have an application server, web server, and development tools embedded entirely within SAP HANA — a self-contained, high-performance development and runtime environment. So why the need for a new model?
Why a New Model?
While the XS Classic approach offers a number of benefits — including a simplified application architecture and tight integration with SAP HANA for optimal performance — some disadvantages became clear over time.
User management is an additional area of limitation with XS Classic, which requires that each user be assigned an SAP HANA database user role that is granted the appropriate privileges to access artifacts in the SAP HANA database. For security reasons, this type of access is often not permitted in customer landscapes, where instead users are generally managed in directories such as LDAP directories and have access to a well-defined set of application resources, which then access the database resources via technical database users based on end-user requests.
There are limitations from a deployment and scalability perspective as well. XS Classic is tightly bound to the SAP HANA platform, and while this is beneficial for small-scale projects where you want to quickly develop, deploy, and run your applications, it can become problematic when you want to scale your resources to meet growing development and production demands, and when your development environment does not require a high-scale SAP HANA execution box.
These limitations of XS Classic led to a plan for a revised architecture that would further decouple XS from the underlying SAP HANA platform — with the potential for XS to run on separate, less-expensive commodity hardware — and offer flexible scalability options, while also ensuring that applications can be designed independent of deployment model.
XS Advanced: A New Architecture for Modern Development Needs
To address the limitations of XS Classic, SPS 11 for SAP HANA delivers XS Advanced, which consists of a revised architecture that enables flexible scalability options with a wide range of supported runtimes and services. XS Advanced offers SAP customers a free choice of technology, tool, and deployment4 options for high-scale development and operation of native SAP HANA applications that adhere to the principles of the open source computing platform Cloud Foundry, which emphasizes portability, and the microservices approach, in which applications are composed of small, decoupled services to enhance flexibility and scalability (see the sidebar “Microservices: A Flexible Scalable Architectural Approach”).
Figure 2 shows the blueprint of the XS Advanced architecture. Let’s take a closer look at its key components.
A New Runtime Container and Controller
XS Advanced introduces a new runtime container that, following Cloud Foundry principles, supports multiple languages and runtimes. Three runtimes are currently supported, with the ability to support more in the future as needed:
- Node.js as an asynchronous programming model, to enable the possibility of interfacing with a large collection of open source assets called
- node modules
- Java, due to its popularity and the large number of Java frameworks available for reuse
Combinations of runtimes are supported as well — such as an XSJS application that uses Node.js libraries.
To support multiple runtimes, Cloud Foundry introduces the notion of a build pack, which is a set of compilers and other utilities for building a particular application. In keeping with this principle, XS Advanced provides standard build packs out of the box for each runtime that it supports, with the ability to add more build packs in the future that SAP provides to support additional runtimes, such as Python and Ruby, for example.
The XS Advanced runtime is also decoupled from the underlying SAP HANA database, enabling the runtime to scale independently from the other layers. If the runtime requires more processing power to cover a given workload, new nodes or servers can be easily added during operation and removed when the peak is over.
The XS Advanced runtime is monitored by the XS Advanced controller, a service included with XS Advanced that serves as its central management component. The controller provides a REST-based API that is accessed via a command line interface whose syntax is closely aligned with the command line interface of Cloud Foundry. Other administration environments, such as SAP Solution Manager, can also examine the monitoring status of applications deployed or running in the XS Advanced runtime through the controller’s API.
Once the XS Advanced controller is started via the command line (using the command “xs api”) and the controller’s API endpoint is set by specifying the proper URL, you can easily examine the applications that are deployed or running in the XS Advanced runtime using the command “xs apps” (see Figure 3). From the output list, you can determine the URL of a deployed application and launch that application in your favorite browser (for example, the application monitor tool included with XS Advanced that provides process information for each running application). Note that the example shows port-based routing, which is often used in development. For productive use, URL-based routing is recommended.
Deploying an application to the XS Advanced runtime is also easy. Using the XS Advanced controller, you provide the source code of your application in a folder on the operating system level, along with a YAML file (file extension .yml) that acts as a descriptor of the application’s artifacts and all the services it uses (such as SAPUI5/OData services and SAP HANA database services). The deployer will take your application, assign the corresponding build pack, build the application, and deploy it ready for execution.
XS Advanced includes additional tools for managing the runtime, including a job scheduling service for managing long-running operations or jobs and a static web content handling service for arbitrary documents. It also includes infrastructure components that facilitate user access and authentication (UAA) based on SAML protocols, and an application router component that routes a request to the appropriate runtime environment and provides a unique point of access for managing multiple origin requests — for example, if an application or service is implemented using different runtimes, producing partial results to be combined.
A New Deployment Infrastructure and Repository Approach
So where are the artifacts and source code for applications stored with XS Advanced? With XS Classic, it is all stored in the SAP HANA repository, which results in a lack of isolation between applications when they access the repository. With XS Advanced, this approach has completely changed.
First, since XS Advanced is decoupled from the underlying SAP HANA database, application source code is no longer stored in the SAP HANA repository — instead, it is kept in an external Git repository that offers source code control, versioning, branching, and collaboration features, as well as standard security features, such as HTTPS and user authentication.
Second, for managing SAP HANA database artifacts, SPS 11 introduces a new SAP HANA deployment infrastructure. With the new deployment infrastructure, each application’s SAP HANA database artifacts — such as tables, views, and CDS definitions — are deployed into a corresponding deployment infrastructure container, which is essentially a database schema. Each container has its own schema name (one each for designtime and runtime so that developers and end users can be assigned separately), and each container is clearly separated and isolated from the applications that use them. This separation enables consistent handling as new applications are deployed or existing applications are changed. For complex application scenarios, applications can be granted explicit access to other applications’ containers via synonyms. The deployment infrastructure manages the security access level for all the artifacts in these containers.
The separation provided by the deployment infrastructure is complemented by the Cloud Foundry concept of spaces. Each developer or small development team can be assigned their own spaces, resulting in a complete isolation of their development activities. Multiple versions of an application can coexist at the same time without interfering with each other. The combination of the deployment infrastructure and the spaces concept supports ambitious, large-scale development projects.
A New Development Environment
In addition to supporting external development tools such as Eclipse, SAP is currently developing a web-based tool environment called SAP Web IDE for SAP HANA, planned for release with the SAP HANA data center service point (DSP) maintenance revision for SPS 11. SAP Web IDE for SAP HANA is based on SAP Web IDE, which is an extensible, browser-based development environment available with SAP HANA Cloud Platform that is primarily used for the rapid development of SAPUI5-based SAP Fiori applications.
SAP Web IDE for SAP HANA offers the same look and feel and ease of use as SAP Web IDE, with sophisticated templates and wizards for quickly creating prototypes, especially SAP Fiori applications. As with SAP Web IDE, the SAP Web IDE for SAP HANA designtime environment is completely server-based, relieving you from the local management and synchronization of files, and it behaves technically just like an ordinary application.
While the XS Advanced architecture is designed to enable you to use any external repository or preferred tooling environment and attach it to the XS Advanced runtime environment, in the SAP context, it would be helpful for tools specific to SAP Fiori programming (such as the SAP Fiori template wizard) to continue to be available, as well as tools formerly available in the SAP HANA studio for modeling SAP HANA content (such as CDS and calculation views) and in the SAP HANA web-based development workbench. Positioned as the predefined development platform for XS Advanced, SAP Web IDE for SAP HANA is intended to encompass all of these familiar functionalities.
SAP Web IDE for SAP HANA uses the project outline familiar from SAPUI5 programming with the SAP HANA web-based development workbench. It has folders on the left side; multi-tabbed editors in the middle, such as the text editor and debugger shown in Figure 4; and side panel areas to access repositories such as Git or to access API documentation and collaboration tools. To help accelerate development tasks, it also includes project wizards and templates and graphical modeling tools that developers will be familiar with from the SAP HANA web-based development workbench and the SAP HANA studio.
SAP Web IDE for SAP HANA is built on server-side extensions based on Eclipse Che, but hides these complexities to offer developers a unified view into XS Advanced development projects. With SAP Web IDE for SAP HANA, the basic project structure is centered around the notion of a multi-target application (MTA), which acts as a container for all the artifacts that are required to run an application. For instance, think of a Node.js application with an SAPUI5 front end that tries to access SAP HANA content defined in CDS descriptions — to manage this set of heterogeneous development objects, the MTA keeps these different modules together to manage them as a unit (which is important when you later move your application to quality assurance and production).
Delivered with SPS 11 for SAP HANA, XS Advanced overcomes the limits of its predecessor, XS Classic, to offer a new development and runtime platform
for native SAP HANA applications. Based on the open source principles of Cloud Foundry and the flexibility and scalability of the microservices approach, XS Advanced supports a wide range of development tools and runtimes, including XSJS, Node.js, and Java, offering SAP customers the freedom of choice to best meet their unique needs.
XS Advanced applications are developed independently of the deployment model, and are therefore built ready for cloud deployments. A new web-based development tool called SAP Web IDE for SAP HANA, currently under development, provides familiar tools and project wizards for rapid prototyping while also enabling the use of external tools and repositories.
With its open source, flexible architecture, XS Advanced provides the foundation for a native SAP HANA development approach that can span any deployment. You can learn more about XS Advanced in the SAP TechEd session “What’s New in SAP HANA Extended Application Services” (available at http://bit.ly/1oKRBSb) and in the developer guide for XS Advanced (available at http://bit.ly/1KOw0Sp).
1 For more on ABAP 7.5, see my article “ABAP for the Modern Age” in the January-March 2016 issue of SAPinsider (SAPinsiderOnline.com). [back]
2 For more on the ABAP implementation of CDS, see my article “Enhanced ABAP Development with Core Data Services (CDS)” in the October-December 2015 issue of SAPinsider (SAPinsiderOnline.com). [back]
3 For more on this and SAP’s other development tools for SAP HANA, see my article “A Guide to SAP’s Development Environments for SAP HANA and the Cloud” in the January-March 2015 issue of SAPinsider (SAPinsiderOnline.com). [back]
4 Note that as of SPS 11, only on-premise deployment is supported. [back]