IFREE データセンター:Web サービスを用いた地震波形データ収集アプリケーションの開発

Providing Standardized Data Access
through Java-RMI and web services at
JAMSTEC
S. Tsuboi(1), H. Mizutani(1), N. Takeuchi(2)
T. Arai (3), Y. Yanaka(3)
(1)IFREE, (2)ERI, (3)Fujitsu
Broadband waveforms are provided through
various interfaces…
Wilber II (IRIS)
NINJA(IFREE, OHP)
Pacific Region Geophysical Network Data
Center of IFREE/JAMSTEC has archived
broadband seismograms, geomagnetic, and
geodetic data which are recorded by
geophysical observation network in northwest
Pacific region. These data are distributed
through our web site using the Java-RMI based
network data center system (Takeuchi et al.,
2002). While developing this system we have
realized that the current approach has several
problems to build network data center system:
• It is necessary to install server software at each
data center.
• It is possible that original data source might
become obscure.
Geophysical Data Service Client
●
Using web services technology, differences
among data centres are accommodated through
WSDL
DC A
DC C
・One stop application
DC B
Application
request
GDS Client softwares
●
http is used as transmission protocol
●
Access procedures are described in WSDL
●
No dynamic name services by UDDI
DC B
DC C
Web interface
UDDI
WSDL for
DC B
h
t
t
p
DC A
WSDL for
DC A
WSDL for DC C
Application
DataCenterList.XML
How to use GDS client
How to use GDS client (2)
(1)select data center
(2)enter search condition
How to use GDS client (3)
(3)select event, station, channel
How to use GDS client (4)
(4)enter user information
Access to services
• GDS Client uses get and post method of
http protocol to access data servers.
To access to other services, it is necessary to prepare WSDL and XSLT files.
GDSClient software
• http://www.jamstec.go.jp/pacific21/
• Following data centers are available through this
software
– IFREE NINJA (Continuous/Event data)
– OHP DMC NINJA (Cont./Event)
– IRIS WebRequest(Cont), WilberII(Event)
– ORFEUS WebRequest, WilberII
– IFREE Synthetic Seismograms
Summary
• We have developed new user application
software, which enables users to access
different data centers through a unique user
interface, which we call “Geophysical Data
Service Client application software (GDS Client).
• GDS Client software is easy to extend to other
data centers and other type of Earth science
databases by developing WSDL and XSLT style
sheet.
Webサービスの技術の使用
– XML(eXtend Markup Language)を用い
たデータ管理
– WSDL(Web Service Description
Language) を用いた手続きの記述
– UDDI(Universal Description, Discovery,
and Integration)を用いたサービスの動的
な検索
– SOAP(simple object access protocol)を
用いた通信
Webサービスを用いた
アプリケーション(一般論)
WSDL for DC C
DC B
Service
WSDL for DC B
DC C
Service
UDDI
Service
DC A
WSDL for DC A
Application
データ取得時の内部的な流れ
Data Center
1.アプリケーションを起動
Configuration file
DataCenterList.xml
2.データセンターを選択
Workflow file
DCname.*.xml
*.wsdl
3.イベントを検索
*.xsl
xml→html変換(xslt)
4.イベント選択
5.データ取得
Web Interface
html→xml変換(xslt)
ダウンロードされるソフトウェア
提供パッケージに含まれるもの
-. 実行ファイル(GDSClient.bat)
-. ライブラリファイル(jarファイル)
-. データセンター設定ファイル(xmlファイル)
datacenterlist.xml
-. ワークフローファイル(xmlファイル)
-. ヘルプドキュメント
提供パッケージに含まれないもの(Web上で公開)
-. wsdlファイル(Webサービス記述ファイル)
http://www.jamstec.go.jp/pacific21/gds/*.wsdl
-. xsl ファイル(html←→xml変換スクリプト)
http://www.jamstec.go.jp/pacific21/gds/*.xsl
詳細な流れ
Searchボタンを押す
searchEvents_input.xsl
conf/integrate.event.searchevent.xml
<element key="ifreeevent">
<value>ifreeevent.event.searchevent</value>
ifreeevent.event.searchevent.xml
<element key="name">
<value>ifreeevent.IFREEEventDataService.GDSGetPort.searchEvents
</value>
</element>
wsdlに記述されたメソッド名が書かれている
ローカルファイル
http→xmlの変換スクリプトが書かれている
IFREEEventDataService.wsdl
<operation name="searchEvents">
<http:operation location="cgi-bin/getEventList.cgi" />
<input>
<gds:translate type="text/xsl" href="http://ohpd
mc.eri.u-tokyo.ac.jp/gds/IFREEEventDataService/searchEvents_input.xsl" />
<http:urlEncoded />
</input>
<output>
<gds:translate type="text/xsl" href="http://ohpd
mc.eri.u-tokyo.ac.jp/gds/IFREEEventDataService/searchEvents_output.xsl" />
</output>
</operation>
inputとoutputの処理の仕方が指定されている
リモートファイル
疎結合と密結合
疎結合の例
密結合の例
DC A
DC C
DC B
Applicatio
n
request
各サーバー間は結合されず、ユーザーと
サービス提供者間に同一のアプリケーショ
ンをインストールする必要はない。
各サーバー間が、同一のアプ
リケーションにより連携される。
WSDLとは?
• サービス提供者とサービス利用者の間の動
的な結合を可能にする
• サービス提供者は自由なインターフェースで
サービスを公開
• サービス利用者は同一の手続きでサービス
を利用可能
インターフェースの汎用化
• サービスとインターフェースを分離。インター
フェースを外部定義体で定義できる。
• 呼出し手順の汎用化
• サービスとユーザインターフェースを関連付
けるワークフローも外部定義体で定義
• 引数と戻り値はXSLTを用いてXML形式に
変換し、内部で処理する。
New application(1)
Web Service
●
●
We use the technology of web service to
develop new application
–
description of procedures using WSDL (Web Service
Description Language) written in XML (eXtend
Markup Language)
–
network communication using SOAP(simple object
access protocol)
–
dynamic searching of services using UDDI (Universal
Description, Discovery, and Integration)
The parameters are written in XML so the
system using web service technology has
great extensibility.
New application (3)
●
●
Now, following services are available
–
IFREE NINJA (Continuous/Event data)
–
OHP DMC NINJA (Cont./Event)
–
IRIS WebRequest(Cont), WilberII(Event)
Future Plan
–
Add other data centers
–
Need to create new WSDL file
–
improvement of user interface
キーポイントとなるファイル群
(1) サービスの引数・戻り値の型を定義する「スキーマファイル」
・GDSSchema.xsl
(2) サービスの引数・戻り値(GDSSchema準拠XML形式)を定義する「WSDL」
・IFREEEventDataService/IFREEEventDataService.wsdl
・IFREEContDataService/IFREEContDataService.wsdl
・IFREESynthDataService/IFREESynthDataService.wsdl
(3) サービスの引数・戻り値の変換(GDSSchema準拠XML←→サービス独自)を
定義する「XSLTスタイルシートファイル」
・IFREEEventDataService/*.xsl (15ファイル)
・IFREEContDataService/*.xsl (18ファイル)
・IFREESynthDataService/*.xsl (15ファイル)
・CommonEventNINJAService/*.xsl(17ファイル)
・CommonContNINJAService/*.xsl (20ファイル)
(1) これらの XMLファイルのうち最も重要なのは WSDLであり,
XSLT, XSD(スキーマファイル)は,WSDLを補足するものである
(WSDL中に記述されたURLからリンクされている)
(2) これらの XMLファイルはデータ公開サイトと対になるものであり
インターネットで公開する必要がある
??