WP SAP Hybris Commerce Architecture and Technology en
WP SAP Hybris Commerce Architecture and Technology en
WP SAP Hybris Commerce Architecture and Technology en
Table of Contents
Overview 3 3rd Party System Integration 15
Architecture Overview 3 Built-In RESTful Web Services 16
Frontend Layer 4 Spring Integration & Java Message Service 16
Business and Persistence Layer 5
Operations 17
Database & Application Server Environment 6
Minimal & Typical System Infrastructure 17
SAP Hybris Commerce: Best of Both Worlds 7
Persistence Cache 18
Development 8 Typical Oracle RAC / MySQL Setup 19
Easy to Install and Run 8 Session Failover 20
Easy to Develop for 8 Virtualization 20
Easy to Configure 8 SAP Hybris Commerce in the Cloud 20
Java Frameworks, Libraries and Standards 8 Multi-core Performance 21
Monitoring the Running System 21
Customization 9
Performance Monitoring using dynaTrace 21
Flexible Business Objects Using an MDA Approach 9
Adding or Replacing Services in the Service Layer 9 Security 22
Creating new Extensions 9 Role Creation 22
SAP Hybris Commerce Accelerator 10 Securing Your Web Application 22
Events 11 Securing Your Model 22
Internationalization 11 Securing Your Data 22
Multi-catalog Support 11 Audit Trails 23
Multi-language and Multicurrency Support 11 Authentication and Authorization with LDAP 23
Cockpit Customization 12 PCI Security 23
Integration 13 Summary 23
Data Validation 13
Data Integration 14
Data Integration via Data Hub 14
Architecture Overview
The execution environment for the SAP Hybris Platform is a may also choose to overwrite existing functionality. Extensions
Java EE Servlet Container, for example Apache Tomcat2. The are either provided by SAP Hybris as part of the purchase of a
platform and all extensions to it are running within the Spring module or written by yourself, in which case we call this ex-
environment, which allows easy wiring and configuration of tension a custom extension. An extension may simply provide
each component. It provides generic logic such as security, additional business logic without exposing a visible UI or it
caching, clustering and persistence. A SAP Hybris Commerce may also contain a Java Web Application, that for example
module, such as the Customer Support Module, will typically exposes RESTful interfaces or a HTML-based UI that can be
result in one or more extensions being added to the SAP used via a standard web browser.
Hybris Platform. Each extension may add additional services
in the form of Spring beans to the global application context or
D FRO
EN NT
EN
D
T
ON
ON EXT
FR
SI EN
SIO
FR
N
N ON
TE
TE
EX
EXT
EN ND
SIO
N
EXT
EN
SIO
EXTENSION
PLATFORM
EXT
ENSION
Figure 1: Architecture overview of the SAP Hybris Commerce Figure 2: The SAP Hybris Platform is based on the Spring
Framework
1
Spring Framework, http://spring.io/
2
Apache Tomcat, http://tomcat.apache.org/
Figure 3:
SPRING MVC
Each extension to the
SAP Hybris Platform may
EXTENSION include a Java-based web
application
EXTEN
PLATFORM
SIO
N
N
IO
NS EX
XTE TE
E NS
F ION
JS
RA
ILS
SERVICE LAYER
PERSISTENCE LAYER
EXTENSIONS
Figure 4: Two key parts of the SAP Hybris Platform are the Service Layer and Persistence Layer
The usage of Java and the JVM implies that these containers
are able to run on any operating system, such as Microsoft
Windows, Apple Mac OS X Server or various other Unix-based
operating systems.
Oracle
SQL Server
MySQL
SAP HANA DB
Apache Tomcat/
VMware, vFabric, tcServer
Figure 5:
SAP Hybris supports popular data-
bases and servlet containers
4
Oracle Databases, https://www.oracle.com/database/index.html
5
MySQL, http://www.mysql.com/
6
Microsoft SQL Server, https://www.microsoft.com/en-us/cloud-platform/sql-server
COMPETITORS
ACCELERATOR
Figure 8:
Frameworks, libraries and standards
used in the SAP Hybris Commerce.
PLATFORM
7
HSQLDB, http://hsqldb.org/
8
SAP HANA, https://hana.sap.com/abouthana.html
9
SpringSource Tool Suite, http://spring.io/tools/sts
1.
For a partner, to create a new custom extension, SAP Hybris offers Find the service interface and Spring bean definition you
easy to use tools that will generate all boilerplate code required for wish to replace
an extension.
3.
Replace the alias of the service in the Spring configuration
file and point to the new service implementation bean.
Flexible Business Objects Using
an MDA Approach
Creating New Extensions
SAP Hybris uses an MDA (Model Driven Architecture) approach when
it comes to modeling the business objects. The result is a business To create new extensions, hybris includes a command-line tool
model that exactly fits your needs and does not require you to wrap called extgen. It can be used to create completely empty exten-
any relevant data in meaningless container structures. According to sions or to create template extensions that already offer certain
the defined business model, SAP Hybris Platform will automatically functionality. These templates currently include:
generate the business objects and any back-end application like the
yempty a default template for any type of extension
Backoffice Administration Cockpit will adjust to it.
The business objects can be specified either via UML or XML and ybackoffice a template for a backoffice extension
will then be automatically generated during the build process. All
ycockpit a basic template for a cockpit extension
required ORM setup for managing these objects is generated too, as
well as the database schema needed to store it. Business objects are yaddon a basic template for an AddOn extension
simple POJOs which automatically benefit from the SAP Hybris Plat- ycommercewebservices a basic template for an extension
form core services such as caching, clustering, personalization, and that uses the Omni Commerce Connect web services
internationalization support, and are accessible via the SAP Hybris
back-end applications like Backoffice Administration or Customer SAP Hybris Commerce Accelerator templates a set of
Support Cockpit. reference extensions for Accelerator applications (see the
next section for more details)
The following code snippet is an excerpt of an items.xml file. It shows
the XML-based format in which business objects are defined.
hybris
bin
ext-accelerator
ext-addon
ext-backoffice
ext-channel
cscockpit
instore
mobileoptionals
mobileservices
ext-cockpit
ext-commerce
PLATFORM ext-content
ext-data
ext-platform
SERVICE LAYER
PERSISTENCE LAYER
EXTENSIONS
Figure 12:
Main areas of the Product Cockpit
IDATION
VAL
csv
bulk data
PLATFORM
n
atio
ntegr
raw
Spring I
bulk data
SOAP/REST
xml
3rd party
systems:
CRM
3rd party
systems:
ERM
VALIDATION
constraint violations
indicated by visual
color cues in the
Product Cockpit
Figure 14:
Data Validation in the Backoffice
Administration Cockpit
csv
Figure 15:
IMPEX Importing and exporting of data using ImpEx engine
SERVICE LAYER
PERSISTENCE LAYER
DATABASE
DATA
SOURCES
DATA HUB
ADAPTER
DATA
HUB
Figure 16:
The Data Hub imports and exports data between SAP Hybris
Commerce and external data storage systems.
{ "uri" : "http://localhost:9001/ws410/rest/users",
"user" : [ {
"type" : "employeeDTO",
"uid" : "admin",
"pk" : "8796093054980",
"uri" : "http://localhost:9001/ws410/rest/employees/admin",
"loginDisabled" : false },
{ "type" : "customerDTO",
"uid" : "anonymous",
"pk" : "8796093087748",
"uri" : "http://localhost:9001/ws410/rest/customers/an-
onymous",
"loginDisabled" : false } ] }
Service
Activator
Message Handler
FIREWALL
WEB SERVER
Serves static files,
directs dynamic requests
to app server
e.g. Apache HTTPD
APPLICATION SERVER
Serves all dynamic requests
e.g. Tomcat
The database setup for scalability depends on the DBMS chosen. QUERIES/
For Oracle RAC setups, the Oracle JDBC driver will transparently Cache Region ENTITIES TYPES RESULTS
distribute the JDBC calls to the cluster nodes and no special SAP
Hybris Platform setup is required. In case of MySQL, a master/slave Eviction Strategy LRU FIFO LRU
approach is used and the master and slave databases need to be Size 100 000 50 000 20 000
configured in the SAP Hybris Platform.
Figure 21: SAP Hybris cache regions can be flexibly configured
s
es
cc
tA
rne
Inte
FIREWALL
LOAD BALANCER
uses sticky sessions
WEB SERVERS
APPLICATION SERVERS
hybris cluster setup
DATABASE SERVERS
Oracle RAC Cluster
Figure 20:
Scaled system infrastructure
Figure 22:
Oracle RAC setup
UNDERLYING STORAGE
Figure 23:
MySQL Master/
Slave setup
READ/WRITE
Transactions
User Account change
etc.
READ
Display product
Detail page
Search
MASTER
etc.
propagates changes to slaves
SLAVE
SLAVE
SLAVE
Figure 24:
Virtualization overheads
Physical
VMware
Microsoft HyperV
10
Oracle Coherence, http://www.poweredbypulse.com/
Multi-core Performance
Critical areas of SAP Hybris software are carefully designed
to enable full use of multi core systems. For example catalog
synchronization or data import via the ImpEx engine will
automatically be run multithreaded. Multithreading is completely
transparent to the developer or system integrator. We have
optimized and tested our software to take best advantage of Figure 26:
Java Monitoring and Management Console
modern multi-core CPUs.
number of cores
Figure 25:
Multi-core performance
Figure 27:
dynaTrace performance monitoring
11
dynaTrace for Java, https://www.dynatrace.com/technologies/java-monitoring/
13
http://www.pcicomplianceguide.org/