Information Technology Reference
In-Depth Information
5
Modeling DFS-R with AsmL
The OCaml prototype soon diverged from the implementation, as constraints,
such as database layout changed. It was also inadequate for documenting the
protocol at an abstract, yet suciently faithful level. We therefore turned to
AsmL [9], developed at MSR, for describing the DFS-R protocol. The very read-
able format of AsmL and the integration with Microsoft Word was particularly
useful in our context, as we aimed at a specification which could be read by
newcomers to the DFS-R project. Today the AsmL specification serves as the
main high-level, executable, overview of DFS-R. We will not repeat the detailed
AsmL specification here, as it takes around 100 pages. To give the flavor, Fig.5.
summarizes the data types available per replicating machine.
The AsmL description follows the componentization and protocol design in a
top-down fashion. At the top-level, the design describes the main modules that
comprise synchronizing machines. For the case of DFS-R, this is encapsulated
by a Machine class, which contains the main components.
class Machine
machineId as MachineId // Unique identifier to distinguish machine
var fs as FileSystem // File system interface
var db as Database // Persistent database that DFS-R maintains
var uc as UsnConsumer // Consuming USN records from the NTFS journal
var dw as DirWalker // Walking directories to update the database
var inbound as Map of MachineId to InConnection
var outbound as Map of MachineId to OutConnection
class InConnection
// State relevant for an incoming connection
class OutConnection
// State relevant for an outgoing connection
Fig. 5. Replicating machine in AsmL
5.1
Protocol Description
The AsmL specification elaborates further on fleshing out the contents of the
machine components. The main reactive components that are modeled in de-
tail are the (1) consumption of file system events and their effect on the local
database, and (2) the main synchronization handshakes.
5.2
Test Case Generation
The resulting model is suciently detailed to describe the behavior of DFS-R
based on local file system events as well as distributed synchronization events.
This allows defining virtual networks of machines that can be composed and
simulated within AsmL. In particular, we hooked up the FSM generation tool of
 
Search WWH ::




Custom Search