Title: Algon Reusable Distributed Algorithms in Java
1Algon Reusable Distributed Algorithms in Java
Judith Bishop Basil Worrall Johnny Lo
2Rationale
- Programming distributed applications is hard
- Extra concerns must be dealt with
- Non-determinism
- Contention
- Synchronisation difficulties
3Distributed Algorithms
- Many different algorithms exist for
- Distributed mutual exclusion
- Distributed termination
- Distributed deadlock detection
- Few programmers understand
- how the algorithms work, or
- how to distinguish between them.
4Ideally
- Developers of distributed systems should be able
to - experiment with different algorithms
- choose the best one for their particular system
- easily compare performance and efficiency
5However
- Algorithms are often so bound up with the code
that it is very difficult to substitute another
algorithm - Few programmers have the skills to compare and
evaluate algorithms - Programmers often do not have time for this!
6Palliatives
- Systems exist which illustrate the functioning of
algorithms Ben-Ari Worrall - Libraries of algorithms are provided. Guerraoui
- But ...
- Little assistance is given to users in choosing
and evaluating algorithms
7Separating out the Distributed Algorithm
- Simplify the programmers task by providing
- a library of interchangeable algorithms
- a tool for easily substituting one algorithm for
another without recompiling code - support for critical evaluation of the algorithm
performance
8Example
Application
Classic Algorithm
9Distributing the Algorithm
Application
Classic Algorithm
Distributed Classic Algorithm
Distributed Readers and Writers
10Algon Framework
Application
11Distributed nodes with Algon
Application
Application
Application
Algon Layer
Scheduler
Scheduler
Scheduler
Algorithm
Algorithm
Algorithm
12How to Achieve Separation?
- How to separate algorithmic code from the
application effectively ? - How to make such algorithms easily
interchangeable ? - Determine the unique requirements of the
distributed layer for each family of algorithms ?
13Example Incorporating Algon to achieve
Distributed Mutual Exclusion
Application
read
write
In a centralised site a shared resource is
often controlled by a type of monitor which
grants Read or write access
14Example Incorporating Algon
Replace it here with the Algon layer
Application
read
Algon Layer
write
Site 2
Site 3
15The Nerve Centre The Mutual Exclusion Scheduler
acquireRead() acquireWrite() releaseRead() release
Write() check()
Scheduler
- Tailored to the needs of the distributed
- mutual exclusion family of algorithms
- Communicates with distributed algorithm
- Easily Configurable without recompilation
16Class Diagram Clean interfaces, clear separation
Reader Writer
17Class Diagram Clean interfaces, clear separation
Reader Writer
18Setting up
App
19Setting up
20Relaxing mutual exclusion for Readers/Writers
Reader Writer
Algorithm
21Example Distributed Deadlock Detection
22Example Incorporating Algon to achieve
Distributed Deadlock Detection
Application
Detect deadlock
Algon Layer
Site 2
Site 3
23The Nerve Centre The Deadlock Detection
Scheduler
detectDeadlock()
Scheduler
- Tailored to the needs of the distributed
- deadlock detection family of algorithms
- Communicates with distributed algorithm
- Easily Configurable without recompilation
24Class Diagram Clean interfaces, clear separation
Scheduler
25Setting up resources
Middle Ware Layer
App
Resources
26Setting up
App
Middleware
27Setting up
28Detect Deadlock
Application
Other Site
Other Site
Algorithm
29Evaluation Metrics
- Dynamic Extensibility
- Non-invasive configurability
- Scalability
- Flexibility
- Coupling
- Maintainability
- Substitutability
- Imperturbability
- Comprehensibility
30Future Work
- Identifying metrics for measuring algorithm
performance - Execution time?
- Number of messages exchanged?
- Tailorability eg. Relaxed or stringent mutual
exclusion - System load
31Future Work
- Measuring algorithm performance
- Portraying the performance and efficacy of
different algorithms - Supporting user choice of algorithms
- Fault Tolerance
- Adding distribution changes the failure semantics
- Algon may introduce new types of errors
32In Conclusion.
- Algon provides
- A layered framework
- Various algorithms, wrappers, interfaces in Java
- Schedulers to handle communication
- Algon facilitates the separation of application
code from algorithmic code - Algon addresses the issue of complexity in
distributed systems
33Fin