Chapter 3

Simple Chat Application

3.1. Introduction

This chapter presents a simple chat application.

We will connect this chat application with a reliable transport protocol in a further chapter. The main goal here, however, is to familiarize the reader with the proposed roadmap to be used for the analysis and design of applications and protocols through a simple chat example. The chapter also presents the life-cycle schema to be used in the rest of this book.

We think that this is a representative example of a simple but useful protocol application. In the next chapters, we will model two layers, representing the transport protocol and a basic transmission medium.

3.2. Requirements

Two remote users (User_A and User_B) want to communicate by using a simple chat application. Each user has an instance of the application:

– A user can:

- open a session;
- accept a session;
- refuse a session;
- close a session;
- send data (in order to simplify the example, the data to be sent is a Char String).

– A session can be opened by either User_A or User_B.

– When a user asks the system to open a session, the system sends a message to the other user in order to ask him/her to either accept or refuse the session.

– When a user is asked to accept a session, if no answer is received after a given time, the system will cancel the request and inform the requesting user that no answer was received.

– The system will inform the requesting user of the answer provided by the requested user (either ...

Get Communicating Systems with UML 2: Modeling and Analysis of Network Protocols now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.