Transaction code SICF in ABAP Netweaver is a tool Jerry likes to use very much when doing prototype development: Whenever there is a scene that needs to expose resources in ABAP system in the way of service, Jerry likes to create a service node in SICF and write the business logic in it.

Using SICF Service to expose resources in ABAP Netweaver requires much less work than choosing OData or Web Service, which is more suitable for Jerry’s prototype development with short development cycle and quick results. For example, Jerry did a prototype development of C/4HANA and S/4HANA: an intelligent service innovation case. SICF was used to realize the resource exposure in S/4HANA.

As Netweaver is a Web server, SAP positioned these service classes implemented in SICF as extensions of Web servers, just like servlets in Java Web servers. Jerry has also written a blog before comparing the two:

ABAP ICF handler and Java Servlet

Jerry felt that one of the more comfortable aspects of development with SICF/Java servlets was that application developers didn’t have to worry about life cycle management issues like when instances of these service classes were created and destroyed, so they could focus on writing business logic code in predefined interfaces.

As enterprise development applications move into the era of cloud native development, the term Serverless architecture is frequently used in the technology press.

The literal meaning of Serverless may be misunderstood as “no longer needed”. For an accurate definition, I suggest you read an article by a senior whom Jerry respects very much, the public account “Maanong Fen” : I recommend that you learn a little bit about Serverless. This article explains what Serverless means and how it evolved from the earliest LAN era to the Serverless architecture in very straightforward language.

From the perspective of the whole enterprise, ABAP Netweaver’s SICF development model has almost no connection with Serverless architecture. The difference between the two is that one needs to write the function code on the server deployed locally in the enterprise, and the other is to write the code directly on the platform provided by the cloud service provider. However, from an individual programmer’s perspective, there are some similarities: neither programmer has to worry about how the code he writes is stored on the server side, nor when those functions are called.

Of course, the technology is always moving forward. Functions running on the Serverless architecture platform of modern cloud service providers, compared to SICF services running on ABAP Netweaver servers, are like a rich second generation born with a silver spoon in their hand, with some basic characteristics of cloud native applications such as high availability. Elastic scaling, on-demand loading, dynamic billing and more.

SAP has continued to invest heavily in cloud native development in recent years, with Serverless architecture-based solutions such as Lambda Function on SAP Kyma mentioned in the title of this article.

In Jerry’s previous article on the integration of WordPress, SAP Kyma and wechat, he introduced how to write Lambda Function on SAP Kyma to respond to events sent by WordPress to Kyma. And call wechat API in Lambda Function to push messages to the specified wechat users. In the previous article, Jerry focused on the interaction among WordPress, SAP Kyma and wechat, as indicated in the title of that article. In this article, let’s focus on Lambda Function in SAP Kyma.

The implementation of SAP Kyma Serverless is based on Kubeless, a Serverless framework supported by Kubernetes, which implements automatic scaling, API routing, monitoring and troubleshooting of resources running on Kubernetes.

With the command line interface provided by Kubeless, we can create and deploy Lambda functions with Serverless features on Kyma.

Kubeless command line interface provides CRUD operations:

You can also do this in the browser console provided by Kyma.

As shown in the figure below, I create a Hello World level Lambda Function that performs the logic of simply adding a suffix to the end of the passed string. The Function is implemented based on Nodejs8.

In Jerry’s previous article, the Lambda Function created in the integration of WordPress, SAP Kyma and wechat selects event-based triggering. Here, let’s try HTTPS triggering.

The https-endpoint is the URL from which we will call the Lambda Function.

The Lambda Function certification was done by DEX, an open source certification framework based on openID.

In the function test console provided by Kyma, send a request and get the suffixed string, which is easy to understand.

When we create a Lambda Function, what happens behind the scenes? Although the name is Serverless, these functions physically always run in some kind of container on the server, which is Kubernetes pod. Jerry emphasized earlier that SAP Kubernetes is based on Kubernetes, so Kubernetes supports commands, SAP Kyma is also fully supported.

Command line to view the function you just created:

kubeless function list -n ctu-demo

Use the command line to view the details of this function:

kubectl describe function zjerry-lambda -n ctu-demo

Deployment and ReplicationSet:

Realization of horizontal automatic expansion:

Lambda Function is a concept created by SAP Kyma as a Custom Resource based on Kubernetes’ Custom Resource Definitions(CRD) mechanism. The function properties shown above are native properties supported by Kubernetes resources.

In the console of Kyma, you can find the corresponding resources automatically generated by Kyma background after Lambda Function is created:

Pod, the runtime environment for the Lambda Function code:

Similarly, using kubectl describe pod command, you can view the details of the pod and find the docker ID and docker image ID contained in it.

As mentioned above, the Lambda Function of SAP Kyma adopts DEX for authentication. If you want to use it explicitly in a programming language, you need to provide the corresponding token.

Get the token in Kyma’s console,

Passes to the Postman Authorization header field and gets the expected response.

I hope this article can help those who are not familiar with Serverless to have a basic perceptual understanding of Lambda Function based on Serverless architecture in SAP Kyma. Thank you for reading.

Read more

  • Newton on the Shoulders of Giants: Kubernetes and SAP Kyma
  • Kill mosquitoes with anti-aircraft guns, kill chickens with great swords: Run UI5 app on SAP Kyma
  • What? In SAP China research institute also need to know PHP development?
  • How do third-party applications register their services on SAP Kyma
  • Enhanced introduction to order orchestration based on SAP Kyma
  • Integration of WordPress, SAP, Kyma and wechat

For more of Jerry’s original articles, please follow the public account “Wang Zixi “: