Y. ZHANG ET AL. 35
cannot transmit them directly at the same time. Therefore,
the middleware creates a cache folder in the local server,
which is used to save th e received messages temporarily,
and transmit them from here as soon as immediately. The
establishment of cache folder is automatic and immediate,
that is, a message is automatically saved in the temporary
folder when sent to this middleware, and its forwarding
and query are both from here.
3.2. XML Format Messages
If the identifiable message formats of various devices are
not the same, a destination must translate data from
source terminals into a format that it can understan d, and
the translation process will cost a lot of system resource.
So the messages within network are all defined in XML
format, which simplifies the complexity of the transmis-
sion and exchange [4]. The XML file is represented by
some hierarchical elements. An element is defined by a
pair of tags, called the start and end tags. Content be-
tween the pair is the element body, which may contain a
set of child elements. The unified-format message is not
only easy to be transmitted, but also conveniently parsed
out according to certain rules when arriving at destina-
tion, and the message itself will not be changed.
3.3. Loose Coupling
This middleware is loosely coupled with other devices,
that is, it has no knowledge of other separate devices’
definitions. Devices and the middleware do not know
each other’s working process, and the communication
between them is completely achieved by the messages
[5]. As long as the message accords with the structure
regulation, the clients’ requests or the servers’ feedback
service can be realized. Also, should the receiver appli-
cation fail for any reason, the senders can continue unaf-
fected, as the messages they send will simply accumulate
in the message queue for later processing when the re-
ceiver restarts. Loosely coupling middleware platform
can make full use of existing system resource and con-
struct flexibly and effectively. Under the premise of no
more than the equipment load, the middleware can access
a large number of devices, in order to meet the require-
ment of large communication networks; it also can pro-
vide a powerful global informatio n organization al ability,
to reduce the error rate of the network.
3.4. Real-Time Transmission and Real-Time
Response
This middleware uses the UDP protocol to transmit mes-
sages. UDP uses a simple transmission model without
implicit handshaking dialogues for providing reliability,
ordering, or data integrity, that is, a kind of connec-
tionless-oriented data transfer protocol [6]. Compared
with TCP, it has higher transmission efficiency, and is
more applicable to the real-time system. Also, UDP's
stateless nature is also useful for terminals answering
small queries from huge numbers of clients. And it sup-
ports packet broadcast (sending to all on local network)
and multicasting (send to all subscribers), which app ly to
the system with various message types and large trans-
mission capacity.
3.5. Persistent Messages Guarantee Reliable
Transmission
As we know, UDP provides an unreliable service and
datagram may arrive out of order, or go missing without
notice. Therefore, both the sending devices and the mid-
dleware itself, use the programmable interval timer (PIT)
when sending messages. The timer’s interval is set as the
repeat sending time of message, so the same message can
be sent periodically after the timer starts, until the re-
ceivers return a finishing flag, then an interrupt is trig-
gered, and the next message can be transmitted. As a
result, a small amount of message loss will not affect the
information transmission.
4. Architecture of the Middleware
In this communication network, each device can be used
as a message sending or receiving terminal. These ter-
minals are able to widely listen for the location informa-
tion, their own state information, and the unexpected
information in emergency, and then transmit the infor-
mation to this middleware periodically. The middleware
will send them promptly, so as to ensu re that the destina-
tion terminals can receive updated information. The key
architecture of the middleware is shown in Figure 2.
Accurate and timely sending and receiving of mass
data is still the main problem the communication mid-
dleware faced with. To solve the problem, the technology
of “buffer pool” is used in this article, combined with
multicast to send and receive messages [7]. It contains
three key services as follows:
Database
…………
Figure 1. The achitcture and data flow of the communica-
tion network.
Copyright © 2013 SciRes. CN