Paper Menu >>
Journal Menu >>
Journal of Geographic Information System, 2010, 2, 1-5
doi:10.4236/jgis.2010.21001 Published Online January 2010 (http://www.scirp.org/journal/jgis)
Copyright © 2010 SciRes JGIS
A Mechanism of Initiative Transmission to Send
Message on WEBGIS
Xian-gang LUO1,2, Jing PENG1, Zhong XIE1,2
1Faculty of Information Engineering, China University of Geosciences, Wuhan, Hubei, China
2Wuhan Zondy C y ber T
S. Co. Ltd, Wuhan, Hubei, China
Abstract: The paper researched and realized the initiative message transmission mechanism of WEBGIS
server based on the N layer architectur e of Internet. According to WEBGI S application long business op era-
tion as well as server information visualized in client side in real-time features, this article uses the Socket
communication and the client sid e with JAVA Applet to realize that th e WEB server can send message initia-
tive to the client. It comes up and realizes a concrete plan of initiative transmission mechanism in WEBGIS.
We run the realization plan based on Winsock through the project practice of Guangzhou cable TV network
security monitoring and alarm system. The system operation has been verified in system running. The com-
bination of this mechanism with conv entional WEBGIS can greatly improve the performance and the usabil-
ity of WEBGIS.
Keywords: WEBGIS, message, initiative transmission
With the development of Internet technology and the
rising demand of GIS, using Internet publish spatial data
on the Web and providing spatial data browsing, query
and analysis capabilities have become the trend of GIS
development. Furthermore, WEBGIS and controlling
system, mobile location service and real time informa-
tion exchange are more and more closely connected. It is
estimated that 80% information are connected with loca-
tion. It often costs lots of effort in searching some person
or place. To improve the efficiency, location information
has become very important for people. With the devel-
opment of industrial automation, WEBGIS is also used
in real time controlling system, which challenges tradi-
tional information exchange methods and also proposes
higher demands of real-time, security, and timeliness of
information exchange in WEBGIS.
At present, WEBGIS can support the GIS functions in
Internet very well. In addition to basic d isplay and query
functions, many long transaction operations are sup-
ported, such as spatial analysis. Because of the disad-
vantage of HTTP protocol, WEB server can only pas-
sively provide information browsing and can’t send re-
quest to client initiatively. This determines the insuffi-
cient support of long transaction operation in general
WEBGIS. WEBGIS is a development trend of GIS, whi-
ch can display GIS functions in Internet. Besides com-
mon map operations, WEBGIS provides various 1basic
graphic operations, such as, bus transfer, geographical
names information, guiding services, etc. There are two
interactive methods from client and server sides,
1) Client side request, server side receive and process
and sending back result to client side. This method is
often used in basic map operations, such as, zooming,
2) Client side request, server side accept the request
and send back the valid data to client side, the client side
will process data timely and display. This method is
mainly used in part process of spatial analysis.
Most of client exchange system of WEBGIS is rela-
tively passive. Only when client proposes the request,
WEBGIS server will respond to the request, process data,
and send the result to client side, then users can browse
the result graphs or data in browser. For example, if us-
ers want to find the transport routes from place A to
place B, after entering a query condition, the information
will be send to the server side after processing, server
will process the information accordingly and get the re-
levant information from database and the information
will be send back to client side. Client side will display
the relevant information in text or graphs vividly.
1“863” Project: Research and software application of network oriented
3D spatial information service (2009AA12Z211); Special Fundsfor
basic scientific research and application of Central Colleges
X. G. LUO ET AL.
Copyright © 2010 SciRes JGIS
Figure 1. Workflow diagram
2. Propose of Initiative Transmission
Message Sending on WEBGIS
Users only need to operate through browsers in existing
interactive method which makes WEBGIS accepted by
the public. There is one similarity in client interactive
operation, that is, one request and one result received. It
can’t keep the connection with server which reduces the
timelessness of WEBGIS.
With the development of technologies, such as com-
munications, GIS and GPS, WEBGIS has got great pro-
gress these years. Users are not satisfied with the simple
map browsing, and they are more interested in the real-
time geological data. If users want to know the exact
location by mobile phone or wireless network when us-
ing the current WEBGIS interactive approach, firstly,
users need to send a request, and the server can only re-
ply one present or out-dated location informatio n to users
one time. If the users want to get the constant real-time
location information, they have to send the request con-
tinuously. This approach is increased burden of users,
and a better solution sh ould be proposed.
When using the HTTP protocol, the connection of
server and client will disconnect after a communication.
To improve the communication method, this paper pro-
poses using Socket communication approach in research
and realization of initiative messag e sending mechanism.
In the communication process of user and server, the
server can send the real time information to user and
receive the request from user timely. The combination of
this mechanism with conventional WEBGIS can make
the WEBGIS better developed.
The mobile communication and internet are two hot-
pots of information industry, the combination of them
leads to the mobile wireless internet application, and it
will be the important development direction of informa-
tion industry. China has the biggest mobile phone users
group for years, the value added service of mobile phone
based WEBGIS will be popular in many areas, such as
travel, transportation, medical treatment and police. It
will be a very important part of people.
The development of spatial position technology and
mobile communication technology makes fast informa-
tion transformation be possible. Driven by market and
technology, LBS (location based service) development
very quickly, and with the help of mobile terminal and
wireless network, it will determine the exact location and
provide all the location information to users. LBS have
become a hot academic research area.
LBS ensures the future of spatial information service
and blueprint of mobile position service, that is , when
users interact with a model of real world, this model can
dynamically provide different information to various
users in different time and place. When the mobile users
interact with this model, the view of user’s will change
with different users’ role and environment . Spatial
information technology, especially the development and
integration of GIS, GPS, RS, VR and computer graphics
shorten the distance of spatial information and people’s
lives. The development of mobile service can match the
requirement of further socialization and popularization of
The combination of initiative sending message me-
chanism and WEBGIS meets the requirement of real
time communication requirement of LBS, which plays
the linking role. The initiative sending message mecha-
nism uses stream socket approach in TCP protocol wh ich
ensures information accurately sending and its integrity
The main purpose of th is paper is to provide a so lution
to realize Web Server initiative transmission to send
message to client side on WEBGIS.
X. G. LUO ET AL.
Copyright © 2010 SciRes JGIS
3. Key Technology for Initiative Sending
Based on the Initiative sending message mechanism sys-
tem of this paper, the server-side program is developed
in Visual C ++ and the client-side is developed in Java.
The following introduction is the of Socket communica-
tion of Visual C++ and Java. The work ing mechanism of
Applet and Socket are similar with typical client server.
The server will connect third part server, so we uses the
Visual C + +, and client uses Java Applet. The working
steps of Applet and Socket are as follows.
The server needs to establish a socket for monitoring,
after allocating port for the socket, a new client monitor-
ing thread will be established. Client side establishes
socket for connecting servers, then call function to re-
quest the connection with server. After receiving the re-
quest monitored from client socket, server will allocate
receiving function to establish a connecting socket; the
transfer the data between the server and client-browser
by the sockets of server and client. The Server will send
the result data after processing to client; Client Applet
will process data and display the data in browser; at the
same time, Applet will send the control instructions of
client to server, according to the corresponding control
strategies, the server will instruct inputting port of data
connection controlling card change operation status of
controlled object; in the end, client server close socket,
and the server will use close function to disconnect the
Applet connected socket.
4. Initiative Sending Message Mechanism
4.1. Design of Server-side
When received the connect request form client-side, the
primary server will creates threads to ensure independent
connection to multi-client side. To ensure data accuracy,
each thread will send different request to third party
server according to different needs for different data. If
user wants to get current location information, the pri-
mary server will only send result data to user for one
time; after user receives the information, probably the
connection is not closed, but user still needs to send re-
quest for more service. If the user want to know the
transportation route, when user send request to primary
server, the primary server will interact with the third
party server, then the third party sever will sen d informa-
tion of route to primary server in certain time interval;
the primary server will send the information to user. This
is the purpose of the primary server in initiative sending
Multi-threading is to establish communication betw-
een multi-clients. To receive information from the client
side timely, and send data to client timely, we use two
nested loop. One is for receiving real time user informa-
tion, the second one is for real time sending information
and accept third party server data; identify users’ re-
quirements to select sending approach.
The primary sever side design should ensure the fol-
lowing orders, a) to ensure the effective connection of
multi client-side. b) receive client-side data timely and
effectively. c) transfer information from the third party
accurately and timely. d) when the primary server side
are connected with the client side, it can receive the up-
load information from client side and sen d information to
client side freely. e) receive information from the third
party sever, and feed back to client timely. f) inform user
timely when the third party server shutdown
The following diagram illustrates the workflow of
server side. Socket communication is only methods we
using. A more specific solution needs to be provide for
specific operation process. Figure 2 is the main workflow
of server side.
4.2. Design of Client-Side
After client-side Socket established, users choose requi-
red services. According to the types of services, client-
side will send service request to server. Since the long
time receiving data will occupy the main tread, in order
not to affect the WEBGIS basic graph operation, a sub-
thread needs to be established to take charge of data re-
ception. Since the data reception process is not continu-
ous, several loop receive mechanism needs to be estab-
lished to ensure data accuracy and data reception.
The client-side should realize the following functions,
a) start the connection program with the primary server
at any time, and also terminate the communication with
server. b) timely inform user if there is any exception in
communication process. c) user can freely carry out cli-
ent side operation in the course of communication, such
as, graph zooming, roaming, etc. d) receive data infor-
mation from primary server. e) identify whether the pri-
mary server is shutdown, and send back the abnormal
result to user.
If user wants to get the needed data, the first step is to
start the connection with the primary server. The com-
munication between the client-side and server is through
Socket. It’s necessary to establish Socket communication
5. Specific Realiza ti o n an d Application
The detailed initiative message sending mechanism
technology in WEBGIS has been introduced above, and
the internet communication program development on
Windows system is also mentioned. The following in-
troduction is about the remote controlling software plat-
form on TCP / IP-protocol, Guangzhou CATV Network
security monitoring alarm system.
X. G. LUO ET AL.
Copyright © 2010 SciRes JGIS
Figure 2. Workflow diagram on server
Figure 3. Monitoring and warning system structure diagram
Figure 3 is the diagram of remote controlling software
platform on TCP / IP-protocol.
The main function of Ts communications servers are,
communication with information interim server, log
management, server address setting, GSM port settings,
etc. The communication between Ts communication ser-
ver and information interim server adopts Socket. Infor-
mation transfer server is designed in Visual C++ to real-
ize the real-time message receiving and sending. It also
can save and distinguish the connected client side, and
save all the client side landing information; set port and
IP of communication interface and en su re the u sab ility of
X. G. LUO ET AL.
Copyright © 2010 SciRes JGIS
real time communication port.
After receiving message from Ts communication ser-
ver, transfer sever will analyze the message according to
the “GIS Communications News norm” and get the type
of message. When received the alarm information, it will
parse out the alarm monitoring machine number, alarm
time, alarm type, alarm channels, etc; the alarm data ta-
ble and history alarm data table will be written; when
received discharge alarm message, all the information in
the alarm data table will be deleted; it will also inform
user to update the information.
This paper discussed key technology of network com-
munication and proposed the detailed program on reali-
zation of initiative message sending mechanism on
WEBGIS. The Guangzhou CATV Network security
monitoring alarm system is designed based on Winsock
which has proved the feasibility of this program.
This paper has discussed the following from theory
and practice two aspects.
1) specifically introduce application and development
trend of WEBGIS. The combination of initiative mes-
sage sending mechanism and conventional WEBGIS will
foster WEBGI S de vel o pment.
2) explain specifically the principles of socket com-
munication mechanism, as well as the implementation
process of communication.
3) specifically analyze the fram ework and workfl ow of
initiative message sending mechanism on WEBGIS, and
also propose detailed design program.
4) realize coding of initiative message sending mecha-
nism server and client side server, which ensures infor-
mation timely exchange.
5) successfully apply the research to practical project.
Due to time limits, this paper only studied the initia-
tive message sending mechanism and simulated informa-
tion interactive process. As to how to integrate to the
conventional WEBGIS, and display it in digital maps
hasn’t been realized yet. Furthermore, data transmission
doesn’t involve complex data transmission security
problem, so it has deficiency in data security. All of
above problems are the key filed that needs to improve-
ment in the near future. With relevant technology devel-
opment, we fully believe that WEBGIS will do better.
 Wu Xincai, etc Principle and Method of Geographic In-
formation System, Electronics Industry Press, March,
 Luo Xiangang, XieZhong, Wu Liang and so on, Research
and Realization of WEBGIS Based on Module, ASP and
Java Applet, Computer Project and Design, 11th issue,
 Tian Guoliang, Domestically GIS Application Demon-
stration Project [J], China Image and Graph Journal (Ap-
plication Edition), 2001, 6(9):9-10.
 Xu Chunjie, Zou Lejun, Shen Xiaohua. Application in
WEBGIS of GML [J] Remote Sensing Information, 2002,
 Zhou Wensheng. Research of WEBGIS Based on SVG
[J]. China Image and Graph Journal, 2002, 7A
 Yu Tao, Yu Lizhong, Wang zheng. Development and Ap-
plication of GIS Technology under the Motion Computa-
tion Environment, Survey Notification, 2002,(2):40-42.
 Zhou Yantao, Li Liming, "Network Programming Tech-
nology and Its Realization under TCP/IP Agreement",
Aeronautical Computation Technique, 2002, 9.Vol.32,
 [US] Richard Stevens, "TCP/IP Explains in detail", Sec-
ond Volume, Beijing: Mechanical Industry Press, 2000.
 Cai Hui, Ding Xiaoqun and so on, Application in Distri-
butional Electrical Network Supervisory System of Net-
work Programming Interface, Computer and Moderniza-
tion, 2000, No.4.
 Li Liping, Winsock Network Communication Program
Design Based on VC++, Vol.16-No.6, Junior College
Journal of Guangxi Youjiang Folk, 2003.12.