程序代写案例-S4635293
Project plan
Caiming Pang
S4635293
Communication Paradigm
RMI is a ‘client-server’ and ‘point to point’ communication model, it is suitable for the
transmission of information by a specified route. Publish/Subscribe (P/R) is a ‘multiple to
multiple’ communication model, which means publishers publish the information ‘intermediary
agency’ with different label or topic, then this ‘intermediary agency’ will automatically forward
messages to subscribers based on the topic which subscribers registered for.
Below is the relation schema of all components, shown as Figure_1.
Figure_1
Arro
w
Num
.
Sending
Compone
nt
Receive
Compone
nt
Communication
Paradigm
Brief
description
of the
communicati
on taking
place
Message
Parameters
Return Value
1 User
Interface
All Sensor RMI- Because
for single
transmission,
User
Interface
tell All three
Username:

void
RMI is simple sensors
who login
2 All Sensor Context
Manager
Publish/Subscri
be – Because
each user has
their own
sensor, so AS
should send
information
based on
register name
All Sensor
send
humidity
and noise
information
to Context
Manager
for each
user
[Humidity,
Time]: int>
[Noise, Time]:

Register_Na
me:
3 All Sensor Location
Server
Publish/Subscri
be – Because
each user has
their own
location
information
based on
register name
Location
Sensor send
the location
information
to Location
Server for
each user
[Location,
Time]: int>
Register_Na
me:
4 Location
Server
Context
Manager
Publish/Subscri
be- Because
different users
location has
different
location
mapping based
on register
name
Location
Server send
each user’s
location
mapping to
Context
Manager
[Status,
Location
Coordinates]:

Register_Na
me:
5 Preferenc
e
Repositor
y
Context
Manager
RMI – Context
Manager just
need this
information to
store and
analyses
Preference
Repository
send user’s
information
such as
humidity
threshold,
interest
place, etc.
to Context
Manager
[Name,
Hearing
Condition
Type, Pref]:
string, string,
string, string,
string, string>
void
6 Weather
Alarm
Context
Manager
RMI – All users
use one
weather file
Weather
Alarm send
the weather
information
Weather:

void
to Context
Manager
every 30
seconds
7 Context
Manager
User
Interface
Publish/Subscri
be – Each user
just needs the
information for
themselves by
register name
Context
Manager
send
suggest
information
and
location
information
to user
Interest entire
information;
Suggestion:
Warning,

detected, the
current is
(% ).
Current
location:
Suggest
ion - please go
to an indoor at
one of these
locations:
.
Register_Na
me:
Start Order
Context Manager, [Weather Alarm, Preference Repository], Location Server, All Sensor, User
Interface.
Because Context Manager is the component to store and process data, so it should be started
first, then Weather Alarm and Preference Repository are two component which store public
information, so they start at second. Location Server need the data from Location Sensor which
belong to All Sensor, and All Sensor only start when user input their name by User Interface.
Exit Order
User Interface, All Sensor, Location Server, [Weather Alarm, Preference Repository], Context
Manager.
All components are service to users, so when all user exit, other component can be stopped.
Then the reason of exit order is same as the reason of start order shown above.

欢迎咨询51作业君
51作业君 51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: ITCSdaixie