Professional Documents
Culture Documents
com
OBJECT COMMUNICATIONS(DAROC)
Contents
1. DAROC Objectives. 1
2. History Of Blackboards. 1
3. Importance Of Blackboard. 2
4. Goals Of DAROC. 2
10. Conclusion. 9
References. 9
www.SeminarsTopics.com
Submitted By,
K.V.Sudheer1,
D. B. Purna Chandra Rao2
Vishakapatnam-530 047
www.SeminarsTopics.com
1
It uses a data-driven technique to schedule pointers have no meaning in the memory
the activation of functional elements. space of distributed machines.
The third objective is that DAROC
uses data-driven activations as opposed to an Functional Elements:
event driven approach. In DAROC, the
data-activation approach is implemented via Functional elements are always created
a list of input conditionals associated with as an abstract data type. In their simplest
each data object in a functional elements form, they consist of a “build” function to
subscription list. When a data object is create and instantiate the DAROC
changed, the input conditional for that data components around the functional element
object is changed in the subscription list. and the FEactivation Function. There are no
The functional element continuously checks data members in this functional element.
the input conditionals of its subscription list
until all have been updated since the last Constraints:
activation.
The final objective of DAROC is to Each functional element and data
provide fault recovery capability via data object consists of a name and an ID field.
replication. The DAROC space that makes The name field is any unique generic name
up the blackboard contains all the state that the user calls the object. The ID, which
information of the system. No state is also unique, is defined internally within
information is to be stored in the functional DAROC and can be used to better describe
elements. the object. The ID field consists of three
parts. It always starts with a ‘/DO’ or a ‘/FE’
5.DAROC: External Architecture to discern between a data object and a
Details: functional element. The next part that is
appended is the local host name, i.e.
Data Objects: east.ece.uci.edu. Finally, there is a dash and
monotonically increasing integer appended
DAROC currently supports data to the name.One final constraint of mention,
objects defined as any standard ANSI/ISO is that of the error manager. Currently there
C++ data type such as integers, floats, are eighteen statically defined error
doubles, characters, and arrays. messages. The error manager in its current
However, these data types must be state can hold up to one hundred error
wrapped in a trivial abstract data class to be messages. All of the data object and
able to be integrated into DAROC. The functional element name and ID constraints
“build” function is part of DAROC and is can be changed in the bblib.h file, and the
used to build and initialize the DAROC error manager can be expanded in the
components around the newly created errorman.h file.
object. DAROC fully supports any abstract
data type the user creates. .Single Writer Rule (SWR):
Data object is stored contiguously in
memory that is to say that compound data DAROC is implemented with a
objects, such as link lists of data objects, and single-writer rule as part of the application
other any other types of a non-contiguous implementation. This simple means that
fashion are currently not supported because only one functional element may write to a
particular data object at all times. There can
2
never be a situation where two different
functional elements may need to write to the The error manager is an attempt to
same data object. By implementing a single provide a consolidated error messaging
writer rule, we eliminate race conditions, system for future DAROC developers and
ambiguity, and complex locking application programmers. The error manager
mechanisms found in other distributed is not intended to be a static entity and
frameworks that allow the capability of should be amended by the programmer.
shared writes. Due to SWR there is a sample call to the error manager
problem of starvation and deadlocking. BBerror.Send(0, "FE::FE()");
The first parameter is the index of the
Initialization of a Data Object: error message to be displayed. The second
parameter consists of a character string.
Data objects have three required
parameters and as many user-defined Garbage Collection within DAROC:
parameters as deemed necessary by the
programmer. DAROC currently deallocates any
Initialization of a Functional Element: memory that was dynamically
allocated for a functional element or data
object along with all pthread mutexes if the
program exits cleanly. The linked lists that
make up the DONAR and FEBAR managers
are also properly deallocated when the
program exits cleanly.
6.DAROC:Implementation Details:
Functional elements have five required
parameters and as many user defined Data Object:
parameters as deemed necessary by
the programmer. When a programmer creates a data
object, they inherit all of the standard
components of a DAROC data object. All
data objects contain a unique ID, which is
set by the system and a name, which is set
by the user. The lock and lockattr data
members are used to lock the data object
during a read or a write to that object.
Updatecount is a monotonically increasing
integer that is increased each time a write
occurs to the data object. This is the
The activation of the functional element parameter that functional elements reads to
does not depend on updates to data objects see if a data object has been updated since
but only on changes in time. The ignore IC its last activation and in turn may need to
parameter must be a 0 or 1, while the activate.
activation delay is any real number greater
than or equal to 0.
DAROC’s Error Manager: Functional Element:
3
Functional elements also have a unique The DONAR acts as a local name
ID defined by the system and a name, which services manager. All data objects that are
is user defined. The status tag is currently created on a node register themselves with
set every time a FE activates and is reset and the DONAR. When a functional element
the end of the activation cycle. needs to find the address of data object it
The timetag and tms data members are sends its request to the DONAR. The
used for the periodic time checks that often DONAR is nothing more than a global link
occur as part of the FE activation. The list of data objects on that particular node. A
ACdelay, stands for activation cycle delay, DONAR node consists of the name of the
this is the time in seconds between data object, its ID, its address in memory
activation cycles, which is set when the FE and a pointer to the next node. The actual
is created. IgnoreIC is another tag set when link list contains all of the standard items
a FE is created. such as a pointer to the first node and last
If this parameter is set to “1” then the node and its size.
input conditionals are ignored and the FE is
periodic is nature. Input is the buffer that FEBAR::
contains the name of all data objects the FE
reads from and needs to have changed to The FEBAR like the DONAR is a link
start its activation. The inputsize and curin list. However, the FEBAR is not a global
are the size and index for this list name services manager. Every functional
respectively. element has its own FEBAR, which it uses
Output is the buffer that contains the to store copies of the data objects that it
name of all data objects the FE writes to at needs to read from to perform its
the end of its activation. The outputsize and computation. It also contains the copies of
curout are the size and index for this list data objects that will eventually be written
respectively. IC is an integer buffer that back to the blackboard. FEBAR node
mirrors the input buffer. consists of the name of the data object, the
When a DO in the buffer list is known address of the data object, and a tag specify
to have changed. The corresponding entry in if it is an input buffer or not. All buffers
the IC buffer is set to “1”. So once the entire with an isinputbuffer set to “0” will be
IC buffer has “1’s” in all of its entries then it written back to the blackboard. The buffer
is time to activate the FE. data member is the storage location of the
DO. The actual l ink list contains all of the
Error Manager: standard items such as a pointer to the first
node and last node and its size. The FEBAR
The error managers data member is retrieves data objects to be operated on
just an array of strings that contain the based on their name. The three main
statically defined messages. Error messages member functions of the FEBAR are
can be called using the send member • FEBARgetbuffer,
function with the appropriate index and any • FEBARoverwritebufferlist and
additional information can passed to the • FEBARpost.
function as a string in the second parameter. The FEBARgetbuffer function
retrieves the data object and passes it to the
user’s application function where it is cast
DONAR::
4
and the data members and functions can data object that the user requests. The data
then be exploited. object request is passed to the FEgetbuffer
The FEBARoverwritebufferlist is an function code, which is still part of the
essential part of the FE activation. This functional element source code.
function finds all the latest copies of data The FEgetbuffer function passes
objects the FE needs and overwrites their control and the request to its associated
old copies of data objects with fresh copies. FEBAR. The FEBAR uses its own
The FEBARpost is another essential FEBARgetbuffer function and calls the
part of the FE activation cycle. The FEpost findDOname, whichsearches through the
function finds all of the data objects in its FEBAR’s link list for the requested data
FEBAR list that is tagged as an output object.
buffer and copies the newly calculated data An error message is generated if no
object back to its blackboard location. Until object is found. If the object is found, the
this function completes, the results of the data object is passed back as a character
calculation are not committed. buffer until it reaches the FEwrap function.
The FEwrap function does not pass the
DO Packaging in the FEBAR object back to the application function as a
Manager: character buffer, but instead casts it as an
abstract DAROC data object type.
Data objects throughout DAROC are
stored merely as character buffers. This FE Activation Cycle:
allows for the simple transfer of objects in
the system and will facilitate replication. The FE handler is the initial point of
When the user operates on data objects control when the FE is created.
in an application function, they are in Assuming the functional element if not
actuality operating on the copies of data periodic based, it will continuously check
objects stored in the FEBAR manager. the data objects in its input list.
Once they all have been updated since
Parsing and Data Object Wrapping: the last activation, the input condition
parameter is set to true and control is passed
Parsing is an essential piece of to the user execution logic which is just the
reducing code complexity. The ‘$’ is used in application function.
DAROC in front of a data object to wrap Once the application function
that object with DAROC code once it is run completes, control is passed back to the FE
through the parser. handler, which subsequently writes back the
All data objects must have the ‘$’ newly calculated data objects to the
parse symbol in front. The code will not be blackboard.
able to be compiled after it is run through There are comments about
the parser if a data object is missing the preconditions and post-conditions in the FE
parse symbol. handler.
This intelligence is currently not in
Retrieval of a Data Object Step by DAROC but most likely will be added in the
Step:: future.
5
Explicit use of the Wrap and Post instance to grab the lock. The other lock in
Commands:: the data object class is not shared among all
data objects but private to that data object
The FEwrap and FEpost functions can only. It is used to lock a data object before a
be called explicitly by the programmer in write begins on the object. Before a
the application function. functional element writes any of its newly
One of DAROC’s primary goals is to computed results back to the respected data
hide the any explicit reading and writing of object it must obtain this lock before doing
data objects. so. Also before a functional element reads
If the user’s programme is an infinite fresh copies into its buffer before it performs
loop then the objects can never be written its computation it must obtain this lock for
back to the blackboard. each data object before the read is allowed.
6
activation cycle before suspending their 8.Hardware and Software Needs::
operations.
Resource Needs:
How are DO’s and FE’s Linked
Together?:: DAROC has been compiled to run on
both Intel’s x86 architecture as well as the
Functional elements maintain a SUN systems at UCI. DAROC was written
subscription list of all data objects in their completely in C++ and uses standard POSIX
data set that they either read or write. Data thread libraries. Therefore, in turn, the
objects also have the ability of maintaining a porting of DAROC code from one platform
list of functional elements that can operate to another should be facile as long as the
on them. C++ and POSIX standards are fully
The current implementation of supported on the platform in question.
DAROC is one in which the functional
elements pull update changes from the Platforms Tested On:
blackboard as opposed to the blackboard
pushing update changes out to the • Linux (with GUI)
appropriate functional elements. Data
• Sun (without GUI)
objects of type “input” are those that are
read only. Data objects of type “output” are
Software Recommendations:
those data object it will write its results back
• Mandrake Linux 9.0
to.
• g++ bundled with Mandrake 9.0
7.Performance and Bottlenecks:: • GTK+ 1.2
There are three components in the
9.DAROC Tool Kit (DTK)::
DAROC architecture that can be a future
source of bottlenecks that result in
performance hits. DAROC currently A tool kit is currently under
is not in a stage of maturity in which development to further increase the
distributed simulations can be performed. programmers ability to rapidly program data
objects and functional elements. The tool kit
DAROC Bottlenecks: will not be static and will continue to grow
• Centralized Name Services to meet the needs of the users as time
progresses. The initial revision of the tool kit
• Blocking Lock Mechanism
will contain three components: the
• Inflexibility of Functional Element
blackboard parser, single-writer rule
Activation’s
checker, and DAROC code nugget
• Copies of Data Objects generator.
Current DTK Components:
Activation Analysis:
The systems specifications are as
• Blackboard Parser: The user runs
follows:
their source code through this utility
• Intel 810 Chipset to wrap their code around the
• GHz celeron processor appropriate DAROC functions and
• 384 MB of memory cast the data objects to their
• Mandrake Linux 9.0 OS respected type.
7
• Single Writer Rule (SWR) Checker: programmer will enter how many data
Within DAROC, data objects can objects it can read or write to as well as the
only be written by a single functional names of these objects, respectively.
element at all times. This rule The programmer can then simply click
eliminates the need for a complex a button and have the code generated for
distributing locking mechanism. The them, with no missing commas, parentheses,
user runs their source code through or other similar syntactical programming
the SWR checker to verify the errors that so often occur. The code nugget
integrity of this rule. Later revisions will be generated in a separate file, so it will
will do this check at run time. be up to the programmer to inject the code
• Code Nuggets: Skeleton code of data pieces into the appropriate segments of the
object’s and functional element's can application.
be created on the fly and be free of
syntactical errors by simply filling 10.Conclusion::
out a specifications form.
Current distributed programming
DTK Rationale: paradigms force communication and
scheduling code into the application code of
The initial tool kit contains three main the program. This method is highly error
components. The first component is the prone due to the complexity of programming
DAROC parser. All FE application source in a distributed environment and leads to
code is first run through this parser before it limited scalability.
is compiled. The parser automatically wraps DAROC, a data-activated middleware
the referenced data objects with the approach whose goal is to ease distributed
appropriate DAROC code and casts the data programming for people who are not
objects to their corresponding data types. distributed systems experts. DAROC is a
The second component is the single writer network transparent environment in which
rule checker. all accesses are seen as local from the
The single writer rule is a main part of programmer’s point of view. Data-activation
the initial DAROC architecture, however no in a loosely based blackboard model
part of the initial architecture prevents the simplifies scheduling while providing a
programmer from breaking this rule. The mechanism for data replication. The
third component is the DAROC nugget code evolving tool kit will also enhance this
creator. simple, yet powerful distributed
All data objects and functional programming environment.
elements the user creates can be built off of
a standard code templateSimple data objects References::
are created by initializing their private
members and calling DAROC’s data object http://projectstopics.com/
constructor. data objects and functional http://www.seminarstopics.com/
elements have their standard lists consisting www.LecturerNotes.com
of which entities they need to communicate
with. programmer will enter things like the
name of the FE, its type, whether it has a
periodic activation or whether it is based on www.LecturerNotes.com
specific data objects. In addition, the
8
www.SeminarsTopics.com
www.SeminarsTopics.com
SeminarsTopics.com is now a true collaboration of the best minds in education,
with more than 1000 students/ Professors, subject experts and editors
contributing to it every day.
Thanks