Figure 2: X overlapsY relation and its logical mapping
A →
I
(C|||D) →
I
B.
that for every pair, x
−
→ y
−
or x
−
||y
−
at all times.
Once the X and Y intervals are identified, the model
segments each pair into four subintervals, A, B, C
and D (see Table 1). We now proceed to construct
the general causal structure S = A →
I
W →
I
B,
where W determines if overlaps exist between the
present pair. For example, for the overlaps relation
defined in (Allen, 1983), the logical mapping is equal
to A →
I
(C|||D) →
I
B (See Fig. 2). Our model
defines five possible logical mappings (Table 2, right
column), which we call: precedes, overlaps, ends,
starts, and simultaneous. These five logical mappings
are sufficient to represent the thirteen relations estab-
lished in (Allen, 1983). As shown in Table 2, we are
now able to express every possible temporal relation
by only considering the interval happened-before re-
lation and the interval simultaneous relation.
2.5 Synchronization Mechanism
Our synchronization mechanism carries out two
main functions that allow the continuous media to be
presented according to the temporal model previously
presented. The first function makes the translation of
temporal relations (logical mappings), and the second
function ensures the presentation of the intervals
(data segments) according to the resultant logical
mapping.
In order to carry out the temporal synchroniza-
tion, our mechanism, which is based on the resultant
logical mapping, determines if an interval must begin
to be delivered or not according to whether it satisfies
or not its causal dependency. For example, in Figure
2, interval A precedes interval D. Therefore, interval
D will not begin to be delivered until all messages
of A have been delivered. When the intervals are
simultaneous in this case, C and D, the messages of
C can be delivered in any order with respect to the
messages of D.
General description. Internally, the mecha-
nism uses two kinds of ordered messages: causal
messages and FIFO messages. We have three differ-
ent causal messages: begin, end, and cut. The begin
and end messages are the left and right endpoints of
the original intervals, and cut is a control message
used by the mechanism to inform about an interval
segmentation. FIFO messages (fifo
p) are used
only inside an interval. We note that all causal and
FIFO messages carry data of the continuous media
involved. In order to ensure the causal order delivery
at an interval level according to Definition 6, our
algorithm uses vector clocks (Fidge, 1989) and the
immediate dependency relation (IDR) (Pomares et.
al, 2004). We use the IDR relation to determine the
sufficient causal control information that must be
attached per message. Next, we describe the main
components of the mechanism.
2.6 Data Structures
Local states. The state of a process p is de-
fined by three data structures: V T (p), CI(p) and
last
fifo(p).
• V T (p) is the vector time. For each process p there
is an element V T (p)[j] where j is a process identi-
fier. A process can only send one message at a time.
The size of V T is equal to the number of processes
in the group. The element V T (p)[j] represents the
greatest number of messages of the identifier j and
“seen” in causal order by p. It is through the V T (p)
structure that we are able to guarantee the causal
delivery at an interval level.
• CI(p) is the control information structure. It is
a set of entries c
k,t
= (k, t) where (k, t) is a mes-
sage identifier (the message diffused by the process
identifier k with the local message clock value t).
Structure CI(p) also contains information about
the causal history of p.
• last
fifo(p) is the fifo control information
structure. It is a structure composed by a set of
entries (k, t), where (k, t) is a message identifier.
The last
fifo structure has information about
the last (f if o
p) messages received by p. These
(fifo
p) messages represent potential causal
messages.
Messages. The mechanism uses causal messages
(begin, end, cut) and FIFO messages (f if o p). A
message m, in general, is composed of an iden-
tifier (k, t), an attached causal information H(m),
and continuous media data in the structure called
data. For f if o p messages, structure H(m) is al-
ways H(m) = ⊘. Formally, a message m is a tuple
m = (k, t, T P, H(m), data), where:
• k is the identifier of sender k = Src(m).
• t = V T (p)[k] is the (local) clock value of p for the
identifier k when a causal message m (begin, end,
A TEMPORAL SYNCHRONIZATION MECHANISM FOR REAL-TIME DISTRIBUTED CONTINUOUS MEDIA
305