SAP officially announced the release of the SAP Cloud Platform Extension Factory on Thursday. The announcement was made during the keynote address at the 2018 SAP Customer Experience Live Conference in Barcelona, Spain.
Expected to be available in Q1 of 2019, SAP Extension Factory is a framework for extending SAP applications in a cloud native environment and is integrated into the SAP Cloud Platform architecture. Based on the open source Kyma project, the Extension Factory is a cloud native standards-based integration framework that solves many of the potential complexities with the current Hybris extension model. The Extension will initially be part of the SAP Commerce Cloud (Hybris) but will eventually be available throughout the SAP cloud application suite.
The Challenge of In-App Extensions
Hybris extensions today are in-app extensions, which are part of the actual server build and operate within the confines of the Hybris server. Updating or installing an extension requires rebuilding and restarting the server; updating the core Hybris server requires testing each extension and potentially porting changes from the old version to the new.
As traditional server-based applications like Hybris are ported to cloud native applications, the cost and work of using an in-app extensions grows. As the core application is split into component services hosted in virtual environments within the cloud, each of these component services must implement “their” part of the in-app extension model.
In-app extension models also place constraints on the development of extensions. In-app extensions are generally delivered as code modules that are part of the server build. This limits developers to specific languages and library components, making it difficult for them to create extensions that adequately meet the needs of the business using the most efficient tech solution. Hybris Extensions run within a sandboxed environment that limits their interaction with core components, but even within a sandbox, in-app extensions still introduce security and performance risks.
A New Model: The SAP Extension Factory
The Extension Factory introduces a new extension model that solves these challenges. Extension Factory extensions are not deployed in-app, but deployed as “side-by-side” extensions in a cloud cluster separate from the core Hybris application. The Extension Factory provides all the core infrastructure and platform services that developers need to extend Hybris, allowing developers to concentrate on the business logic.
A key benefit of moving extensions out of the core application is that it enables these extensions to be used by other applications in the enterprise. For example, an address verification extension could be used by both commerce, sales, and service applications. Each of these applications would need to be able to locate and execute these extensions.
How it Works: Where Extensions Live and Run
The Extension Factory execution environment is built upon Kubernetes, an open source container management system originally built by Google. A container is a very lightweight virtual server environment. A single physical server can host multiple containers, and each of the containers share the resources of the underlying operating system. This allows services that run within a container to load very quickly.
A Service Catalog is central to the Extension Factory, allowing applications to discover available extensions. The Service Catalog describes how applications can access each of the services, providing the public address along with any metadata needed to invoke the service.
Applications don’t automatically call on extensions hosted by the Extension Factory, instead invoking a proxy service that is part of the Extension Factory runtime. The proxy will receive the request from the application, lookup the implementation for the extension, invoke the extension, and return the results back to the application.
The proxy architecture of the Extension Factory makes it much easier for applications to invoke extensions. Applications don’t need to know how to locate, load, and invoke the extensions, and system administrators don’t have to manage the network environment to ensure that applications have access to all the servers executing extensions. The Extension Factory can automate these processes and act as an independent manager of these otherwise tedious executions.
The Extension Factory can manage the run-time environment by using this proxy. It can perform just-in-time loading of a service, auto-scale services providing additional capacity as needed, and allows DevOps to manage extension deployments directly from Extension Factory console instead of each individual extension implementation.
The SAP Extension Factory: Practical Applications
The separation of service definition from service implementation makes it very easy for developers to create new extensions. For example, Hybris could ship with a simple out-of-the-box Estimated Ship Date extension that runs within the Extension Framework. Hybris would invoke the Ship Date service via the Extension Factory proxy. The Extension Factory would locate this out-of-the-box extension and execute it.
Within this new framework, a developer could create an enhanced version of the Ship Date service by enhancing the out of the box implementation. Once the new extension is built and deployed, the Service Catalog would be updated to use the new version of the Ship Date Service. The logical approach is similar to what is done with Hybris extensions today, but with the SAP Extension Factory it can be accomplished without rebuilding and deploying Hybris. This new paradigm significantly reduces the cost and risk of deploying changes to extensions on the core Commerce platform.
Alternatively, a developer could create a new service from scratch that takes the same input and output as the existing service. After handing things off to the operations team, the service would be installed within the Extension Framework and the configuration would be programmed to use the new service when Hybris makes a request of the Estimated Ship Date service. Without any changes to Hybris, the storefront will display estimated ship dates from the new service. In the event of an issue with the new service, businesses could revert to using the out of the box solution without making changes to Hybris or suffering any downtime.
The Extension Factory Infrastructure
The most significant functionality coming from the Extension Factory is its event infrastructure. The Extension Factory provides a mechanism for applications to fire events to be processed asynchronously by extensions. The Extension Factory allows applications to list events that they will fire. Extensions (and other applications) can subscribe to these events. When Hybris fires an event, the Extension Factory will forward the event to each service that subscribed to the event.
For example, an extension could be created to send an order confirmation email from the marketing cloud when a customer places an order. This extension would subscribe to the OrderPlaced event from Hybris. When an order is placed in the commerce cloud, Hybris would fire the OrderPlaced event to the Extension Factory which would then invoke each subscribing service that to that event. Without the Extension Factory, sending an automated order confirmation email would require either extension code added to Hybris or a polling process to look for new orders and fire off an email.
One of the drawbacks of a typical extension service is that Hybris must be aware of the service to invoke it. With events, extensions can be created that Hybris is unaware of. For example, an extension could be created to send out a push notification to an app installed on the customer’s phone when an order is placed. This can be done without any code added to Hybris.
Leveraging the Extension Factory Across Your Enterprise
The Extension Factory is built upon existing open source components that can be used in any cloud platform (SAP, Azure, AWS, and GCP) and can be accessed by any application that can be extended to make external API calls. For example, an extension that fires off an order confirmation email from the Salesforce Marketing Cloud can be triggered by a Hybris Order Placed event. Later on, this event can be wired to an extension that will send an email from the SAP Marketing Cloud without any changes required to Hybris.
The SAP Cloud Platform Extension Factory is game changer for digital agencies and users of Hybris-powered solutions. The Extension Factory clears the way for developers to engineer unique business solutions to meet market needs without the resource-related limitations of traditional in-app extensions. SAP’s new development will save precious time, increase efficiency, and ensure a more sound commerce infrastructure for our clients –– both current, and future.