附錄1 系統執行圖例
關於論文中所提及的系統組件相關執行畫面,經整理如下:
附錄圖號 所屬組件名稱 執行功能
1 物件管理員 選定目的地,執行物件複製
2 物件管理員 主體-備份物件管理
3 物件管理員 投票物件管理
4 物件管理員 Quorum-based 物件管理
5 物件管理員 網路分割模擬
6 物件管理員 Domain Server 狀態查詢
7 物件管理員 顯示物件複製的 SOAP 訊息
8 物件觀察代理者 蒐集物件資訊
9 股市資訊程式範例 股價輸入與查詢
10 聊天室範例 使用者 Percy 之聊天室畫面
11 聊天室範例 使用者 Vivian 之聊天室畫面
12 郵局帳號管理範例 提款機範例程式介面
附錄圖 1-1 物件複製
附錄圖 1-2 主體-備份物件管理
附錄圖 1-3 投票物件管理
附錄圖 1-4 Quorum-based 物件管理
附錄圖 1-5 網路分割模擬
附錄圖 1-6 Domain Server 狀態查詢
附錄圖 1-7 物件複製訊息
附錄圖 1-8 蒐集物件資訊
附錄圖 1-9 股市資訊
附錄圖 1-10 使用者 Percy 之聊天室畫面
附錄圖 1-11 使用者 Vivian 之聊天室畫面
附錄圖 1-12 提款機程式範例介面
附錄2 相關 XML 文件
本系統所有的訊息溝通皆為 SOAP 格式,基於 Apache SOAP 及 SUN JAXM 等套件的協助,使得許多的底層的訊息內容對系統來說具有通透性,因此也簡化 了實作的步驟。但為了對 SOAP Envelope 能有更進一步的掌握,某部份 SOAP Message 仍須手動處理,使其能夠符合本論文實作方面的需求。以下列出系統相 關的訊息內容。
附錄圖 2-1 物件複製之 SOAP Message
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<receive xmlns="urn:ObjectStage">
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:PostOffice-dv:1">
<isd:provider type="java"
scope="Application"
methods="invoke access getFTDL setup">
<isd:java class="server.dv.PostOffice" static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
<replicaServers>
<host>http://140.122.76.188/soap/servlet/</host>
<host>http://140.122.76.189/soap/servlet/</host>
<host>http://140.122.219.57/soap/servlet/</host>
<replicaServers>
</receive>
</s:Body>
</s:Envelope>
附錄圖 2-2 物件觀察代理者將蒐集結果以名稱排序之 XSL 檔
附錄圖 2-3 物件觀察代理者將蒐集結果以位址排序之 XSL 檔
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="FTDL">
<FTDL>
<xsl:apply-templates select="PostOffice">
<xsl:sort select=".//LogicalName"/>
</xsl:apply-templates>
</FTDL>
</xsl:template>
<xsl:template match="PostOffice">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="FTDL">
<FTDL>
<xsl:apply-templates select="PostOffice">
<xsl:sort select=".//LocalIP"/>
</xsl:apply-templates>
</FTDL>
</xsl:template>
<xsl:template match="PostOffice">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
附錄圖 2-4 記錄 Domain Server 位址之描述檔案
附錄圖 2-5 PostOffice 投票物件之 FTDL 檔案
<?xml version="1.0" encoding="UTF-8" ?>
<ServerList>
<Address>http://localhost:3344/LS00/locserv</Address>
<Address>http://localhost:3344/LS01/locserv</Address>
<Address>http://localhost:3344/LS02/locserv</Address>
<Address>http://localhost:3344/LS03/locserv</Address>
</ServerList>
<?xml version="1.0"?>
<PostOffice>
<balance>490</balance>
<DynamicVotingObject>
<OS>3</OS>
<OC>2</OC>
<DO>
http://140.122.76.181:8080/soap/servlet/rpcrouter/urn:PostOffice-dv:1
</DO>
<ReplicateObject>
<FaultTolerantObject>
<LogicalName>urn:PostOffice-dv</LogicalName>
<LocalIP>140.122.219.57:8080</LocalIP>
<SerialNo>1</SerialNo>
<selfRPCRouter>
http://140.122.219.57:8080/soap/servlet/rpcrouter
</selfRPCRouter>
<DomainServerDescriptionURI>
http://tatra:3344/percy/LSInfo4.xml
</DomainServerDescriptionURI>
</FaultTolerantObject>
</ReplicateObject>
</DynamicVotingObject>
</PostOffice>
附錄圖 2-6 SOAP Server 註冊用之完整 Envelope
附錄圖 2-7 向 Domain Server 查詢所有 SOAP Server
附錄圖 2-8 Domain Server 回覆所有 SOAP Server 位址之訊息內容
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
<Update>
<CallerID>tatra</CallerID>
<TimeStamp>15</TimeStamp>
<Location>
http://140.122.76.181:8080/soap/servlet/rpcrouter
</Location>
</Update>
</soap-env:Body>
</soap-env:Envelope>
<PollResponse>
<SiteInfo>
<Site id="xpplab" ts="15"
loc="http://140.122.76.188:8080/soap/servlet/rpcrouter"/>
<Site id="tatra" ts="12"
loc="http://140.122.76.188:8080/soap/servlet/rpcrouter"/>
…
</SiteInfo>
<Poll>
<StatusCheck>off</StatusCheck>
</Poll>
附錄圖 2-9 Domain Server 內部資料庫
<SiteInfo>
<Site id="tatra" ts="15" loc="140.122.76.181" status="disable"/>
<Site id="xpplab" ts="12" loc="140.122.76.186" status="enable"/>
<Site id="xmla" ts="12" loc="140.122.76.185" status="enable"/>
…
</SiteInfo>