Information Technology Reference
In-Depth Information
This definition starts limiting the agents of the property to
Client
and
Agency
.
The second part of the definition gives the conditions that verify the property.
We use the function
pos
(
ev, log
)
that maps every event
ev
and log
log
such that
ev
∈
events
(
log
)
, into the position of
ev
within the sequence
content
(
log
)
.
4 Log Functions
Like others frameworks dedicated to distributed systems we provide some func-
tions for manipulating distributed logs. The functions presented here are based
in the well known relation “happened-before” introduced in the early work of
Lamport [14].
4.1 Log Extraction
The function
extract
allow us to obtain information contained in a log file con-
cerning a certain group of agents.
Definition 1. (function
extract
)
The partial function
extract
:(
F
(
AGEN T
)
×
LOG FILE
)
→
LOG FILE
maps every pair
(
ags, log
)
such that
ags
⊆
agents
(
log
)
,into
log
ext
with
log
ext
having the following properties:
1.
agents
(
log
ext
)=
agents
(
log
)
2.
events
(
log
ext
)=
{
ev
|
ev
∈
events
(
log
)
∧∃
(
ag
1
,ag
2
,ac
)
.
(
ag
1
∈
agents
(
log
)
∧
ev
=(
Send,ag
1
,ag
2
,ac
)
∨
ev
=(
Rec, ag
2
,ag
1
,ac
))
}
3.
∀
(
ev
A
,ev
B
)
.
(
ev
A
∈
events
(
log
ext
)
∧
ev
B
∈
events
(
log
ext
)
∧
pos
(
ev
A
,log
ext
)
<pos
(
ev
B
,log
ext
)
⇒
pos
(
ev
A
,log
)
<pos
(
ev
B
,log
))
The last two properties of Definition 1 respectively state that the extracted log
(
2.
) contains all events that represent messages sent or received by the agent in
ags
and (
3.
) respects the order of events in
log
. In the rest of this paper we use
extract
ags
(
log
)
to denote
extract
(
ags, log
)
.
Example 6.
(application of
extract
) Let us imagine the variable
log
∈
LOG FILE
representing the log of
Client
and
Agency
for the scenario de-
scribed in Figure 3:
log
=(
{
Client, Agency
}
,
[(
Send, Client, Agency, Request
)
,
(
Rec, Client, Agency, Request
)
,
(
Send, Agency, Bank, Debit
)
,
(
Rec, Bank, Client, Justify
)])
Then, we can use
extract
to obtain the events performed only by
Agency
:
extract
{Agency}
(
log
)=(
{
Agency
}
,
[(
Rec, Client, Agency, Request
)
,
(
Send, Agency, Bank, Debit
)])
.
Search WWH ::
Custom Search