Post on 17-Jan-2018
description
ARCH-5: Service Interfaces in Practice
Christian StillerTechnical Architect
© 2006 Progress Software Corporation2ARCH-5: Service Interfaces in Practice
Before we begin…
Let me tell you a story
© 2006 Progress Software Corporation3ARCH-5: Service Interfaces in Practice
Before we begin…
Let me tell you a story…
© 2006 Progress Software Corporation4ARCH-5: Service Interfaces in Practice
Before we begin…
Let me tell you a story…
© 2006 Progress Software Corporation5ARCH-5: Service Interfaces in Practice
Before we begin…
© 2006 Progress Software Corporation6ARCH-5: Service Interfaces in Practice
Before we begin…
© 2006 Progress Software Corporation7ARCH-5: Service Interfaces in Practice
Before we begin…
Let me tell you a story…
© 2006 Progress Software Corporation8ARCH-5: Service Interfaces in Practice
Agenda
Review OpenEdge® Reference Architecture Requirements for Service Interfaces Service Interfaces in Practice
• OpenEdge GUI• WebSpeed® UI• .NET™ UI• Web services• Sonic
© 2006 Progress Software Corporation9ARCH-5: Service Interfaces in Practice
OpenEdge Reference Architecture
Presentation
Business Services
Data Access
Data Sources
Com
mon Infrastructure
Enterprise Services
© 2006 Progress Software Corporation10ARCH-5: Service Interfaces in Practice
From a functional perspective…
Service Interfaces
EnterpriseEnterpriseReportingReporting B2C InformationB2C Information
KioskKiosk
Back OfficeBack OfficeApplicationApplication
B2BB2BCollaborationCollaboration
ServicesServices
BusinessBusinessServicesServices
LayerLayer
Open APIOpen API
A2A IntegrationA2A Integration
WirelessWirelessDevicesDevices
B2C Web PortalB2C Web Portal
© 2006 Progress Software Corporation11ARCH-5: Service Interfaces in Practice
…to a technical perspective
Service Interfaces
Crystal Xi using Crystal Xi using .NET proxy.NET proxy .NET using .NET using
.NET proxy.NET proxy
OpenEdgeOpenEdgeGUIGUI
Sonic ESBSonic ESB
OpenEdge OpenEdge AppServerAppServer
Web ServicesWeb Services
Sonic MQSonic MQ
.NET CF using .NET CF using Web ServicesWeb Services
OpenEdgeOpenEdgeWebSpeedWebSpeed
© 2006 Progress Software Corporation12ARCH-5: Service Interfaces in Practice
OpenEdge Reference Architecture – Service Interface
© 2006 Progress Software Corporation13ARCH-5: Service Interfaces in Practice
Service Interface
A Service Interface is an API that is exposed to the outside world. This API serves as a bridge between the Business Servicing Layer and the Presentation and Integration layers.
© 2006 Progress Software Corporation14ARCH-5: Service Interfaces in Practice
Agenda
Review OpenEdge Reference Architecture Requirements for Service Interfaces Service Interfaces in Practice
• OpenEdge GUI• WebSpeed UI• .NET UI• Web Services• Sonic
© 2006 Progress Software Corporation15ARCH-5: Service Interfaces in Practice
“Connect” to business logic
Run business logic
Calling the business logic
© 2006 Progress Software Corporation16ARCH-5: Service Interfaces in Practice
Session Context Security Auditing
Directory Service
Additional steps
© 2006 Progress Software Corporation17ARCH-5: Service Interfaces in Practice
“Connect” to business logic
Session management Context management Security checks Audit activity Find / start / initialize business logic Run business logic
Calling the business logic
© 2006 Progress Software Corporation18ARCH-5: Service Interfaces in Practice
Connection to AppServer™• Do we need to connect to the AppServer?• How do we connect to the AppServer?
Client side context• Can client maintain session, context or security
information?• Can we control and rely on the client side
context?
Client Capabilities
© 2006 Progress Software Corporation19ARCH-5: Service Interfaces in Practice
Client security• How do clients authenticate?• Can we take a session token to validate identity
or do we need to authenticate on each request?• Can we use client principals?
Dataset support• Can client send and receive Dataset structures?• Can client send Before/After table data?
Client Capabilities cont.
© 2006 Progress Software Corporation20ARCH-5: Service Interfaces in Practice
“Connect” to business logic Parameter conversion Session management Context management Security checks Audit activity Find / start / initialize business logic Run business logic
Calling the business logic
© 2006 Progress Software Corporation21ARCH-5: Service Interfaces in Practice
Agenda
Review OpenEdge Reference Architecture Requirements for Service Interfaces Service Interfaces in Practice
• OpenEdge GUI• WebSpeed UI• .NET UI• Web Services• Sonic
© 2006 Progress Software Corporation22ARCH-5: Service Interfaces in Practice
OpenEdge GUI
Direct connection to the AppServer Can maintain client side context
• Login / session ID• Client side context
Supports Client principals Native Dataset support
Written in ABL Able to do asynchronous AppServer calls
© 2006 Progress Software Corporation23ARCH-5: Service Interfaces in Practice
OpenEdge GUI Service Interface
Connect to AppServer Pass in Session-ID and other context Pass in parameters for request
• Might contain Dataset Restore session / context Check security Return results to client
• Might contain Dataset
© 2006 Progress Software Corporation24ARCH-5: Service Interfaces in Practice
Show code example for GUI service interface in OpenEdge Architect
OpenEdge GUI Service Interface
© 2006 Progress Software Corporation25ARCH-5: Service Interfaces in Practice
OpenEdge WebSpeed
Complex Client-Server model• Web-browser – WebSpeed agent• WebSpeed code – Business Servicing layer
Datasets• Not supported in HTML “screens”• Supported in WebSpeed code
Client side session / context (in both “clients”)• Login / session ID• Client side context
Written in ABL
© 2006 Progress Software Corporation26ARCH-5: Service Interfaces in Practice
OpenEdge WebSpeed Service Interface
Map HTML request to ABL• Forms, browser variables, URL parameters,
cookies• Might need to create Before/After tables for
Datasets Connect to AppServer
• Or run Business logic in same session Restore session / context Check security Map results back to HTML
© 2006 Progress Software Corporation27ARCH-5: Service Interfaces in Practice
Show code example for GUI service interface in OpenEdge Architect
OpenEdge WebSpeed Service Interface
© 2006 Progress Software Corporation28ARCH-5: Service Interfaces in Practice
.NET Open Client
Connect to AppServer through Proxies Client side session / context
• Login / session ID• Client side context
Dataset support
Written in C#, J#, VB.NET…• Typically backend and UI are separate
development teams Typically static Service Interface
© 2006 Progress Software Corporation29ARCH-5: Service Interfaces in Practice
.NET Open Client Service Interface
Connect to AppServer through Proxy Pass in Session-ID and other context Pass in parameters for request
• Might contain Dataset Restore session / context Check security Return results to client
• Might contain Dataset
© 2006 Progress Software Corporation30ARCH-5: Service Interfaces in Practice
Show code example for .NET UI service interface in OpenEdge Architect
.NET UI Service Interface
© 2006 Progress Software Corporation31ARCH-5: Service Interfaces in Practice
Web Services Client
Dataset• Can’t expose Datasets to Web services• Before/After tables not supported in Web services
Typically no knowledge about client• No client side session / context information• Limited security (e.g. no login)
Typically client has no knowledge about backend• Needs fine grained, self-documenting services
© 2006 Progress Software Corporation32ARCH-5: Service Interfaces in Practice
Web Services Service Interface
Connect to AppServer through Web Services Adapter
Pass in login information• Validate login
Pass in any context / session information Parameters may need to be mapped into
Datasets Datasets need to be broken into temp-tables Business logic is called
© 2006 Progress Software Corporation33ARCH-5: Service Interfaces in Practice
Show code example for Web services service interface in OpenEdge Architect
Web Services Service Interface
© 2006 Progress Software Corporation34ARCH-5: Service Interfaces in Practice
Sonic Integration Client
Dataset• Datasets can’t be sent in messages• Before/After tables not supported
Typically no knowledge about client
Typically client has no knowledge about backend
Might be just a published message• No direct response
© 2006 Progress Software Corporation35ARCH-5: Service Interfaces in Practice
Sonic Integration Client
Receive message Message may need to be mapped into
Datasets Pass in login information
• Validate login Pass in any context / session information Business logic is called
© 2006 Progress Software Corporation36ARCH-5: Service Interfaces in Practice
Show code example for Sonic service interface in OpenEdge Architect
Sonic Service Interface
© 2006 Progress Software Corporation37ARCH-5: Service Interfaces in Practice
In Summary
Service Interfaces
• Bridge different technologies
• Implement core services
• Needs to be created for each client type
© 2006 Progress Software Corporation38ARCH-5: Service Interfaces in Practice
Relevant Exchange Sessions
ARCH-7: Integrate This! SonicMQ and the OpenEdge Reference Architecture
ARCH-10: Delivering Services within Sonic ESB
ARCH-13: Multiple "Views" with WebSpeed
© 2006 Progress Software Corporation39ARCH-5: Service Interfaces in Practice
Questions?
© 2006 Progress Software Corporation40ARCH-5: Service Interfaces in Practice
Thank you foryour time
© 2006 Progress Software Corporation41ARCH-5: Service Interfaces in Practice