Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exploring Internals and Discovering Hidden Feat...

Vadim Klimov
November 23, 2019
10

Exploring Internals and Discovering Hidden Features of Cloud Services: SAP Cloud Platform Integration Showcase

Event: SAP Inside Track Vienna 2019
Date: November 23, 2019
Speaker: Vadim Klimov
Session: Exploring internals and discovering hidden features of cloud services: SAP Cloud Platform Integration showcase

Vadim Klimov

November 23, 2019
Tweet

More Decks by Vadim Klimov

Transcript

  1. Exploring Internals and Discovering Hidden Features of Cloud Services SAP

    Cloud Platform Integration Showcase Vadim Klimov SAP Inside Track Vienna November 2019
  2. Motivation and notes of caution How does in-depth exploration of

    service components comply with terms of use agreement of the service? SAP CPI is provisioned as iPaaS – why shall a developer / architect be bothered about the internal mechanics of the cloud service? Can such activities introduce side effects, negative impact on service stability, performance or security?
  3. CPI Integration Flow: Developer’s view 1. Develop / IMPORT 2.

    CONFIGURE & DEPLOY 3. EXECUTE & MONITOR
  4. SAP CPI tenant CPI tenant: High-level architecture Storage (Persistence) Tenant

    Management Node (TMN) Web UI Runtime (Worker) Node(s) (IFLMAP) Participant (System) A Participant (System) B Internal APIs • Operations API Command Framework • Web UI API (itspaces) E.g. Catalog API, Workspace API • Alert Retrieval API Public OData APIs (SAP API Business Hub) • Integration Content API • Log Files API • Message Processing Logs API • Message Store API • Partner Directory API • Security Content API
  5. CPI runtime node: Underlying layers System Environment Java Virtual Machine

    OSGi Framework OSGi Container (Application Runtime) Integration Framework Additional SAP CPI Specific Components SAP JVM Java runtime and accompanying tooling and services Apache Karaf OSGi application runtime / container. Designed to use Apache Felix or Eclipse Equinox as OSGi framework Linux SUSE Operating system environment, including corresponding required services and resources (CPU, memory, filesystems, network, etc.) Apache Felix OSGi framework and service platform Apache Camel Integration framework based on enterprise integration patterns. Among other deployment options, designed to work inside OSGi container CPI specific components SAP CPI specific tooling and components. Deployed to runtime node as OSGi bundles
  6. CPI runtime node: Techniques to access underlying layers Linux SUSE

    SAP JVM Apache Felix Apache Karaf Apache Camel Additional SAP CPI Specific Components JVM layer (runtime & services) • Java runtime properties System, Runtime.runtime • Groovy runtime properties GroovySystem • JVM startup arguments RuntimeMXBean.inputArguments • Platform MXBeans Operating System, Runtime, Thread, Memory, Garbage Collector, Class Loading, etc. • MBeans Felix and Karaf shell commands, etc. • Class loaders • Attach API OSGi layer • OSGi bundle context FrameworkUtil.getBundle({…}).bundleC ontext Information about bundles (versions, resources, etc.), operations on bundles • Service references • OSGi shell commands execution • Events – Event Admin Service System environment layer • Environment properties System.getenv() • Access to some directories (such as home – /usr/sap/ljs/home) and files File(‘{…}’).bytes, File(‘{…}’).text • Access to Linux pseudo-filesystem / proc Information about filesystems and mount points, networking layer, processes (/proc/{pid}), statistics about CPU and memory usage, etc. • Directories monitoring in real time (WatchService for FileSystems / Paths) Integration framework layer • Camel context Message.exchange.context Includes properties (such as Camel version) and context objects (such as endpoints, components, routes)
  7. CPI Integration Flow: From iFlow to OSGi bundle Apache Felix

    Apache Karaf Apache Camel SAP CPI Web UI Integration flow consists of one or multiple integration processes. Each integration process exposes an endpoint. Integration process is deployed to runtime as a Camel route. Camel route is added to a Camel context. Each integration flow is started within a separate context. Endpoint creates exchanges, where messages are processed (routed). Each integration flow is assembled and deployed as a separate OSGi Blueprint bundle. Some OSGi bundles together with other required resources are combined into features to ease application provisioning and management. For example, Camel Core feature comprises 30+ OSGi bundles.
  8. Examples of tools RealCore's SAP CPI Dashboard by Raffael Herrmann

    https://github.com/codebude/cpi-dashboard CPI Filesystem Explorer by Ariel Bravo Ayala https://github.com/ambravo/CPI-FileSystemExplorer CPITracker by Morten Wittrock https://twitter.com/cpitracker
  9. Tips and tricks 1 3 2 4 5 6 7

    Explore exposed HTTP APIs of CPI nodes – both tenant management and runtime. PUBLIC API C h e c k A P I s c o n s u m e d b y standard tools – for example, by Web UI tools. INTERNAL API CPI is based on A p a c h e C a m e l f r a m e w o r k – e x p l o r e C a m e l c o n t e x t a n d components. CAMEL FRAMEWORK Examine runtime environment, its startup arguments and properties. RUNTIME ENVIRONMENT CPI runs in OSGi container – explore OSGi Framework s p e c i f i c a t i o n , bundles context and components. OSGI FRAMEWORK AND CONTAINER Pay attention to threads’ call stack a n d c a l l e d components. THREAD DETAILS P r o g r a m m a t i c a l l y accessible monitoring and administration capabilities of JVM – JMX, JNI, JVM TI and Attach API, to name a few. JVM TOOLS
  10. Tips and tricks (cont.) READ DOCUMENTATION Familiarize yourself with corresponding

    frameworks’ documentation. Refer to frameworks’ source code where possible and when in- depth insights are required. SHARE AND CONTRIBUTE Get involved in community discussions and contribute. Let other experts provide early feedback to your thoughts and developments. EXPLORE Don’t give up on examining fe at u re s b e h av i o r a n d putting your ideas and theories under test. There is no negative experience – instead, there are lessons learned. ACT RESPONSIBLY B e m i n d f u l o f t h e consequences – security aspects, runtime node stability, maintenance and s u p p o r t a b i l i t y o f t h e developed solution shall not b e u n d e re s t i m at e d o r compromised under no circumstances.
  11. ➢ Thank you Dr. Vadim Klimov SAP Integration Architect SAP

    Community https://people.sap.com/Vadim.Klimov LinkedIn https://www.linkedin.com/in/Vadim-Klimov