[
Back ]
-- latest-ail.rpd
-- michael chen
-- august 9, 1996
-- revised by Holly, 08-09-96
type Action_Type is enum Add_Node, Delete_Node, Document_Request,
Request_Advice, New_Inquiry_Diagram, List_Inquiry_Diagram,
Open_Inquiry_Diagram, Add_Edge, Update_Node, Move_Node,
Delete_Edge, Exit_Diagram, Reference_This end;
type URL_Type is integer;
type RType is integer;
type PRate is integer;
-- client modules
type WebBrowser is interface
action in Get_URL(), Ref_This(), In_HTMLPage();
out Doc_Request(A : Action_Type), Out_HTMLPage(),
Ref_Request(A : Action_Type);
behavior
begin
Ref_This() ||> Ref_Request(Reference_This);;
Get_URL() ||> Doc_Request(Document_Request);;
In_HTMLPage() ||> Out_HTMLPage();;
end WebBrowser;
type JavaTools is interface
service COL : dual Concepts_Of_Operation_Layer;
action in In_Advice(), In_Response(R: Response_Type);
out Request(A : Action_Type), Out_Advice(),
Out_Response(R : Response_Type);
behavior
begin
COL.AS.request_advice ||> Request(Request_Advice);;
COL.IDA.add_node ||> Request(Add_Node);;
COL.IDA.new_inquiry_diagram ||> Request(New_Inquiry_Diagram);;
COL.IDA.list_inquiry_diagram ||> Request(List_Inquiry_Diagram);;
COL.IDA.open_inquiry_diagram ||> Request(Open_Inquiry_Diagram);;
COL.IDA.add_edge ||> Request(Add_Edge);;
COL.IDA.update_node ||> Request(Update_Node);;
COL.IDA.move_node ||> Request(Move_Node);;
COL.IDA.delete_node ||> Request(Delete_Node);;
COL.IDA.delete_edge ||> Request(Delete_Edge);;
COL.IDA.exit_diagram ||> Request(Exit_Diagram);;
In_Advice() ||> Out_Advice();;
(?R in Response_Type) In_Response(?R) ||> Out_Response(?R);;
end JavaTools;
type Client is interface
service COL : dual Concepts_Of_Operation_Layer;
action out WebStartup(), JavaStartup(),
Server_Request(U : URL_Type; A : Action_Type),
Response(R : Response_Type), HTMLPage(), Advice();
action in In_HTMLPage(), In_Advice(),
In_Response(R : Response_Type);
end;
architecture ClientArch() for Client is
WB : WebBrowser;
JT : JavaTools;
connect
COL.I_S.start_netscape() ||> WebStartup();
COL.IDA.start_belvedere() ||> JavaStartup();
-- The following service connection had to be changed to event
-- connections due to a problem Raptor has with basic connections.
-- COL to JT.COL;
--
COL.IDA.new_inquiry_diagram() ||>
JT.COL.IDA.new_inquiry_diagram();
COL.IDA.list_inquiry_diagram() ||>
JT.COL.IDA.list_inquiry_diagram();
COL.IDA.open_inquiry_diagram() ||>
JT.COL.IDA.open_inquiry_diagram();
COL.IDA.add_node() ||>
JT.COL.IDA.add_node();
COL.IDA.add_edge() ||>
JT.COL.IDA.add_edge();
COL.IDA.update_node() ||>
JT.COL.IDA.update_node();
COL.IDA.move_node() ||>
JT.COL.IDA.move_node();
COL.IDA.delete_node() ||>
JT.COL.IDA.delete_node();
COL.IDA.delete_edge() ||>
JT.COL.IDA.delete_edge();
COL.IDA.exit_diagram() ||>
JT.COL.IDA.exit_diagram();
COL.AS.request_advice() ||>
JT.COL.AS.request_advice();
--
COL.IDA.reference_this() ||> WB.Ref_This();
COL.I_S.get_URL ||> WB.Get_URL();
--
(?A in Action_Type) WB.Doc_Request(?A) ||> Server_Request(1, ?A);
(?A in Action_Type) WB.Ref_Request(?A) ||> Server_Request(2, ?A);
(?A in Action_Type) JT.Request(?A) ||> Server_Request(2, ?A);
--
In_HTMLPage() ||> WB.In_HTMLPage();
In_Advice() ||> JT.In_Advice();
(?R in Response_Type) In_Response(?R) ||> JT.In_Response(?R);
--
WB.Out_HTMLPage ||> HTMLPage;
(?R in Response_Type) JT.Out_Response(?R) ||> Response(?R);
JT.Out_Advice() ||> Advice();
end ClientArch;
-- server modules
type HTTPServer is interface
action in Request(A : Action_Type);
out HTMLPage(), Log_Address();
behavior
begin
Request(Document_Request) ||> HTMLPage() || Log_Address();;
end HTTPServer;
type SessionServer is interface
action in Request(A : Action_Type), Database_Ack(R : Response_Type);
out Response(R : Response_Type), Database_Request(A : Action_Type),
ToCoach(A : Action_Type);
behavior
begin
(?A in Action_Type) Request(?A) ||>
if ?A = Reference_This then
Response(Add_To_InBox);
else
ToCoach(?A);
if not (?A = Request_Advice) then
Database_Request(?A);
end if;
end if;;
(?R in Response_Type) Database_Ack(?R) ||> Response(?R);;
end SessionServer;
type Logfile is interface
action in In_Address();
out Out_Address();
behavior
begin
In_Address ||> Out_Address;;
end Logfile;
type Tracker is interface
action in Address();
end WWWTracker;
type Postgres is interface
action in Query(), Request(A : Action_Type);
out QueryResponse(), Ack(R : Response_Type);
behavior
begin
Query() ||> QueryResponse();;
Request(Add_Node) ||> Ack(Node_Added);;
Request(Delete_Node) ||> Ack(NodeID_Inactive);;
Request(New_Inquiry_Diagram) ||> Ack(New_GraphID);;
Request(List_Inquiry_Diagram) ||> Ack(List_Of_Titles);;
Request(Open_Inquiry_Diagram) ||>
Ack(List_Of_Objects);;
Request(Add_Edge) ||> Ack(Edge_Added);;
Request(Update_Node) ||> Ack(Node_Updated);;
Request(Move_Node) ||> Ack(Node_Moved);;
Request(Delete_Edge) ||> Ack(EdgeID_Inactive);;
Request(Exit_Diagram) ||> null;;
end Postgres;
type Coach is interface
action in QueryResponse(), ToCoach(A : Action_Type);
out DatabaseQuery(), Advice();
behavior
begin
(?A in Action_Type) ToCoach(?A) ||>
if ?A = Request_Advice then
DatabaseQuery();
end if;;
QueryResponse ||> Advice;;
end Coach;
type Server is interface
action in Server_Request(U : URL_Type; A : Action_Type);
out HTMLPage(), Advice(),
Response(R : Response_Type);
end Server;
architecture ServerArch() for Server is
HTTP : HTTPServer;
SESS : SessionServer;
LOG : Logfile;
TRAC : Tracker;
POST : Postgres;
COACH : Coach;
connect
(?A in Action_Type) Server_Request(1, ?A) ||> HTTP.Request(?A);
(?A in Action_Type) Server_Request(2, ?A) ||> SESS.Request(?A);
HTTP.Log_Address ||> LOG.In_Address;
LOG.Out_Address ||> TRAC.Address;
(?A in Action_Type) SESS.Database_Request(?A) ||> POST.Request(?A);
(?R in Response_Type) POST.Ack(?R) ||> SESS.Database_Ack(?R);
(?A in Action_Type) SESS.ToCoach(?A) ||> COACH.ToCoach(?A);
(?R in Response_Type) SESS.Response(?R) ||> Response(?R);
COACH.DatabaseQuery ||> POST.Query;
POST.QueryResponse ||> COACH.QueryResponse;
COACH.Advice ||> Advice;
HTTP.HTMLPage ||> HTMLPage;
end ServerArch;
-- abstract implementation layer architecture
type ail_interface is interface
service COL : dual Concepts_Of_Operation_Layer;
service PB : Pass_Back;
end ail_interface;
architecture ail_arch() for ail_interface
is
C : Client is ClientArch();
S : Server is ServerArch();
connect
-- The following service connections had to be changed to event
-- connections due to a problem Raptor has with basic connections.
-- COL to C.COL;
COL.IDA.start_belvedere() ||>
C.COL.IDA.start_belvedere();
COL.IDA.new_inquiry_diagram() ||>
C.COL.IDA.new_inquiry_diagram();
COL.IDA.list_inquiry_diagram() ||>
C.COL.IDA.list_inquiry_diagram();
COL.IDA.open_inquiry_diagram() ||>
C.COL.IDA.open_inquiry_diagram();
COL.IDA.add_node() ||>
C.COL.IDA.add_node();
COL.IDA.add_edge() ||>
C.COL.IDA.add_edge();
COL.IDA.update_node() ||>
C.COL.IDA.update_node();
COL.IDA.move_node() ||>
C.COL.IDA.move_node();
COL.IDA.delete_node() ||>
C.COL.IDA.delete_node();
COL.IDA.delete_edge() ||>
C.COL.IDA.delete_edge();
COL.IDA.exit_diagram() ||>
C.COL.IDA.exit_diagram();
COL.I_S.start_netscape() ||>
C.COL.I_S.start_netscape();
COL.I_S.get_URL() ||>
C.COL.I_S.get_URL();
COL.AS.request_advice() ||>
C.COL.AS.request_advice();
--
COL.IDA.reference_this() ||>
C.COL.IDA.reference_this();
--
(?U in URL_Type, ?A in Action_Type) C.Server_Request(?U, ?A) ||>
S.Server_Request(?U, ?A);
-- document request connections
S.HTMLPage ||> C.In_HTMLPage;
C.HTMLPage ||> PB.HTMLPage;
-- help request connections
S.Advice ||> C.In_Advice ;
C.Advice ||> PB.Advice;
-- server response to client connections
(?R in Response_Type) S.Response(?R) ||> C.In_Response(?R);
(?R in Response_Type) C.Response(?R) ||> PB.Response(?R);
-- startup responses
C.WebStartup ||> PB.WebStartup;
C.JavaStartup ||> PB.JavaStartup;
end ail_arch;
[
Back ]