Anda di halaman 1dari 5

1 Introduction

[1] Corfu is a consistency platform designed around the abstraction of a shared log. It
offers powerful features like:
Objects are in-memory
Highly available data-structures
Providing linearizable read/write operations
Strictly Serializable Transactions
ACID guarantees at Scale

2 Basic Concepts
In this section, we define and discuss some of the general concepts required for a clear
understanding of the proposed approach.

2.1 Online Transaction Processing


Online Transaction Processing(OLTP) [3] is a class of programs capable of supporting
transaction-oriented applications on the internet.OLTP systems are decentralized and
avoid single point failure. They help in concurrent transactions. They have simple queries
and have sub-second response times.

3 Todays Architecture

Figure 1: Todays Data Technology

1
In todays distributed software arena. services require to store and manipulate very large
state and process data at extremely high throughput, and many services are built to
scale-out across large clusters. Unfortunately, distributed software developers are faced
with a plethora of tools for managing a variety of ingredients: data-placement; location;
ownership and fail-over; consistent snapshot; checkpoint and recovery; multi-object func-
tionality; and distributed caching. At their core, all of these tools need a log, in order
to order and persist a history of updates to state. They need tools for querying and
modifying the state efficiently and conveniently.

4 Corfu Components

Figure 2: Corfu Components

4.1 Corfu Infrastructure


Corfu Infrastructure is the Server management program which is responsible for the ex-
tended log management. It is responsible for lock management and scaling up of data
servers. The log is a source of persistance which actually stores every operation as an
entry into the log.

4.2 Corfu Runtime


Corfu Runtime is client side application. It connects to the infrastructure and is respon-
sible for maintaining the data structures in memory. It is responsible to serialization and
deserialization of an object being persisted in the Corfu Log. It syncs the current state
of the databse from the infrastructure and stores the object in-memory in a HashMap.

5 Transactions
The transaction in corfu consists of multiple state machine changes on one or more objects.
A transaction is categorized by 3 components.

2
Execution: It describes what the transaction should do. This is the code that
expresses the transaction.

Read-Set: It describes the objects and its version which are read during transaction
execution.

Write-Set: It describes the modifications that the transaction has made during
execution.

The ACID properties that guide any database can be defined as:

Atomicity: Atomicity is statisfied if the write set is indivisible. i.e other clients
view the entire write at once or it is not seen

Consistency: It is satisfied if the read set of transaction shows writes set of


any other transaction that have been commited by other clients before the current
transaction.

Isolation: It is satisfied if the write-set of a transaction is not visible to read-set


of any other transaction.

Durability: It is satisfied if the write-set of a committed transaction never lost.

Corfu has got additional properties , generally not provided by standard transactional
implementations:

Read own writes: During the execution of a transaction, a read will reflect any
writes in that transactions own write set.

Opacity: Transactions are not allowed to see an inconsistent state, even if they
abort and do not commit any changes.

6 Working
The corfu runtime helps in connecting to the infrastructure. The CorfuDB is based on
shared log and state machine replication. Every client has its own Corfu Runtime present.
Whenever a Corfu Runtime client come up for the first time, it syncs the state with the
Infrastructure. The state is generated by replaying of log entries. The operations of
insersion into the database is very simple as it is based on HashMap operations.

3
7 Statistics
The statistics are based on the SMR Map of CorfuDB. All the values are average of 10000
entries in corfuDB.

Operation Time(ms)
Put Operation 7.0
Get Operation 1.445
KeySet Operation 0.8
Values Operation 0.8
EntrySet Operation 0.57
Contains Key Operation 1.5

*All values are in milliseconds(ms)

Table 1: Query Analysis

8 Conclusion
In this work, the working of distributed database systems was studied with the help of
CorfuDB. First we created objects of different types and ingested them into Corfu. Then
based on diffferent operations available metrics were recorded. Corfu makes it very easy
for noivice users to handle database as it works on the principle of basic map. All the
different operations in a HashMap behave the same way and they internally work with
corfu runtime. Hence map gives an abstraction over the internal complexities of the
system.

4
References
[1] Dahlia Malkhi,MAHESH BALAKRISHNAN,JOHN D. DAVIS, MICHAEL WEI, TED
WOBBER : CORFU: A Distributed Shared Log, November 23, 2013, TOCS3104-10.

[2] CorfuDB Documentation, https://github.com/CorfuDB/CorfuDB

[3] OLTP Basics, https://en.wikipedia.org.