Science and Technology:

Software engineering, Agile,

UML, MODELING and more . . .

Showing posts with label Modeling. Show all posts
Showing posts with label Modeling. Show all posts

Wednesday, January 28, 2015

The gap between Customer's explanation and his real needs


Have you ever heard about the gap between the Customer's requirements and the point of view of the project team's members?

All the people involved in a software project have heard about the gap between: 
  • Customer explanation
  • Project leader's understanding
  • Analyst's design
  • Developed code
  • Business description


And the unfortunately very common poor software results:
 Project documentation
  • Operation installation
  • Support


In my opinion, one of the most astonishing and even striking differences is between Customer's explanation and his real needs.


My work as Functional Analyst has shown me that very often, the customer doesn't know what he wants or, more precisely, he does not know how to explain it. It gives the opportunity to any unscrupulous marketing agent to sell him any kind of solution.


One of the tasks that I really like is the work with the customer and final users in order to help them representing (or even better, modelling) their needs. All this, in the form of graphical models, requirement specifications, user stories, storyboards, use cases, mock-ups, sketches, etc. This is a a very valuable work since it allows the customer to finely adapt his budget to target:
  • All of the "Must-have" requirements
  • Some "nice-to-have" requirements

We have also heard about these stories where a marketing guy sells something that cannot be developed. Moreover, with a ridiculous delay and price. Then, the dev-team shall deal with all those restrictions and try to do it in the assigned time, quality and budget. A have written a post on Answering to Impossible Requirements.

The following video illustrates some of these problems:
  • Customer doesn't know exactly what he wants
  • Customer requirements are
    • contradictory
    • fuzzy
    • impossible to implement
  •  Marketing agent pushes the expert guy to accept any requirement

        At the end of the sketch, everybody agrees on a "seven perpendicular red lines drown with green ink" project!


I really laugh at the "perpendicularity" question:
        - ....
        - Seven lines, all strictly perpendicular
        - To..... what?
        - eeuuhhh...... to........ everything!
           ....... among ........ themselves !
           I assume you know what perpendicular lines are like !
        - Of course he does! He is an expert!
        -  ...
        - Why are they blue?
        - Indeed, over it was that myself
        - I have a blue pen with me
        - This was just a demonst.....
        - That's the problem, the lines are blue, draw them with red ink
        - That wont solve the problem
        - How do you know before you've tried?
           Lets draw them in red ink then lets see...




Thursday, April 21, 2011

Communicating Systems with UML 2

Modeling and Analysis of Network Protocols



I am very happy to present my book issue of all the work that I have done during my PhD. It deals with the application of a modeling language to a very specific domain: Communication Systems. Some applications of this work can be seen in "Modeling Network Protocols With UML"


David Garduno Barrera, Consultant 

Michel Diaz, LAAS/CNRS, Toulouse, France 

ISBN: 9781848212992 
Publication Date: June 2011   Hardback   320 pp. 
See book description on Editor site: ISTE; John Wiley & Sons

David GARDUNO, PhD. He has worked as consultant for many aeronautical companies such as Airbus and Thalès Avionics. His main duties concerned system modeling and product leading. He has also worked as trainer on system modeling (SysML), Business Process Modeling (BPM), OO Analysis and Design for the European Commission and Astrium, amongst others. He currently works for an intrnational company on electrical systems.

Michel DIAZ, Director of Research at CNRS, editor of twelve books, and 200 publications, Silver Core of IFIP, Senior Member of IEEE, member New York Academy of Sciences, listed in the Who'sWho in Science and Engineering.

Most of the current bibliography on the subject is in the form of scientific papers available in very specialized scientific publications; therefore, they use a complex language and highly technical explanations.

The rest of the literature on the subject is either specialized on teaching UML or on presenting network mechanisms together with the layers of communications protocols.

On the contrary, this book exposes a set of practical examples which can be used either for teaching UML by using protocol examples or for teaching network protocols using UML, leading to a more understandable, and simulation-based approach.

This book gives a practical approach for modeling and analyzing communication protocols using UML 2. It shows how to describe and validate the main protocols issues (as synchronization problems, client-server interactions, layer organization and behavior, etc) in an easy and understandable way. For doing so, the book considers and presents the main traditional network examples (e.g., unidirectional flows, full-duplex communication, error recovering, alternating bit). Finally, it shows the outputs resulting from a few simulations of these UML models.


David GARDUNO

Monday, May 3, 2010

Modeling a Network protocol with UML / SysML




UML is a general purpose modeling language, however there are some areas which are not well explored with this language. Network protocols are a very good example as explained in my book "Communicating Systems With UML 2"

The main tools for network protocol modeling are: Finite State Machines and Petri Networks. A Petri Network for a medium-sized protocol might reach many hundred of states and transitions. These kind of models allow to represent at the same time the communication algorithm and the non deterministic aspect of the subjacent network; however the model might rise incrementally when testing distributed network nodes or when simulating an entire network. Such a model is very hard to create, to analyze, to maintain and to evolve.

UML and SysML are a simple way to model each algorithm, each node and the subjacent network as a different machine.

The following example shows how to use the common diagrams existing in UML and in SysML to represent a very simple network protocol.

The ECHO protocol has the following characteristics:
  1. There are two communicating entities: Client and Server
  2. Client sends one “Hello” message to Server and Server answers with a “Hello_ACK” message
  3. System ends  

Communication Diagram

We can better explain this behavior by using a UML Communication Diagram (this diagram is not available on SysML).



Class diagram / Block Definition Diagram

Then the first step sill be represent each node as a simple class. We can use a Class Diagram (UML) or a Block Definition Diagram (SysML).



Class Diagram: interfaces definition

In a protocol context, we can group the communication messages into groups representing the Sender-Receiver direction. Each set can be represented by an Interface. In this case, we can create two interfaces: Client_2_Server and Server_2_Client. The first interface contains the message Hello_req while the the second interface contains Hello_res.



Class Diagram: ports

The next step is to add a communication port to each node: let’s say P_C (Port_Client) and P_S (Port_Server).
Ports are not very used in the regular software models with UML; however, SysML uses this concept in a more extended way since it defines Standard Ports, Flow Ports and Item Ports..



Required and Provided interfaces

Now, let us associate the previously created interfaces to the Client and the Server classes.
From the point of view of the Client, the Server_2_Client interface is “provided” since it represents the messages that the Client can receive. In the protocols context, the “provided” interface is seen as the input messages set.
In the same way, from the point of view of the Client, the Client_2_Server interface is “required” since it represents the set of messages that the Client asks its communication partners to provide. In the protocols context, the “required” interfaces are seen as the output messages set.
Note that this is the port which is linked to the interfaces. Indeed, in the protocols context, the nodes receive and send messages through the ports, then these are the ports which should be linked to the interfaces:
  *  Realization = required interface
  *  Dependency = provided interface




It is also possible to represent the interfaces in a different way:




Composite Structure Diagram / Internal Block Diagram

Finally, we can connect the nodes through a Channel or Connector by using a Composite Structure Diagram (UML) or an Internal Block Diagram (SysML)


At this point, we have performed the structural modeling of the ECHO protocol. Now, let’s create the behavioral modeling.
First, let’s represent the expected exchange of message between the Client and the Server in a chronological order. For this, we can use a  Sequence Diagram (UML and SysML).


State Machine Diagram

The next step consist in representing the behavior of each node in order to reproduce the expected exchange of messages. For this, we can use an Activity Diagram (UML and SysML) or a State Machine Diagram (UML and SysML). Lets see the Activity Diagram for the Client node:


Activity Diagram

And now the Activity Diagram for the Server node:


Validating and Simulating the model

At this point we have all the elements allowing to represent a simple communication protocol.
The next step, which is, in my opinion, the most important of all, consist in validating and simulating the model. Indeed, in a simple example, as the one that I have represented here, it is not necessary to simulate since it is easy to verify that the proposed Activity Diagrams will effectively produce the expected sequence of messages. On the contrary, for a complex diagram, the validation and simulation of the model will allow to verify:
  1. That all the states have been visited. This way, we can ensure that the is no ‘unexpected’ behavior.
  2. That all the transitions have been fired. This way we can verify that there are no problems such as: Starvation or Dead locks.
  3. That the combined behaviors effectively produce the expected exchange of messages in a chronological order
However, at this moment, I have no license of any of the software programs allowing this kind of simulation.
If somebody know a free program for simulating an Activity Diagram or a State machine, I’ll be glad to know it and to taste it.

Further reading in protocols modeling and simulation

You can see some of my works on protocols modeling in French version, in English version, or as a Slideshow .

David GARDUNO