dispatcher of Web Services. We take ... spatial information grid, software engineering. E-mail: ... Dispatcher studied by Liu EG It can dispatch web services.
WUJHS
Vo1.11 No.3 2006 539-542
Wuhan University Journal of Natural Sciences
Article ID: 1007-1202(2006)03-0539 04
Multi.Layer Tree Hierarchical Architecture Based on Web Service 0 [ ] TONG Hengjian ''2 , LI Deren", ZHU Xinyan 1 , SHAO Zhenfeng' 1. National Key l.aboratory for Information l*]ngineering in Surveying, Mapping and Remote Sensing, Wuhan University, Wuhan 430072, Hubei, China; 2. School of Computer, (Thina University of (;eosciences, Wuhan 43007/1, Hubei, China
Abstract= To
solve the problem of the information share and services integration in population information system, we propose a multi-layer tree hierarchical architecture. The con> mand (Web Service Call) is recursively muhicast from top layer of tree to bottom layer of tree and statistical data are gathered from bottom layer to top layer. We implemented the architecture by using Web Services leehnology. In our implementation, client program is the requestor of Weh Services, and all leaf nodes of the las( layer are only the provider of Web Services. For those nodes of intermediate layers, every node is not only the provider of Web Services, but also the dispatcher of Web Services. We take populalion census as an example to describe the working flow of the architecture. Key w o r d s : information integration; information share; recursively muhicast; multi-layer tree hierarchical architec-lure; web service
CLC number= TP 393. o9
Received date= 2005 10-20 Foundation item: Supported hy the National High-Tech Research and Development Plan of China (863 Plan 2003AA132080), and the Research Foundation for ()utstanding Yotmg Teachers, China University of Geosciences (CUGQNI.0506) Biography: T()NG Hengjian (1971), male, Post Doctor, Associate professor of China University of Geosciences, research direction= GIS, spatial information grid, software engineering. E-mail: thj07113558 (aSyahoo, com. cn 1""lb whom correspondence should be addressed. E-mail : dli@ wtusm. edu. c r l
Introduction
p
opulation census is a basic and scientific method that is used to collect information of population. By conducting a census of the population, we can know the figure of the population and its distribution, transfer and structure. In China, almost every province, every city or every district has built the population information management system and even the population geographic information system. But these information systems are separate, and each information system only serves the local government. Therefore, they cannot be used efficiently. For example, if you want to query some statistical information about a province, you have to sum up all statistical results of all cities. However, because these cities' information systems are not integrated, the task cannot be implemented at present. In China, the central government, as well as all provinces, all cities and all districts, consists of a kind of tree hierarchical structure. Its shape is like a pyramid. The past technique, such as the architecture of client/server, browser/server, is very difficult to implement the share of information and the integration of services. In order to solve the problem, we present a kind of multi-layer tree hierarchical structure that is consistent with the structure of administrative department of China. We connect all servers together by Internet and make the Web Service call command be recursively multicast from top layer of tree to bottom layer of tree, and statistical data are gathered from bottom layer to top layer. Therefore, we make population census be conducted at any time and at anywhere by Internet. In routine, what we need to do is to update a small quantity of information, such as adding new information when a baby is born, or deleting old information when a person dies. It is not necessary for us to
539
do large-scale population survey in the future. This will save a great deal of money for our country. As far as we know, there are few papers that discuss the application of grid computing technology and thinking on population census. Our architecture is similar to the architecture of AlchemiEI~ grid computing platform of the Gridbus project. But there are some differences. We implement it through web service technology. Alchemi platform implements it by. NET Remoting technology. Alchemi is in fact SPMIJ 2n parallel programming model. Our system is MPMD parallel programming model. Alchemi's main aim is to share computing resource. Our aim is to share data resource and collaborate web services. There are some papers E3'q that discussed multicast, but they didn't talk about recursively multicast. In Refs. [5-7], they used Jave RMI or GridRPC to implement dynamic web service and Multi-Cluster technology, while we used Microsoft. Net to implement it. For Web Services Dispatcher, there is also a simple Web Service Dispatcher studied by LiuEG It can dispatch web services from client program to different web service sites; however, his WSD synchronously calls different web services, while our WSD can asynchronously invoke different web services.
1 The Working Flow The structure of administrative department in China is shown in Fig. 1. Country stands for the central government, PI-P3 for province, C1-C3 for city and D1-D4 for district. The country consists of provinces. Each province consists of cities. Each city consists of districts. COUNTRY
PI
Fig. 1
P2
The
P3
999
structure of administrative department
For counting up the number of babies in China within a period of time, the working flow is as follows. Step 1 The central government sends the command to its server, then the server multicasts the command to 540
all provinces. Step 2 Each province multicasts the command to all cities of the province. Step 3 Each city multicasts the command to all districts of the city. Step 4 Each district receives the command, then executes the command and returns the statistical data to the city. Step 5 Each city gathers all data and sums up, then transfers the data to the province. Step 6 Each province gathers all data and sums up, then transfers the result to the central government. However, in fact, population census is conducted by millions of people in China at present. The above process is the abstract of real population census process.
2 The Design of the Architecture and Implementation 2.1
The Characteristics of the Problem We can know from Fig. 1 that it is a multi-layer tree hierarchical structure. Its shape is like a pyramid. The main characteristic of the above process is a recursive remote call process. In Steps 1, 2 and 3, the command is multicast from top to bottom. In Steps 4, 5 and 6, statistical data are gathered from bottom to top. There are four reasons to explain why it is very difficult for the past technique to solve the problem, such as client/server structure, browser/server structure and cluster structure. @ It has many layers, instead of two, and all servers are connected with Internet. @ Data are distributed but not centralized, and they have been stored in the database of each node of tree structure. All of databases of the whole tree hierarchical structure form a federated database system. These databases may be homogeneous and may also be heterogeneous. @ All nodes are loosely coupled and distributed, and each node is self-existent and autonomous. We may query national population information from the server of central government. We may query city population information from the server of the city too. @ Though all data are dispersed anywhere far away from each other, they have a kind of logical semantic relation of whole-part, e. g. , the data of a province consist of data of all cities of the province. If you want to know some statistical information about a province, you have to sum up all statistical results of all cities. By analyzing the multi-layer tree structure, we can
services. It is the provider of web services for the above parent node, and it is also the requestor of web services for children nodes. The Web Services Dispatcher (WSD) can forward the request of Web Service of above server node to the servers of next layer. Each node of the last layer is only the provider of web services. When the newest statistical data are gathered to the local database of the district (nodes of the last layer), they may not be transferred to the city, the province or the central government in time; for each node of the first three layers, the executing flow of a web service call is as follows: @ Query the local database at first 9 If condition meets return the results to the requestor above Else dispatch the requestor to all nodes of next layer In the solution, it is the request of web services that is muhicast from the top layer of tree to the bottom layer of tree. Furthermore, it is a recursive process. That is to say, is a node of next layer does not meet query condition, the node will dispatch the requestor to all nodes of its next layer until the last layer.
know that the relation between each parent node and its children nodes is similar to the Master/Slave model (task-farming model). The process between two layers is similar to Divide and Conquer of the parallel programming model Ee2, but there are obvious differences. During Divide and Conquer process, a big task will be divided into many small tasks. Generally speaking, it is the data that are divided and transferred. However, during the population census process, data are distributed and stored in the database of each node. Moreover, the process of population census forms a multi-layer structure. To solve the problem, we present a kind of architecture.
2.2 Architecture Web Services are a new technology that promises ease-of-use and interoperability in comparison with previous distributed computing technology such as DC()M, CORBA and RMI, through the use of industry-standard XMI. protocols such as S()AP, WSDI., and UDDI. Web Services are one of the chief means for providing services and implementing information integration and share. ()ur architecture is based on web services. The system architecture is shown in Fig. 2.
2.3 Implementation .
.
.
.
.
.
.
.
.
.
.
.
] WSDI WSI
...
.
.
.
.
.
.
.
.
.
.
.
.
WDS WS
WSD2 WS2
...
WSD3 WS3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fig. 2
Multi-clusterstructureof web services WSI-WS3= Web Service Provider WSD1-WSI)3 : Web Service Dispatcher
Included in the big rectangle is a multi layer tree hi erarchical structure. All server nodes form a virtual server that provides client programs or browsers with web services. For population census information system in China, the first layer stands for the server of the central government. The second layer is the server of all provinces. The third layer is the server of all cities. And the last layer is the server of all districts. In the first three layers of the virtual servers, each node is not only the provider of web services, but also the dispatcher of web
.
We use MS. NET Framework technology and devel op it with C~ language. In Web Services Dispatcher, we asynchronously invoke many XML web service located in many different computers in order to make these computers execute web service at the same time (that is distributed parallel execution). The Web Services Dispatcher design is illustrated in Fig. 3. This figure also describes the task of processing a request from a client to WSD. @ show the client sends a web service request to WSD. @, @ and @ show WSD asynchronously calls remote web service method through proxy. These remote web services are parallel. Every remote web service method has a callback function in WSD. When the remote web service method is completed, the callback function in WSD will be executed (Xz, X:~ and X~ ) and will get the result of web service method. The order of X2, X:~ and X, is not definite. The callback function whose web service method is executed at first will be called at first. When all callback functions are executed, WSD will sum up the results of all remote web service methods (Ye, Y:~ and Y4 ). (Z) showes at last, WSD will return the result to the client.
2.4 Registration and Finding of Web Service We store URI. of remote web service in the (app541
Web Service Call
ol Web Services Dispatcher
![
pro,yA
i i
@---~l
CallbackA L
_
] : '~;
_
X2
A
=
. . . . . . . . . . . . . . . . . . . . . . . .
J
i
Proxy B
Web
i
Y""
CallbackB
i
]--',
i
ProxyC
,
,,
i
i
Y4'
~2~ I
'
Fig. 3
vi
CallbackC I
[........................
Web Service
i
Y21[ !
}+,
I
I
J
[
Service B
--•@[ Web Service
X4
Ell
I
Design of Web Services Dispatcher
Settings) section of the web. config file in WSD. The web. config looks like this: (appSettings) (add key = "WSI" value =''http://Ipl/wS1/wS1. asmx"/) (add key="WS2 '' value="http://IP2/WS2/WS2, asmx"/) (/appSettings) At run time, we will be able to dynamically retrieve URL of web service from the file. Therefore, even if the web service is moved, all one needs to do is change its URL in the web. config file. The WSD program need not be recompiled. In the multiqayer tree hierarchical architecture, every web service must register its web service logical name and URL at the WSD of above server node. In order to improve response time, all our web services are fixed and are statically bound with the requestor, therefore we do not adopt UDDI technology.
Conclusion
Our contribution is that we present the application pattern of multi-layer tree hierarchical structure based on web service. It is a typical application pattern of grid computing because it is a kind of the integration of serv542
References
C
(~) @ : Web Service Call; Xz X~: Web Service return; Yz-Y~: the result of Web Service; Z: return the result to Web Service requestor
3
ices by sharing and collaborating resourcesc~'~~ The main feature of the application is that it is a multi-layer tree hierarchical structure and the command is multicast recursively from top layer of tree to bottom layer of tree and statistical result are gathered from bottom layer to top layer. The multi-layer tree structure of population census is consistent with the structure of administrative department in many countries. Therefore, it has universal significance for many management processes that are similar to population census, such as the collecting of tax, the collecting of GDP (Gross Domestic Product), etc. Therefore, we think that the application pattern has great value of engineering application.
[2]
[3]
[4]
[5]
~6]
Luther A, Buyya R, Ranjan R, et al. Alchemi: A . NETbased Grid Computing Framework and its Integration into Global Grids[R/()L]. [g003 I2-02]. Grid Computing and Distributed Systems Laboratory, University of Melbourne, Australia, htt p : / / zz~,w, alchemi, net/publications, html. Buyya R. High PerJormance Cluster Computing Programming and Applications, Volume 2[M]. Prentice-Hall Inc.
1999. Jin Jingwen, Nahrstedt K. Hybrid Multicasting in I,argeScale Service Networks ~ C ] / / Thirteenth International World Wide Web Conferem'e Proceedings, WW'W2004. New York: Association for Computing Machinery, 2004: I236 1237. Radha V, Gulati VedP, Pu]ari ArunK. Efficient Muhicast e-Services over APPCAST[C]// International CemJerence o~ lnjbrmation Technology : Coding Computing, tTCC 2004. Piscataway:lnstitute of Electrical and Electronics Engineers Computer Society. 2004:331 336. Benatallah B,Dumas M, Sheng Q Z et al. Declarative Composition and Peer-to-peer Provisioning of Dynamic Services [ C ] / / Proc o f the J8 '/' lnt 'l Conf on Data Engineering. San Jose : IEEE Computer Society, 2002 : 297-308. Barak Amnon, Shiloh Amnon, Amax Lior. An OrganizationaI (;rid of Federated M()SIX Clusters [C] / / T h e 5th I E E E International Symposium on Cluster Computing and Grid (CCGrid2005). UK:Cardiff, 2005: 350-357.
[7]
the
Ho Quoc'-'Fhuan, Cai Wentong, Ong Yew-Soon. Design and Implementation of An Efficient Multi-Cluster GridRPC System[C]// The 5th I E E E International Symposium on Cluster Computing and the Grid ( CCGrid2005) , UK: Cardiff,
2005:358-365. [8]
I.iu X. Very Simple. Net Web Service Dispatcher [EB/OL]. [2002-12-20]. h t t p : / / z ~ , codeprojeet, corn [9] Foster I, Kesselman C. The Grid: Blueprint for a Future Computing Infrastructure [M]. New York: Morgan Kaufmann Publishers, 1999. [10] Foster I. What is the Grid.9 A Three Point Checklist[EB/ OL]. [2002 7-20]. http:/ /~aa~x,. g ridtoday, corn.
[]