31
© Unic - Seite 1 About the speaker: 31 years old Degree in Computer Science (BA) in 2008 Professional Java Developer ever since Experience with CQ since 2012 Published Open Source Software Introduction

Integrating Backend Systems

  • Upload
    cqcon

  • View
    980

  • Download
    1

Embed Size (px)

DESCRIPTION

Presentation “Integrating Backend Systems“ by Matthias Rothe at CQCON2013 in Basel on 19 and 20 June 2013.

Citation preview

Page 1: Integrating Backend Systems

© Unic - Seite 1

• About the speaker:

• 31 years old

• Degree in Computer Science (BA) in 2008

• Professional Java Developer ever since

• Experience with CQ since 2012

• Published Open Source Software

Introduction

Page 2: Integrating Backend Systems

© Unic - Seite 2

• Extensible Component Scanner

• Allows scanning for components with a fluent API

• select(javaClasses()).from(„my.package“).returning(allExtending(A.class))

• Available from Maven and Sourceforge at http://sf.net/projects/extcos

• TestNG Data Binding

• Allows the binding of test data from external data sources to TestNG test method

parameters

• Available from Maven and Sourceforge at http://sf.net/projects/testngdatabind

• Join the community on http://facebook.com/TestNGDataBinding

Published Open Source Software

Page 3: Integrating Backend Systems

CQCon 2013: Integrating Backend Systems into CQ Matthias Rothe

19.06.2013

Page 4: Integrating Backend Systems

© Unic - Seite 4

Integrating Backend Systems into CQ

• CQ in an Enterprise Environment

• System Integration Layer

• Connecting to the ESB

• Modes of Content Retrieval

• Conclusion

Page 5: Integrating Backend Systems

CQ in an Enterprise Environment

Page 6: Integrating Backend Systems

© Unic - Seite 6

CQ can be used standalone as a WCMS

But:

• Usually a company has more systems then just the WCMS to store, process and

retrieve data from

• A company might want to display and let the user enter data from these other

systems through their CQ-powered website

• Integrating these other systems in real-time opens up great new business

opportunities

CQ in an Enterprise Environment

Page 7: Integrating Backend Systems

© Unic - Seite 7

CQ in an Enterprise Environment

Product

Management

System

User Management

System Car Connect

System

CQ (User Access System)

CRM

System Software

Distribution

System

Other

Systems

Page 8: Integrating Backend Systems

© Unic - Seite 8

CQ in an Enterprise Environment

CQ (User Access System)

Product

Management

System

Browser

User Frontend Backend

Page 9: Integrating Backend Systems

System Integration Layer

Page 10: Integrating Backend Systems

© Unic - Seite 10

• Most use cases require not just one backend system, but the ordered access to

several of them – all of which might greatly differ from each other

System Integration Layer

Business Rules and

Processes

Service Orchestration

Different Data

Structures and

Protocols

Heterogeneous

Technologies

Transactions

Page 11: Integrating Backend Systems

© Unic - Seite 11

System Integration Layer

Product

Management

System

User Management

System Car Connect

System

CQ (User Access System)

CRM

System Software

Distribution

System

Other

Systems

JMS / Binary

JMS / XML

REST / JSON

FTP / Binary

HTTP / SOAP

SMTP / SOAP

Page 12: Integrating Backend Systems

© Unic - Seite 12

System Integration Layer

Product

Management

System

User Management

System Car Connect

System

CQ (User Access System)

CRM

System Software

Distribution

System

Other

Systems

JMS / Binary

JMS / XML

REST / JSON

FTP / Binary

HTTP / SOAP

SMTP / SOAP

? ?

?

Page 13: Integrating Backend Systems

© Unic - Seite 13

System Integration Layer

Product

Management

System

Car Connect

System

CQ

CRM

System

Software

Distribution

System

Content Management

ESB: Only 1 Simple Point of Access

En

terp

rise

Se

rvic

e B

us

Business Rules

Business Processes

Service Orchestration

Intelligent Routing

Data Validation

Transformation

Traceability

Auditing of SLAs

Error Handling

Transaction Handling

Page 14: Integrating Backend Systems

© Unic - Seite 14

System Integration Layer

CQ Backend

Systems

Apache ServiceMix

CXF (JAX-RS)

CXF (JAX-RS, JAX-WS)

Camel Routing Engine

Business Process Execution with Orchestration / Aggregation

using Enterprise Architecture Patterns

Protocol and Data Conversion

REST

REST / SOAP J

M

S

F

T

P

T

C

P

Page 15: Integrating Backend Systems

© Unic - Seite 15

• Advantages of using an ESB like Apache ServiceMix

• Separation of Concerns

• Leveraging the individual strengths of each system

• Easy reuse of middleware for different frontends

• Increased organizational flexibility

• Increased specialization of development teams

• Opportunity to scale integration layer and CQ independently

• More reliable system, by using technologies specially tailored for integration

• Increased cost efficiency and lower TCO

System Integration Layer

Page 16: Integrating Backend Systems

Connecting to the ESB

Page 17: Integrating Backend Systems

© Unic - Seite 17

• The communication between CQ and Apache ServiceMix is

• RESTful

• Based on the HTTP protocol

• Exchange of JSON request and response objects

• As the client library we chose the OSGI version of the Apache HTTP components

library

• For ease of use we built a light-weight „RelayService“ framework on top of it

Connecting to the ESB

Page 18: Integrating Backend Systems

© Unic - Seite 18

Connecting to the ESB

CustomRelayService

JsonRelayService

DefaultRelayService

Apache HttpClient

Service Controller

CQ

Apache ServiceMix

Automatic adding

of common headers

Automatic JSON

handling

HttpClient Abstraction

Page 19: Integrating Backend Systems

© Unic - Seite 19

• To support the full live cycle of resources, we use all of these HTTP methods

• GET To get lists of resources and single resources

• POST To create a new resource

• PUT To update a resource

• DELETE To delete a resource

Connecting to the ESB

doGet(…)

doPost(…)

doPut(…)

doDelete(…)

Page 20: Integrating Backend Systems

© Unic - Seite 20

• Resource: Custom lists of Points of Interest

• Retrieve lists:

• relayService.doGet(„http://smxhost/vehicles/v123/s/ppoi/lists“);

• Upload a new list:

• relayService.doPost(„http://smxhost/vehicles/v123/s/ppoi/lists“, listJson);

• Update a list:

• relayService.doPut(„http://smxhost/vehicles/v123/s/ppoi/lists/list1“, updatedJson);

• Delete a list:

• relayService.doDelete(„http://smxhost/vehicles/v123/s/ppoi/lists/list1“);

Connecting to the ESB

Page 21: Integrating Backend Systems

© Unic - Seite 21

• Data Exchange Format: JSON

• Lightweight, Easy to use – especially within Javascript frontend

• Conversion to and from Java objects is done with Google Gson

• For dependency injection Gson is wrapped in a Spring component

• All changes, validation, localization etc. are done on Java objects

Connecting to the ESB

Page 22: Integrating Backend Systems

Modes of Content Retrieval

Page 23: Integrating Backend Systems

© Unic - Seite 23

Modes of Content Retrieval

Browser ESB Component

JSP

Resource

Model Service

Relay

Service

CQ

Synchroneous Mode

Page 24: Integrating Backend Systems

© Unic - Seite 24

Modes of Content Retrieval

Browser ESB Component

JSP

Resource

Model

Spring MVC

Controller

Relay

Service

CQ

Asynchroneous Mode

AJAX

Page 25: Integrating Backend Systems

© Unic - Seite 25

• Based on Unic proprietary library NEBA II

• Allows mapping of CRX content to Java objects (Resource Models)

• Integrates Spring framework into CQ

• Dependency Injection

• Spring MVC with Spring DispatcherServlet as Sling registered servlet

Modes of Content Retrieval

Page 26: Integrating Backend Systems

Conclusion

Page 27: Integrating Backend Systems

© Unic - Seite 27

• Todays enterprises have numerous systems holding and processing data

• Business processes require the interaction with several of these systems

• CQ can act as the user facing system and a channel to the backend systems

• An ESB like Apache ServiceMix can be used to integrate the various backend

systems in real-time

• Lots of technical, organizational, financial and business advantages can be

achieved

Conclusion

Page 28: Integrating Backend Systems

© Unic - Seite 28

References

Brand Portal: audi.de

myAudi: my.audi.de

Page 29: Integrating Backend Systems

© Unic - Seite 29

Questions

Page 30: Integrating Backend Systems

© Unic - Seite 30

Page 31: Integrating Backend Systems

Belpstrasse 48

3007 Bern

Tel +41 31 560 12 12

Fax +41 31 560 12 13

[email protected]

www.unic.com

Unic AG

© Unic - Seite 31