JBoss.orgCommunity Documentation

Chapter 1. Overview

Scribble is a simple text based language for describing interactions between multiple parties in the form of a Protocol .

The Protocol notation is intended to provide an abstract description of the communication behaviour, with addtional optional layers being used to describe assertions and other governance related information.

In the world of programming languages, the measure of the simplicity of a language is based on its representation of a simple 'hello world' example. The Scribble Protocol representation of such an example would be:

protocol HelloWorld (role You) {
    You introduces World;
    Hello from You to World;
}

The notation will be explained in more detail in this guide, but basically the protocol is named 'HelloWorld' and is specified with a parameter (role 'You') which defines the role initiating the conversation. The next step is for this initiating role to introduce the other role(s) that it will interact with, which in this case is the role 'World'. The final statement in this example protocol is a single interaction for sending a message of type 'Hello' from role 'You' to role 'World'.

In the following chapter we will explore the main constructs of the protocol notation. Then we will explore a range of examples, before concluding with a brief overview of some more advanced constructs that are still under development.