c10: getting rejected on the bus how openedge ® developers deal with failure chris james senior...
TRANSCRIPT
C10: Getting Rejected on the Bus
How OpenEdge® Developers Deal with Failure
Chris JamesSenior Consultant
© 2008 Progress Software Corporation2
“It is possible to fail in many ways… while to succeed is possible in only one way”
Aristotle – Greek philosopher
© 2008 Progress Software Corporation3
OpenEdge and Sonic™ ESB
You can align business and IT goals using Sonic and OpenEdge in your SOA
You can create robust and flexible business applications
You can handle failures in your infrastructure, applications, or data
© 2008 Progress Software Corporation4
Agenda
Sonic ESB Endpoints Faults and rejected messages Quality of Service (QOS) and Message Time
To Live (TTL) Application architecture and AppServer™
operating modes Fault processing options AppServer Down!!!!
Dealing with rejection on the bus
© 2008 Progress Software Corporation5
Terminology
Service• Your OpenEdge based application exposed to
Sonic ESB through the Sonic Adapter Process
• A Sonic ESB process that uses an itineary to execute 1 or more operations on 1 or more services
Container• A Sonic managed executable process that
hosts processes and services
© 2008 Progress Software Corporation6
Sonic ESB Endpoints
Destination where ESB services and processes send and receive messages
Can be associated with a Queue or Topic 4 defined Endpoint types for Services
• Entry (required for services)
• Exit (usually ReplyTo)
• Fault
• RME
© 2008 Progress Software Corporation7
OpenEdge ESB Adapter Architecture
Database
AppServerAdapter
Entry Endpoint
Exit Endpoint
Fault Endpoint
Rejected Endpoint
© 2008 Progress Software Corporation8
Faults and Rejected Messages
Rejected Messages• Invalid message types
• Invalid data
• Adapter exceptions
• Failure to send result
Fault Messages• Infrastructure issues
• Applications errors (RETURN ERROR)
Service has Fault and Rejected Message endpoints
© 2008 Progress Software Corporation9
Anatomy of a Rejected Message
<SOAP-ENV:Body>
<xq:rejectedMessageInfo xmlns:xq=“…">
<rejectedCode>OPENEDGE_INVOCATION_ERROR</rejectedCode>
<rejectedLocation container="dev_OpenEdgeTest"
host="pcdcleary" process="CheckCustomer"
serviceApplication="dev.OpenEdge" step="Find Customer"
topLevelProcess="CheckCustomer"/>
<rejectedDetails>
{Error message and stack trace}
</rejectedDetails>
© 2008 Progress Software Corporation10
Anatomy of a Fault Message
<exception xmlns=“…">
<message>Fault String: SessionPool : NoAvailableSessions[Could not connect to the AppServer: General Error: Connection refused: connect. (7203)]</message>
<class>com.progress.open4gl.dynamicapi.SessionPool.NoAvailableSessionsException</class>
<detail>
<faultDetails container="dev_OpenEdgeTest" host="pcdcleary" process="CheckCustomer" serviceApplication="dev.OpenEdge" step="Find Customer" topLevelProcess="CheckCustomer" />
</detail>
< message>
Fault String: SessionPool : NoAvailableSessions[Could not connect to the AppServer: General Error: Connection refused: connect. (7203)]
</message>
<class>
com.progress.open4gl.dynamicapi.SessionPool.NoAvailableSessionsException
</class>
<faultDetails container="dev_OpenEdgeTest" host="pcnbcdjxp" process="CheckCustomer" serviceApplication="dev.OpenEdge" step="Find Customer" topLevelProcess="CheckCustomer" />
© 2008 Progress Software Corporation11
Quality of Service
Best Effort• Default
• Messages may be lost or redelivered
At Least Once• No lost messages
• May be redelivered
Exactly Once• Most reliable
• No lost or redelivered messages
© 2008 Progress Software Corporation12
Message Time To Live
Specifies a timeout on a process Messages that timeout sent to RME Default is 0 (no timeout)
© 2008 Progress Software Corporation13
Configuring Properties
Service• Fault and Rejected Message endpoints
• Can be overridden by process
Endpoint• Entry endpoint specifies QOS
• Process sets minimum QOS
Process• Time to Live
© 2008 Progress Software Corporation14
Application Architecture and Operating Modes
Sonic container and OpenEdge AppServer treated as single unit• Sonic provides networking
• Fewer faults due to AppServer availability
• ESB Service and OpenEdge AppService same
Session-free operating mode recommended• Each operation does complete unit of work
• No state saved on AppServer
• Persistent procedures defeat this architecture
© 2008 Progress Software Corporation15
Session-managed and Persistent Procedure Issues
Requires three calls for a single operation Saves state on AppServer even with Session-
free AppServer still bound due to fault or rejected
message Limits scalability Enable Intra-Container messaging to mitigate
issues
© 2008 Progress Software Corporation16
Fault Processing Options
Settable per operation Fault Only (Default)
• Original message lost
Fault and Original message• Original message can be remediated and
resubmitted
Rejected and Original message• Same as above, but rejected format
Continue process with Fault
© 2008 Progress Software Corporation17
Fault Processing Options
© 2008 Progress Software Corporation18
Booking a Vacation
Client Flight Booking
Coordinator Service
Hotel Booking Car Booking
© 2008 Progress Software Corporation19
Book Hotel Room Process
© 2008 Progress Software Corporation20
Checking Availability
Yes, there are rooms available• Process/transaction continues
No, there are not rooms available• Entire transaction fails
I don’t know if rooms are available• AppServer down
• No available agents
© 2008 Progress Software Corporation21
Fix problem and resubmit
© 2008 Progress Software Corporation22
AppServer Down Demo!!!
© 2008 Progress Software Corporation23
Agenda
Sonic ESB Endpoints Faults and rejected messages Quality of Service (QOS) and Message Time
To Live (TTL) Application architecture and AppServer
operating modes Fault processing options AppServer Down!!!!
Dealing with rejection on the bus
© 2008 Progress Software Corporation24
In Summary
You can align business and IT goals using Sonic and OpenEdge
You can create robust and flexible business applications
You can handle failures in your infrastructure, applications, or data
© 2008 Progress Software Corporation25
For More Information, go to…
PSDN• Introducing Native Invocation with the Open
Edge Adapter for Sonic ESB• Progress Sonic ESB Developers Guide - Re
submit Sample Progress eLearning Community:
• OpenEdge Development with Sonic ESB• Designing ESB Processes• Orchestrating Services with Sonic BPEL Ser
ver
© 2008 Progress Software Corporation26
Relevant PTW Sessions
C4: Common Applications for Sonic ESB
C8: Getting the Most Out of Sonic Workbench
© 2008 Progress Software Corporation27
Questions?
© 2008 Progress Software Corporation28
Thank You
© 2008 Progress Software Corporation29