web services reliable messaging - xml...

18
IBM Webサービス 20031014© 2003 IBM Corporation Web Services Reliable Messaging

Upload: others

Post on 05-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス

2003年10月14日 © 2003 IBM Corporation

Web Services Reliable Messaging

Page 2: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

WS-ReliableMessaging とは?

2003年3月13日マイクロソフト、IBM、TIBCO、BEA共同発表仕様高信頼メッセージングを実現するモジュラー・メカニズムの仕様SOAPバインディング

Page 3: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

ネットワークの信頼性への疑問

タイムアウトゲートウェイのダウン宛て先ホストのダウン

メッセージのバッファリング到達確認再送ステートの管理コンテキストの管理

対応策

これらがWS-RM の仕様の範疇

Page 4: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

現状では?

SOAP over MQMQサポート・パック

HTTPRWebSphere Business Connection

SOAP over JMSWebSphere Application Server V5.02

同一製品同士でのみ、高信頼メッセージングが可能

Page 5: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

高信頼メッセージングのモデル

ここに渡した時点で信頼できる

ここに到達した時点で成功

Page 6: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

用語

EndPoint: Webサービス・メッセージの送信元や送信先となるような参照エンティティー、プロセッサ、リソースなど。Initial Sender: メッセージを送信するEndPoint。Ultimate Receiver: メッセージが配信されるEndPoint。Delivery Assurance: メッセージング基盤がメッセージの到達を保証すること。Source: メッセージを運搬するEndPoint。Destination: メッセージを受信するEndPoint。Send: 確実な配信に先立ち、Sourceにメッセージを渡す動作のこと。この時点からメッセージの到達が保証されます。Deliver: 最終的な受信者にメッセージが渡されること。この時点で、「確実な配信」が完了したことになる。Transmit: ネットワーク接続にメッセージを書き込むこと。Receipt: ネットワーク接続からメッセージを読み出すこと。Acknowledgement: DestinationがSourceに対してメッセージをうまく受け取れたことを示すために行う電文。

Page 7: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Delivery Assurance(到達保証)AtMostOnce重複なく、ほとんどは一つのメッセージが到達し、さもなければ最低一つのエンドポイントからエラーが上がります。シーケンス中のいくつかのメッセージは到達しない可能性があります。(重複がないことの保証)AtLeastOnce それぞれの送信メッセージは配信され、さもなければ最低一つのエンドポイントでエラーが発生します。いくつかのメッセージは二つ以上到達する可能性があります。(喪失がないことの保証)ExactlyOnce それぞれの送信メッセージは重複無く配信され、さもなければ最低一つのエンドポイントでエラーが発生します。上記二つの到達保証の論理和。(重複も喪失もないことの保証)InOrder複数のメッセージを順番通りに配信します。この到達保証は、上記のいずれかの到達保証と組み合わされることがあります。レシーバーが監視するために、減少値でないシーケンス番号を振る必要があります。また、メッセージの重複や喪失については言及しません。(順序を保証)

Page 8: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

再送をするReliable Message交換

Page 9: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Sequence/wsrm:Sequence/wsrm:Sequence/wsu:Identifier/wsrm:Sequence/wsrm:MessageNumber/wsrm:Sequence/wsrm:LastMessage/wsrm:Sequence/wsu:Expires/wsrm:Sequence/{any}/wsrm:Sequence/@{any}

/wsrm:SequenceAcknowledgement/wsrm:SequenceAcknowledgement/wsu:Identifier/wsrm:SequenceAcknowledgement/wsrm:AcknowledgementRange/wsrm:SequenceAcknowledgement/wsrm:AcknowledgmentRange/@Upper/wsrm:SequenceAcknowledgement/wsrm:AcknowledgmentRange/@Lower/wsrm:SequenceAcknowledgment/{any}/wsrm:SequenceAcknowledgment/@{any}

Sequence Acknowledgement

Page 10: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Request Acknowledgement/wsrm:AckRequested/wsrm:AckRequested/wsu:Identifier/wsrm:AckRequested /{any}/wsrm:AckRequested /@{any}

Page 11: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Policy Assertionwsp:SpecVersion

/wsrm:DeliveryAssurance/wsrm:DeliveryAssurance/@Valu/wsrm:DeliveryAssurance/{any}/wsrm:DeliveryAssurance/@{any}

wsu:Expires

/wsrm:InactivityTimeout/wsrm:InactivityTimeout/@Milliseconds/wsrm:InactivityTimeout/{any}/wsrm:InactivityTimeout/@{any}

Page 12: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Policy Assertion ( cont'd )

/wsrm:BaseRetransmissionInterval/wsrm:BaseRetransmissionInterval/@Milliseconds/wsrm:BaseRetransmissionInterval/{any}/wsrm:BaseRetransmissionInterval/@{any}/wsrm:ExponentialBackoff/wsrm:ExponentialBackoff/{any}/wsrm:ExponentialBackoff/{@any}

/wsrm:AcknowledgementInterval/wsrm:AcknowledgementInterval/@Milliseconds/wsrm:AcknowledgementInterval/{any}/wsrm:AcknowledgementInterval/{@any}

Page 13: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Attaching Policy Assertions to Sequences/wsrm:SequenceRef/wsrm:SequenceRef/@Match

Page 14: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

Sequenceにポリシーを添付する<wsp:PolicyAttachment>

<wsp:AppliesTo><wsrm:SequenceRef>

<wsu:Identifier>http://fabrikam123.com/abc</wsu:Identifier></wsrm:SequenceRef>

</wsp:AppliesTo><wsp:Policy>

<wsp:SpecVersionwsp:URI="http://schemas.xmlsoap.org/ws/2003/03/rm"wsp:Usage="wsp:Required"/>

<wsrm:DeliveryAssurance Value="wsrm:AtMostOnce"wsp:Usage="wsp:Required"/>

</wsp:Policy><wsp:PolicyReference

Ref="http://schemas.xmlsoap.org/ws/2003/03/rm/baseTimingProfile.xml"/></wsp:PolicyAttachment>

Page 15: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

SequenceFault/wsrm:SequenceFault/wsrm:SequenceFault/wsu:Identifier/wsrm:SequenceFault/wsrm:FaultCode/wsrm:SequenceFault/wsrm:AcknowledgementRange/wsrm:SequenceFault/wsrm:AcknowledgmentRange/@Upper/wsrm:SequenceFault/wsrm:AcknowledgmentRange/@Lower/wsrm:SequenceFault/{any}/wsrm:SequenceFault/@{any}

wsrm:SequenceTerminatedwsrm:UnknownSequencewsrm:InvalidAcknowledgement

wsrm:MessageNumberRollover

wsrm:LastMessageNumberExceeded

wsrm:SequenceRefused

Page 16: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

ETTKに含まれるランタイム

Axisのトランスポートを置き換えるJARファイルAxis 1.1に対応WebSphere(またはWSDKかTomcat)+ETTKで動作現状ではフラットファイルでパーシスタンス化invokeOneWayのみのサポート

2種類のデモ

– サンプル1:メッセージを一つ、非同期に送信する

– サンプル2:3つのメッセージを異なった順序で送信

Page 17: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

メッセージングシステムの起動

wsrm.xml を準備

com.ibm.rm.scheduler.ScheduleMgr.main(new String[] {"wsrm.xml"});

リクエスター、プロバイダー双方で起動

Page 18: Web Services Reliable Messaging - XML Consortiumxmlconsortium.org/seminar/m22/data/20031014-03-2.pdf2003/10/14  · IBM Webサービス・テクノロジー・フォーラム 2003年9月16日

IBM Webサービス・テクノロジー・フォーラム

2003年9月16日 © 2003 IBM Corporation

使い方

// トランスポートの置き換えSystem.setProperty("java.protocol.handler.pkgs","com.ibm.rm.axis.transport");

// Callオブジェクトのインスタンス化String url = "wsrm://" + WSTKConstants.SERVER_HOSTNAME + ":" + port +

"/wstk/wsrm/services/po";Call call = new Call( url );

// ハンドラーのセットHandler h = new com.ibm.rm.axis.handlers.wsrm.WSRMSender();h.setOption( "configPath", "wsrm.xml");h.init();call.setClientHandlers( h, h ); Notification notificationHandler = null ;notificationHandler = new NotificationHandler();call.setProperty( Notification.NAME, notificationHandler );

// サービスの呼び出しcall.invokeOneWay( );

通知を受け取る準備