Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Project code in visual Studio Console application and class library

The PADI project aims at implementing a simpli ed distributed software transactional system.

1 Introduction

The goal of this project is to design and implement PADI-DSTM, a distributed system to manage data objects that reside in memory and can be shared by transactional programs that execute in di erent machines. This will be a simpli ed version of a Distributed Software Transactional Memory System[5, 2, 3].

To simplify the work, and make the project doable in the timeframe available for the project, the applications will only share a particular type of object, of type PadInt, that stores an integer that can only be accessed b y well de ned read and write methods.

The work will start b y writing a paper describing the solution . and only then should the system be developed sequentially in phases .

2 Architecture

The architecture of the PADI-DSTM includes a centralised master, a variable number of servers (that store data objects), and a variable number of clients that concurrently access one or more data objects transactionally. The clients run applications that are linked to the PADI-DSTM library and that access shared objects stored at the servers. Each server stores a set of shared objects. The servers' interfaces are identi ed b y a URL in the format "tcp : == < ip address >:< port > =Server". The students are free to implement the library as they wish; in particular, the implementation of the library methods may communicate with the centralised master if needed. Still, for scalability, the implementation should strive to use decentralised solutions as much as possible, such that the centralised master does not become a bottleneck.

The students may assume that the centralised master is always running and that it does not crash. Students may also assume that clients do not crash in the middle of the execution although they will terminate when the application reaches its end. Also, when testing and debugging the system they may assume that the master is launched before the servers. If a server does not nd the master active it is not required to provide service.

3 The PADI-DSTM Library

The library to be created b y the students is linked to each application that uses PADI-DSTM.
The library exports a set of methods that provide access to PADI-DSTM:

 bool Init(): this method is called only once by the application and initializes the PADI-DSTM library.
 bool TxBegin(): this method starts a new transaction and returns a boolean value in-dicating whether the operation succeeded. This method may throw a TxException. A TxException should include a string indicating what caused the exception.
 bool TxCommit(): this method attempts to commit the current transaction and returns a boolean value indicating whether the operation succeded. This method may throw a TxException.
 bool TxAbort(): this method aborts the current transaction and returns a boolean value indicating whether the operation succeeded. This method may throw a TxException.
 bool Status(): this method makes all nodes in the system dump to their output their current state.
 bool Fail(string URL): this method makes the server at the URL stop responding to external calls except for a Recover call (see below).
 bool Freeze(string URL): this method makes the server at URL stop responding to external calls but it maintains all calls for later reply, as if the communication to that server were only delayed. A server in freeze mode responds immediately only to a Recover call (see below), which triggers the execution of the backlog of operations accumulated since the Freeze call.

 bool Recover(string URL): this method makes the server at URL recover from a previous Fail or Freeze call.

The library also mediates the interaction with the shared distributed objects. Basically, it o ers primitives to create a shared object and to obtain a reference to a shared object that was previously created. Each object is uniquely identi ed by an integer id. For simplicity, we assume that all shared objects are of type PadInt. The methods exported by the library regarding the local object manager are the following:

 PadInt CreatePadInt (int uid): this method creates a new shared object with the given uid. Returns null if the object already exists.
 PadInt AccessPadInt (int uid): this method returns a reference to a shared object with the given uid. Returns null if the object does not exist already.
Each shared object can only be accessed in the context of a valid transaction. For this purpose, an object of type PadInt exports two di erent methods:
 int Read(): reads the object in the context of the current transaction. Returns the value of the object. This method may throw a TxException.

 void Write(int value): writes the object in the context of the current transaction. This method may throw a TxException.
A transaction may abort as a result of a read or write operation. In this case a TxException exception is triggered, whose internal contents (e.g. a string) should help in describing the cause of the transaction abort. Additionally, TxException exception should be triggered with informative string if somehow the input is considered invalid.

4 Consistency

The system should provide sequential consistency. The students should refer to the classes and to the bibliography of the course for the details of this consistency model[1, 4].

5 Fault Tolerance (optional)

The students must rst implement a version of the system that is not required to tolerate faults. If, and only if, this version is operating correctly should the students consider implementing a fault-tolerant version of the system. The fault-tolerant version is only required to tolerate the failure of a single server node. Clients are assumed never to fail.

In the fault-tolerant version of the system each data object must be stored in at least two di erent server nodes. Also a server node should be able to crash without blocking or compromising the consistency of the data, i.e., if a server node crashes during the execution of a transaction the atomicity must be preserved: either the transaction commits before the crash and the updates will be visible to the other servers, or the server node fails before the transaction commits and none of the updates of the interrupted transaction become visible.

Furthermore, whenever a server node commits a transaction, the updates must have been replicated (and ready to commit) at least in another server node, such that the results of the transaction survive a potential failure.

Attachment:- Project Visual Studio.zip

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9370540

Have any Question?


Related Questions in Programming Language

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As