c10: getting rejected on the bus how openedge ® developers deal with failure chris james senior...

29
C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

Upload: gabriella-gloria-pearson

Post on 19-Jan-2016

252 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

C10: Getting Rejected on the Bus

How OpenEdge® Developers Deal with Failure

Chris JamesSenior Consultant

Page 2: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior 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

Page 3: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 4: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 5: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 6: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 7: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation7

OpenEdge ESB Adapter Architecture

Database

AppServerAdapter

Entry Endpoint

Exit Endpoint

Fault Endpoint

Rejected Endpoint

Page 8: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 9: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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>

Page 10: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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" />

Page 11: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 12: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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)

Page 13: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 14: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 15: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 16: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 17: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation17

Fault Processing Options

Page 18: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation18

Booking a Vacation

Client Flight Booking

Coordinator Service

Hotel Booking Car Booking

Page 19: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation19

Book Hotel Room Process

Page 20: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 21: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation21

Fix problem and resubmit

Page 22: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation22

AppServer Down Demo!!!

Page 23: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 24: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 25: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 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

Page 26: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation26

Relevant PTW Sessions

C4: Common Applications for Sonic ESB

C8: Getting the Most Out of Sonic Workbench

Page 27: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation27

Questions?

Page 28: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation28

Thank You

Page 29: C10: Getting Rejected on the Bus How OpenEdge ® Developers Deal with Failure Chris James Senior Consultant

© 2008 Progress Software Corporation29