SlideShare a Scribd company logo
In partitioned databases, trading some consistency for availability
can lead to dramatic improvements in scalability.



Web applications have grown in popularity over the past          reasonably well for data but has several limitations. The
decade. Whether you are building an application for end          most obvious limitation is outgrowing the capacity of the
users or application developers (i.e., services), your hope      largest system available. Vertical scaling is also expensive,
is most likely that your application will find broad adop-       as adding transactional capacity usually requires purchas-
tion—and with broad adoption will come transactional             ing the next larger system. Vertical scaling often creates
growth. If your application relies upon persistence, then        vendor lock, further adding to costs.
data storage will probably become your bottleneck.                  Horizontal scaling offers more flexibility but is also
   There are two strategies for scaling any application.         considerably more complex. Horizontal data scaling
The first, and by far the easiest, is vertical scaling: moving   can be performed along two vectors. Functional scaling
the application to larger computers. Vertical scaling works      involves grouping data by function and spreading func-




             DAN PRITCHETT, EBAY
48 May/June 2008 ACM QUEUE                                                                       rants: feedback@acmqueue.com
tional groups across databases. Splitting data within func-   FUNCTIoNAl PARTITIoNINg
tional areas across multiple databases, or sharding,1 adds    Functional partitioning is important for achieving high
the second dimension to horizontal scaling. The diagram       degrees of scalability. Any good database architecture will
in figure 1 illustrates horizontal data-scaling strategies.   decompose the schema into tables grouped by function-
    As figure 1 illustrates, both approaches to horizontal    ality. Users, products, transactions, and communication
scaling can be applied at once. Users, products, and trans-   are examples of functional areas. Leveraging database
actions can be in separate databases. Additionally, each      concepts such as foreign keys is a common approach for
functional area can be split across multiple databases for    maintaining consistency across these functional areas.
transactional capacity. As shown in the diagram, func-            Relying on database constraints to ensure consistency
tional areas can be scaled independently of one another.      across functional groups creates a coupling of the schema




                        AN ACID ALTERNATIVE




more queue: www.acmqueue.com                                                               ACM QUEUE May/June 2008 49
Availability. Every operation must terminate in an
                                                                intended response.
                                                                Partition tolerance. Operations will complete, even if
                                     AN ACID ALTERNATIVE
                                                                individual components are unavailable.
                                                                   Specifically, a Web application can support, at most,
                                                                only two of these properties with any database design.
                                                                Obviously, any horizontal scaling strategy is based on
                                                                data partitioning; therefore, designers are forced to decide
to a database deployment strategy. For constraints to be        between consistency and availability.
applied, the tables must reside on a single database server,
precluding horizontal scaling as transaction rates grow. In     ACID SolUTIoNS
many cases, the easiest scale-out opportunity is moving         ACID database transactions greatly simplify the job of the
functional groups of data onto discrete database servers.       application developer. As signified by the acronym, ACID
   Schemas that can scale to very high transaction              transactions provide the following guarantees:
volumes will place functionally distinct data on different      Atomicity. All of the operations in the transaction will
database servers. This requires moving data constraints         complete, or none will.
out of the database and into the application. This also         Consistency. The database will be in a consistent state
introduces several challenges that are addressed later in       when the transaction begins and ends.
this article.                                                   Isolation. The transaction will behave as if it is the only
                                                                operation being performed upon the database.
CAP THEoREM                                                     Durability. Upon completion of the transaction, the
Eric Brewer, a professor at the University of California,       operation will not be reversed.
Berkeley, and cofounder and chief scientist at Inktomi,             Database vendors long ago recognized the need for
made the conjecture that Web services cannot ensure all         partitioning databases and introduced a technique known
three of the following properties at once (signified by the     as 2PC (two-phase commit) for providing ACID guaran-
acronym CAP):2                                                  tees across multiple database instances. The protocol is
Consistency. The client perceives that a set of operations      broken into two phases:
has occurred all at once.                                       • First, the transaction coordinator asks each database
                                                                  involved to precommit the operation and indicate
                                                                  whether commit is possible. If all databases agree the
  Data Scaling                                                    commit can proceed, then phase 2 begins.
                    functional scaling                          • The transaction coordinator asks each database to com-
                                                                  mit the data.
                                                                    If any database vetoes the commit, then all databases
                                                                are asked to roll back their portions of the transaction.
         users0         products           trans0



                                                                  Sample Schema
                                                     sharding




                                                                              user                     transaction
         users1                            trans1                        id                           xid
                                                                         name                         seller_id
                                                                         amt_sold                     buyer_id
                                                                         amt_bought                   amount




FIG 1                                                           FIG 2
                                           trans2




50 May/June 2008 ACM QUEUE                                                                     rants: feedback@acmqueue.com
What is the shortcoming? We are getting consistency             availability in a partitioned database, then opportunities
across partitions. If Brewer is correct, then we must be        to relax consistency have to be identified. This is often
impacting availability, but how can that be?                    difficult because the tendency of both business stake-
   The availability of any system is the product of the         holders and developers is to assert that consistency is
availability of the components required for operation.          paramount to the success of the application. Temporal
The last part of that statement is the most important.          inconsistency cannot be hidden from the end user, so
Components that may be used by the system but are not           both engineering and product owners must be involved
required do not reduce system availability. A transaction       in picking the opportunities for relaxing consistency.
involving two databases in a 2PC commit will have the               Figure 2 is a simple schema that illustrates consis-
availability of the product of the availability of each data-   tency considerations for BASE. The user table holds user
base. For example, if we assume each database has 99.9
percent availability, then the availability of the transac-
tion becomes 99.8 percent, or an additional downtime of
43 minutes per month.

AN ACID AlTERNATIvE
If ACID provides the consistency choice for partitioned
databases, then how do you achieve availability instead?
One answer is BASE (basically available, soft state, eventu-
ally consistent).
    BASE is diametrically opposed to ACID. Where ACID
                                                                   The tendency                    of both business
is pessimistic and forces consistency at the end of every              stakeholders and developers is
operation, BASE is optimistic and accepts that the                     to assert that consistency is paramount
database consistency will be in a state of flux. Although
                                                                       to the success of the application.
this sounds impossible to cope with, in reality it is quite
manageable and leads to levels of scalability that cannot
be obtained with ACID.
    The availability of BASE is achieved through support-
ing partial failures without total system failure. Here           information including the total amount sold and bought.
is a simple example: if users are partitioned across five         These are running totals. The transaction table holds each
database servers, BASE design encourages crafting opera-          transaction, relating the seller and buyer and the amount
tions in such a way that a user database failure impacts          of the transaction. These are gross oversimplifications of
only the 20 percent of the users on that particular host.         real tables but contain the necessary elements for illus-
There is no magic involved, but this does lead to higher          trating several aspects of consistency.
perceived availability of the system.                                 In general, consistency across functional groups is
    So, now that you have decomposed your data into               easier to relax than within functional groups. The example
functional groups and partitioned the busiest groups              schema has two functional groups: users and transac-
across multiple databases, how do you incorporate BASE            tions. Each time an item is sold, a row is added to the
into your application? BASE requires a more in-depth              transaction table and the counters for the buyer and seller
analysis of the operations
within a logical transaction
than is typically applied to       Begin transaction
ACID. What should you be            Insert into transaction(xid, seller_id, buyer_id, amount);
looking for? The follow-            Update user set amt_sold=amt_sold+$amount where id=$seller_id;
ing sections provide some           Update user set amt_bought=amount_bought+$amount where id=$buyer_id;




                                                                                     FIG 3
direction.                         End transaction

CoNSISTENCY PATTERNS
Following Brewer’s con-
jecture, if BASE allows for

more queue: www.acmqueue.com                                                                  ACM QUEUE May/June 2008 51
not uncommon, and in fact people encounter this delay
                                                             between a transaction and their running balance regularly
                                                             (e.g., ATM withdrawals and cellphone calls).
                                       AN ACID ALTERNATIVE
                                                                 How the SQL statements are modified to relax con-
                                                             sistency depends upon how the running balances are
                                                             defined. If they are simply estimates, meaning that some
                                                             transactions can be missed, the changes are quite simple,
                                                             as shown in figure 4.
are updated. Using an ACID-style transaction, the SQL            We’ve now decoupled the updates to the user and
would be as shown in figure 3.                               transaction tables. Consistency between the tables is not
    The total bought and sold columns in the user table      guaranteed. In fact, a failure between the first and second
can be considered a cache of the transaction table. It is    transaction will result in the user table being permanently
present for efficiency of the system. Given this, the con-   inconsistent, but if the contract stipulates that the run-
straint on consistency could be relaxed. The buyer and       ning totals are estimates, this may be adequate.
seller expectations can be set so their running balances do      What if estimates are not acceptable, though? How
not reflect the result of a transaction immediately. This is can you still decouple the user and transaction updates?
                                                                                              Introducing a persistent
                                                                                              message queue solves the
                                                                                              problem. There are several
  Begin transaction                                                                           choices for implement-
   Insert into transaction(id, seller_id, buyer_id, amount);                                  ing persistent messages.
  End transaction                                                                             The most critical factor in
  Begin transaction                                                                           implementing the queue,
   Update user set amt_sold=amt_sold+$amount where id=$seller_id;                             however, is ensuring that
   Update user set amt_bought=amount_bought+$amount                                           the backing persistence is
          where id=$buyer_id;                                                                 on the same resource as the




                                                   FIG 4
  End transaction                                                                             database. This is necessary
                                                                                              to allow the queue to be
                                                                                              transactionally committed
                                                                                              without involving a 2PC.
                                                                                              Now the SQL operations
                                                                                              look a bit different, as
  Begin transaction                                                                           shown in figure 5.
   Insert into transaction(id, seller_id, buyer_id, amount);                                      This example takes
   Queue message “update user(“seller”, seller_id, amount)”;                                  some liberties with syntax
   Queue message “update user(“buyer”, buyer_id, amount)”;                                    and oversimplifying the
  End transaction                                                                             logic to illustrate the
  For each message in queue                                                                   concept. By queuing a
   Begin transaction                                                                          persistent message within
     Dequeue message                                                                          the same transaction as
     If message.balance == “seller”                                                           the insert, the information
        Update user set amt_sold=amt_sold + message.amount                                    needed to update the run-
             where id=message.id;                                                             ning balances on the user
     Else                                                                                     has been captured. The
        Update user set amt_bought=amt_bought + message.amount                                transaction is contained on




                                                     FIG 5
             where id=message.id;                                                             a single database instance
     End if                                                                                   and therefore will not
   End transaction                                                                            impact system availability.
  End for                                                                                         A separate message-
                                                                                              processing component will

52 May/June 2008 ACM QUEUE                                                                   rants: feedback@acmqueue.com
into a separate back-end component, you preserve the
          Update Table                                        availability of your customer-facing component. The
                                                              lower availability of the message processor may be accept-
                           updates_applied
                                                              able for business requirements.
                        trans_id
                                                                  Suppose, however, that 2PC is simply never acceptable
                        balance                               in your system. How can this problem be solved? First,
                        user_id                               you need to understand the concept of idempotence. An




FIG 6
                                                              operation is considered idempotent if it can be applied
                                                              one time or multiple times with the same result. Idem-
                                                              potent operations are useful in that they permit partial
                                                              failures, as applying them repeatedly does not change the
                                                              final state of the system.
                                                                  The selected example is problematic when looking
dequeue each message and apply the information to the         for idempotence. Update operations are rarely idempo-
user table. The example appears to solve all of the issues,   tent. The example increments balance columns in place.
but there is a problem. The message persistence is on the     Applying this operation more than once obviously will
transaction host to avoid a 2PC during queuing. If the        result in an incorrect balance. Even update operations
message is dequeued inside a transaction involving the        that simply set a value, however, are not idempotent
user host, we still have a 2PC situation.                     with regard to order of operations. If the system cannot
   One solution to the 2PC in the message-processing          guarantee that updates will be applied in the order they
component is to do nothing. By decoupling the update          are received, the final state of the system will be incorrect.
                                                                                                More on this later.
                                                                                                    In the case of balance
  Begin transaction                                                                             updates, you need a way to
   Insert into transaction(id, seller_id, buyer_id, amount);                                    track which updates have
   Queue message “update user(“seller”, seller_id, amount)”;                                    been applied successfully
   Queue message “update user(“buyer”, buyer_id, amount)”;                                      and which are still out-
  End transaction                                                                               standing. One technique is
  For each message in queue                                                                     to use a table that records
   Peek message                                                                                 the transaction identifiers
   Begin transaction                                                                            that have been applied.
     Select count(*) as processed where trans_id=message.trans_id                                   The table shown in
        and balance=message.balance and user_id=message.user_id                                 figure 6 tracks the transac-
     If processed == 0                                                                          tion ID, which balance has
       If message.balance == “seller”                                                           been updated, and the user
          Update user set amt_sold=amt_sold + message.amount                                    ID where the balance was
               where id=message.id;                                                             applied. Now our sample
       Else                                                                                     pseudocode is as shown in
          Update user set amt_bought=amt_bought + message.amount                                figure 7.
               where id=message.id;                                                                 This example depends
       End if                                                                                   upon being able to peek a
       Insert into updates_applied                                                              message in the queue and
          (message.trans_id, message.balance, message.user_id);                                 remove it once success-
     End if                                                                                     fully processed. This can
   End transaction                                                                              be done with two indepen-




                                                       FIG 7
   If transaction successful                                                                    dent transactions if neces-
     Remove message from queue                                                                  sary: one on the message
   End if                                                                                       queue and one on the user
  End for                                                                                       database. Queue operations
                                                                                                are not committed unless

more queue: www.acmqueue.com                                                                 ACM QUEUE May/June 2008 53
upon which order the messages are processed in, you will
                                                              have an incorrect value for last_purchase. Fortunately,
                                                              this kind of update can be handled with a minor modifi-
                                    AN ACID ALTERNATIVE
                                                              cation to the SQL, as illustrated in figure 9.
                                                                 By simply not allowing the last_purchase time to go
                                                              backward in time, you have made the update operations
                                                              order independent. You can also use this approach to
                                                              protect any update from out-of-order updates. As an alter-
database operations successfully commit. The algorithm        native to using time, you can also try a monotonically
now supports partial failures and still provides transac-     increasing transaction ID.
tional guarantees without resorting to 2PC.
   There is a simpler technique for assuring idempotent       oRDERINg oF MESSAgE QUEUES
updates if the only concern is ordering. Let’s change our     A short side note on ordered message delivery is relevant.
sample schema just a bit to illustrate the challenge and      Message systems offer the ability to ensure that messages
the solution (see figure 8). Suppose you also want to track   are delivered in the order they are received. This can be
the last date of sale and purchase for the user. You can      expensive to support and is often unnecessary, and, in
rely on a similar scheme of updating the date with a mes-     fact, at times gives a false sense of security.
sage, but there is one problem.                                   The examples provided here illustrate how message
   Suppose two purchases occur within a short time            ordering can be relaxed and still provide a consistent
window, and our message system doesn’t ensure ordered         view of the database, eventually. The overhead required
operations. You now have a situation where, depending         to relax the ordering is nominal and in most cases is
                                                              significantly less than enforcing ordering in the message
                                                              system.
                                                                  Further, a Web application is semantically an event-
    Alternate Schema                                          driven system regardless of the style of interaction. The
               user                    transaction            client requests arrive to the system in arbitrary order.
                                                              Processing time required per request varies. Request
          id                          xid
                                                              scheduling throughout the components of the systems is
          name                        seller_id
                                                              nondeterministic, resulting in nondeterministic queuing
          amt_sold                    buyer_id                of messages. Requiring the order to be preserved gives a
          amt_bought                  amount                  false sense of security. The simple reality is that nondeter-
          last_sale                                           ministic inputs will lead to nondeterministic outputs.

          last_purchase
                                                              SoFT STATE/EvENTUAllY CoNSISTENT
                                                              Up to this point, the focus has been on trading con-




FIG 8
                                                              sistency for availability. The other side of the coin is
                                                              understanding the influence that soft state and eventual
                                                              consistency has on application design.
                                                                  As software engineers we tend to look at our systems



For each message in queue:
 Peek message
 Begin transaction
   Update user set last_purchase=message.trans_date where id=message.buyer_id and last_purchase<message.trans_date;




                                                                               FIG 9
 End transaction
 If transaction successful
   Remove message from queue
End for



54 May/June 2008 ACM QUEUE                                                                    rants: feedback@acmqueue.com
as closed loops. We think about the predictability of their     we are relying upon soft state and eventual consistency in
behavior in terms of predictable inputs producing predict-      the implementation.
able outputs. This is a necessity for creating correct soft-
ware systems. The good news in many cases is that using         EvENT-DRIvEN ARCHITECTURE
BASE doesn’t change the predictability of a system as a         What if you do need to know when state has become
closed loop, but it does require looking at the behavior in     consistent? You may have algorithms that need to be
total.                                                          applied to the state but only when it has reached a con-
   A simple example can help illustrate the point. Con-         sistent state relevant to an incoming request. The simple
sider a system where users can transfer assets to other         approach is to rely on events that are generated as state
users. The type of asset is irrelevant—it could be money        becomes consistent.
or objects in a game. For this example, we will assume              Continuing with the previous example, what if you
that we have decoupled the two operations of taking the         need to notify the user that the asset has arrived? Creat-
asset from one user and giving it to the other with a mes-      ing an event within the transaction that commits the
sage queue used to provide the decoupling.                      asset to the receiving user provides a mechanism for per-
   Immediately, this system feels nondeterministic and          forming further processing once a known state has been
problematic. There is a period of time where the asset has      reached. EDA (event-driven architecture) can provide
                                                                dramatic improvements in scalability and architectural
                                                                decoupling. Further discussion about the application of
                                                                EDA is beyond the scope of this article.

                                                                CoNClUSIoN
                                                                Scaling systems to dramatic transaction rates requires a
                                                                new way of thinking about managing resources. The tra-
                                                                ditional transactional models are problematic when loads
                                                                need to be spread across a large number of components.
                                                                Decoupling the operations and performing them in turn
                                                                provides for improved availability and scale at the cost of
                                                                consistency. BASE provides a model for thinking about
   The good news is that                                        this decoupling. Q

   using BASE doesn’t change
                                                                RefeRences
   the predictability of a system as                            1. http://highscalability.com/unorthodox-approach-
   a closed loop, but it does require                              database-design-coming-shard.
   looking at the behavior in total.                            2. http://citeseer.ist.psu.edu/544596.html.

                                                                LOVE IT, HATE IT? LET US KNOW
                                                                feedback@acmqueue.com or www.acmqueue.com/forums
left one user and has not arrived at the other. The size of
this time window can be determined by the messaging             DAN PRITCHETT is a Technical fellow at eBay where he has
system design. Regardless, there is a lag between the begin     been a member of the architecture team for the past four
and end states where neither user appears to have the           years. In this role, he interfaces with the strategy, business,
asset.                                                          product, and technology teams across eBay marketplaces,
    If we consider this from the user’s perspective, how-       PayPal, and skype. With more than 20 years of experience at
ever, this lag may not be relevant or even known. Neither       technology companies such as sun Microsystems, Hewlett-
the receiving user nor the sending user may know when           Packard, and silicon Graphics, Pritchett has a depth of
the asset arrived. If the lag between sending and receiving     technical experience, ranging from network-level protocols
is a few seconds, it will be invisible or certainly tolerable   and operating systems to systems design and software pat-
to users who are directly communicating about the asset         terns. He has a B.s. in computer science from the University
transfer. In this situation the system behavior is consid-      of Missouri, Rolla.
ered consistent and acceptable to the users, even though        © 2008 AcM 1542-7730/08/0500 $5.00


more queue: www.acmqueue.com                                                                   ACM QUEUE May/June 2008 55

More Related Content

What's hot

Concurrency control ms neeti
Concurrency control ms neetiConcurrency control ms neeti
Concurrency control ms neeti
neeti arora
 
Real time eventual consistency
Real time eventual consistencyReal time eventual consistency
Real time eventual consistency
ijfcstjournal
 
EOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - PaperEOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - Paper
David Walker
 
No sql exploration keyvaluestore
No sql exploration   keyvaluestoreNo sql exploration   keyvaluestore
No sql exploration keyvaluestore
Balaji Srinivasaraghavan
 
No sql
No sqlNo sql
Managing Dynamic Shared state
Managing Dynamic Shared stateManaging Dynamic Shared state
Managing Dynamic Shared state
Aditya Gupta
 
From Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed SystemsFrom Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed Systems
Tyler Treat
 
Cluster computings
Cluster computingsCluster computings
Cluster computings
Ragu1033
 
Highly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowakiHighly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowaki
javier ramirez
 
MSB-Distributed systems goals
MSB-Distributed systems goalsMSB-Distributed systems goals
MSB-Distributed systems goals
MOHD. SHAHRUKH BHATI
 
No sql (not only sql)
No sql                 (not only sql)No sql                 (not only sql)
No sql (not only sql)
Priyodarshini Dhar
 
Sql server clustering msdtc
Sql server clustering msdtcSql server clustering msdtc
Sql server clustering msdtc
Shreeram Rane
 
Active database
Active databaseActive database
Active database
mridul mishra
 
MSSQL SERVER
MSSQL SERVERMSSQL SERVER
MSSQL SERVER
Dharmendrasingh417
 

What's hot (14)

Concurrency control ms neeti
Concurrency control ms neetiConcurrency control ms neeti
Concurrency control ms neeti
 
Real time eventual consistency
Real time eventual consistencyReal time eventual consistency
Real time eventual consistency
 
EOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - PaperEOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - Paper
 
No sql exploration keyvaluestore
No sql exploration   keyvaluestoreNo sql exploration   keyvaluestore
No sql exploration keyvaluestore
 
No sql
No sqlNo sql
No sql
 
Managing Dynamic Shared state
Managing Dynamic Shared stateManaging Dynamic Shared state
Managing Dynamic Shared state
 
From Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed SystemsFrom Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed Systems
 
Cluster computings
Cluster computingsCluster computings
Cluster computings
 
Highly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowakiHighly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowaki
 
MSB-Distributed systems goals
MSB-Distributed systems goalsMSB-Distributed systems goals
MSB-Distributed systems goals
 
No sql (not only sql)
No sql                 (not only sql)No sql                 (not only sql)
No sql (not only sql)
 
Sql server clustering msdtc
Sql server clustering msdtcSql server clustering msdtc
Sql server clustering msdtc
 
Active database
Active databaseActive database
Active database
 
MSSQL SERVER
MSSQL SERVERMSSQL SERVER
MSSQL SERVER
 

Similar to BASE: An Acid Alternative

Megastore providing scalable, highly available storage for interactive services
Megastore providing scalable, highly available storage for interactive servicesMegastore providing scalable, highly available storage for interactive services
Megastore providing scalable, highly available storage for interactive services
João Gabriel Lima
 
Cidr11 paper32
Cidr11 paper32Cidr11 paper32
Cidr11 paper32
jujukoko
 
INJRV01I10005.pdf
INJRV01I10005.pdfINJRV01I10005.pdf
INJRV01I10005.pdf
CherenetToma
 
Scalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed SystemsScalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed Systems
hyun soomyung
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
Venkatesh Narayanan
 
ACID properties_DBMS.pdf
ACID properties_DBMS.pdfACID properties_DBMS.pdf
ACID properties_DBMS.pdf
AbhoyBiswas1
 
Data management in cloud study of existing systems and future opportunities
Data management in cloud study of existing systems and future opportunitiesData management in cloud study of existing systems and future opportunities
Data management in cloud study of existing systems and future opportunities
Editor Jacotech
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
Md. Mashiur Rahman
 
High Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing NetworksHigh Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing Networks
Mário Almeida
 
Rise of NewSQL
Rise of NewSQLRise of NewSQL
Rise of NewSQL
Sushant Choudhary
 
Pivotal gem fire_wp_hardest-problems-data-management_053013
Pivotal gem fire_wp_hardest-problems-data-management_053013Pivotal gem fire_wp_hardest-problems-data-management_053013
Pivotal gem fire_wp_hardest-problems-data-management_053013
EMC
 
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
ijdms
 
Ieee-no sql distributed db and cloud architecture report
Ieee-no sql distributed db and cloud architecture reportIeee-no sql distributed db and cloud architecture report
Ieee-no sql distributed db and cloud architecture report
Outsource Portfolio
 
S18 das
S18 dasS18 das
access.2021.3077680.pdf
access.2021.3077680.pdfaccess.2021.3077680.pdf
access.2021.3077680.pdf
neju3
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
Chris Adkin
 
A Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System UptimeA Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System Uptime
YogeshIJTSRD
 
Building a Highly Available Data Infrastructure
Building a Highly Available Data InfrastructureBuilding a Highly Available Data Infrastructure
Building a Highly Available Data Infrastructure
DataCore Software
 
1 ieee98
1 ieee981 ieee98
1 ieee98
chandan_kundu
 
Leveraging the power of the unbundled database
Leveraging the power of the unbundled databaseLeveraging the power of the unbundled database
Leveraging the power of the unbundled database
Alex Silva
 

Similar to BASE: An Acid Alternative (20)

Megastore providing scalable, highly available storage for interactive services
Megastore providing scalable, highly available storage for interactive servicesMegastore providing scalable, highly available storage for interactive services
Megastore providing scalable, highly available storage for interactive services
 
Cidr11 paper32
Cidr11 paper32Cidr11 paper32
Cidr11 paper32
 
INJRV01I10005.pdf
INJRV01I10005.pdfINJRV01I10005.pdf
INJRV01I10005.pdf
 
Scalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed SystemsScalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed Systems
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
ACID properties_DBMS.pdf
ACID properties_DBMS.pdfACID properties_DBMS.pdf
ACID properties_DBMS.pdf
 
Data management in cloud study of existing systems and future opportunities
Data management in cloud study of existing systems and future opportunitiesData management in cloud study of existing systems and future opportunities
Data management in cloud study of existing systems and future opportunities
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
 
High Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing NetworksHigh Availability of Services in Wide-Area Shared Computing Networks
High Availability of Services in Wide-Area Shared Computing Networks
 
Rise of NewSQL
Rise of NewSQLRise of NewSQL
Rise of NewSQL
 
Pivotal gem fire_wp_hardest-problems-data-management_053013
Pivotal gem fire_wp_hardest-problems-data-management_053013Pivotal gem fire_wp_hardest-problems-data-management_053013
Pivotal gem fire_wp_hardest-problems-data-management_053013
 
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
 
Ieee-no sql distributed db and cloud architecture report
Ieee-no sql distributed db and cloud architecture reportIeee-no sql distributed db and cloud architecture report
Ieee-no sql distributed db and cloud architecture report
 
S18 das
S18 dasS18 das
S18 das
 
access.2021.3077680.pdf
access.2021.3077680.pdfaccess.2021.3077680.pdf
access.2021.3077680.pdf
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 
A Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System UptimeA Study on Replication and Failover Cluster to Maximize System Uptime
A Study on Replication and Failover Cluster to Maximize System Uptime
 
Building a Highly Available Data Infrastructure
Building a Highly Available Data InfrastructureBuilding a Highly Available Data Infrastructure
Building a Highly Available Data Infrastructure
 
1 ieee98
1 ieee981 ieee98
1 ieee98
 
Leveraging the power of the unbundled database
Leveraging the power of the unbundled databaseLeveraging the power of the unbundled database
Leveraging the power of the unbundled database
 

More from Hiroshi Ono

Voltdb - wikipedia
Voltdb - wikipediaVoltdb - wikipedia
Voltdb - wikipediaHiroshi Ono
 
Gamecenter概説
Gamecenter概説Gamecenter概説
Gamecenter概説Hiroshi Ono
 
EventDrivenArchitecture
EventDrivenArchitectureEventDrivenArchitecture
EventDrivenArchitecture
Hiroshi Ono
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
Hiroshi Ono
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
Hiroshi Ono
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
Hiroshi Ono
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
Hiroshi Ono
 
downey08semaphores.pdf
downey08semaphores.pdfdowney08semaphores.pdf
downey08semaphores.pdf
Hiroshi Ono
 
BOF1-Scala02.pdf
BOF1-Scala02.pdfBOF1-Scala02.pdf
BOF1-Scala02.pdfHiroshi Ono
 
TwitterOct2008.pdf
TwitterOct2008.pdfTwitterOct2008.pdf
TwitterOct2008.pdf
Hiroshi Ono
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
Hiroshi Ono
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
Hiroshi Ono
 
SACSIS2009_TCP.pdf
SACSIS2009_TCP.pdfSACSIS2009_TCP.pdf
SACSIS2009_TCP.pdf
Hiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
Hiroshi Ono
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
Hiroshi Ono
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
Hiroshi Ono
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
Hiroshi Ono
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
Hiroshi Ono
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfHiroshi Ono
 

More from Hiroshi Ono (20)

Voltdb - wikipedia
Voltdb - wikipediaVoltdb - wikipedia
Voltdb - wikipedia
 
Gamecenter概説
Gamecenter概説Gamecenter概説
Gamecenter概説
 
EventDrivenArchitecture
EventDrivenArchitectureEventDrivenArchitecture
EventDrivenArchitecture
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
downey08semaphores.pdf
downey08semaphores.pdfdowney08semaphores.pdf
downey08semaphores.pdf
 
BOF1-Scala02.pdf
BOF1-Scala02.pdfBOF1-Scala02.pdf
BOF1-Scala02.pdf
 
TwitterOct2008.pdf
TwitterOct2008.pdfTwitterOct2008.pdf
TwitterOct2008.pdf
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
 
SACSIS2009_TCP.pdf
SACSIS2009_TCP.pdfSACSIS2009_TCP.pdf
SACSIS2009_TCP.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfstateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdf
 
program_draft3.pdf
program_draft3.pdfprogram_draft3.pdf
program_draft3.pdf
 
nodalities_issue7.pdf
nodalities_issue7.pdfnodalities_issue7.pdf
nodalities_issue7.pdf
 
genpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdfgenpaxospublic-090703114743-phpapp01.pdf
genpaxospublic-090703114743-phpapp01.pdf
 
kademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdfkademlia-1227143905867010-8.pdf
kademlia-1227143905867010-8.pdf
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

BASE: An Acid Alternative

  • 1. In partitioned databases, trading some consistency for availability can lead to dramatic improvements in scalability. Web applications have grown in popularity over the past reasonably well for data but has several limitations. The decade. Whether you are building an application for end most obvious limitation is outgrowing the capacity of the users or application developers (i.e., services), your hope largest system available. Vertical scaling is also expensive, is most likely that your application will find broad adop- as adding transactional capacity usually requires purchas- tion—and with broad adoption will come transactional ing the next larger system. Vertical scaling often creates growth. If your application relies upon persistence, then vendor lock, further adding to costs. data storage will probably become your bottleneck. Horizontal scaling offers more flexibility but is also There are two strategies for scaling any application. considerably more complex. Horizontal data scaling The first, and by far the easiest, is vertical scaling: moving can be performed along two vectors. Functional scaling the application to larger computers. Vertical scaling works involves grouping data by function and spreading func- DAN PRITCHETT, EBAY 48 May/June 2008 ACM QUEUE rants: feedback@acmqueue.com
  • 2. tional groups across databases. Splitting data within func- FUNCTIoNAl PARTITIoNINg tional areas across multiple databases, or sharding,1 adds Functional partitioning is important for achieving high the second dimension to horizontal scaling. The diagram degrees of scalability. Any good database architecture will in figure 1 illustrates horizontal data-scaling strategies. decompose the schema into tables grouped by function- As figure 1 illustrates, both approaches to horizontal ality. Users, products, transactions, and communication scaling can be applied at once. Users, products, and trans- are examples of functional areas. Leveraging database actions can be in separate databases. Additionally, each concepts such as foreign keys is a common approach for functional area can be split across multiple databases for maintaining consistency across these functional areas. transactional capacity. As shown in the diagram, func- Relying on database constraints to ensure consistency tional areas can be scaled independently of one another. across functional groups creates a coupling of the schema AN ACID ALTERNATIVE more queue: www.acmqueue.com ACM QUEUE May/June 2008 49
  • 3. Availability. Every operation must terminate in an intended response. Partition tolerance. Operations will complete, even if AN ACID ALTERNATIVE individual components are unavailable. Specifically, a Web application can support, at most, only two of these properties with any database design. Obviously, any horizontal scaling strategy is based on data partitioning; therefore, designers are forced to decide to a database deployment strategy. For constraints to be between consistency and availability. applied, the tables must reside on a single database server, precluding horizontal scaling as transaction rates grow. In ACID SolUTIoNS many cases, the easiest scale-out opportunity is moving ACID database transactions greatly simplify the job of the functional groups of data onto discrete database servers. application developer. As signified by the acronym, ACID Schemas that can scale to very high transaction transactions provide the following guarantees: volumes will place functionally distinct data on different Atomicity. All of the operations in the transaction will database servers. This requires moving data constraints complete, or none will. out of the database and into the application. This also Consistency. The database will be in a consistent state introduces several challenges that are addressed later in when the transaction begins and ends. this article. Isolation. The transaction will behave as if it is the only operation being performed upon the database. CAP THEoREM Durability. Upon completion of the transaction, the Eric Brewer, a professor at the University of California, operation will not be reversed. Berkeley, and cofounder and chief scientist at Inktomi, Database vendors long ago recognized the need for made the conjecture that Web services cannot ensure all partitioning databases and introduced a technique known three of the following properties at once (signified by the as 2PC (two-phase commit) for providing ACID guaran- acronym CAP):2 tees across multiple database instances. The protocol is Consistency. The client perceives that a set of operations broken into two phases: has occurred all at once. • First, the transaction coordinator asks each database involved to precommit the operation and indicate whether commit is possible. If all databases agree the Data Scaling commit can proceed, then phase 2 begins. functional scaling • The transaction coordinator asks each database to com- mit the data. If any database vetoes the commit, then all databases are asked to roll back their portions of the transaction. users0 products trans0 Sample Schema sharding user transaction users1 trans1 id xid name seller_id amt_sold buyer_id amt_bought amount FIG 1 FIG 2 trans2 50 May/June 2008 ACM QUEUE rants: feedback@acmqueue.com
  • 4. What is the shortcoming? We are getting consistency availability in a partitioned database, then opportunities across partitions. If Brewer is correct, then we must be to relax consistency have to be identified. This is often impacting availability, but how can that be? difficult because the tendency of both business stake- The availability of any system is the product of the holders and developers is to assert that consistency is availability of the components required for operation. paramount to the success of the application. Temporal The last part of that statement is the most important. inconsistency cannot be hidden from the end user, so Components that may be used by the system but are not both engineering and product owners must be involved required do not reduce system availability. A transaction in picking the opportunities for relaxing consistency. involving two databases in a 2PC commit will have the Figure 2 is a simple schema that illustrates consis- availability of the product of the availability of each data- tency considerations for BASE. The user table holds user base. For example, if we assume each database has 99.9 percent availability, then the availability of the transac- tion becomes 99.8 percent, or an additional downtime of 43 minutes per month. AN ACID AlTERNATIvE If ACID provides the consistency choice for partitioned databases, then how do you achieve availability instead? One answer is BASE (basically available, soft state, eventu- ally consistent). BASE is diametrically opposed to ACID. Where ACID The tendency of both business is pessimistic and forces consistency at the end of every stakeholders and developers is operation, BASE is optimistic and accepts that the to assert that consistency is paramount database consistency will be in a state of flux. Although to the success of the application. this sounds impossible to cope with, in reality it is quite manageable and leads to levels of scalability that cannot be obtained with ACID. The availability of BASE is achieved through support- ing partial failures without total system failure. Here information including the total amount sold and bought. is a simple example: if users are partitioned across five These are running totals. The transaction table holds each database servers, BASE design encourages crafting opera- transaction, relating the seller and buyer and the amount tions in such a way that a user database failure impacts of the transaction. These are gross oversimplifications of only the 20 percent of the users on that particular host. real tables but contain the necessary elements for illus- There is no magic involved, but this does lead to higher trating several aspects of consistency. perceived availability of the system. In general, consistency across functional groups is So, now that you have decomposed your data into easier to relax than within functional groups. The example functional groups and partitioned the busiest groups schema has two functional groups: users and transac- across multiple databases, how do you incorporate BASE tions. Each time an item is sold, a row is added to the into your application? BASE requires a more in-depth transaction table and the counters for the buyer and seller analysis of the operations within a logical transaction than is typically applied to Begin transaction ACID. What should you be Insert into transaction(xid, seller_id, buyer_id, amount); looking for? The follow- Update user set amt_sold=amt_sold+$amount where id=$seller_id; ing sections provide some Update user set amt_bought=amount_bought+$amount where id=$buyer_id; FIG 3 direction. End transaction CoNSISTENCY PATTERNS Following Brewer’s con- jecture, if BASE allows for more queue: www.acmqueue.com ACM QUEUE May/June 2008 51
  • 5. not uncommon, and in fact people encounter this delay between a transaction and their running balance regularly (e.g., ATM withdrawals and cellphone calls). AN ACID ALTERNATIVE How the SQL statements are modified to relax con- sistency depends upon how the running balances are defined. If they are simply estimates, meaning that some transactions can be missed, the changes are quite simple, as shown in figure 4. are updated. Using an ACID-style transaction, the SQL We’ve now decoupled the updates to the user and would be as shown in figure 3. transaction tables. Consistency between the tables is not The total bought and sold columns in the user table guaranteed. In fact, a failure between the first and second can be considered a cache of the transaction table. It is transaction will result in the user table being permanently present for efficiency of the system. Given this, the con- inconsistent, but if the contract stipulates that the run- straint on consistency could be relaxed. The buyer and ning totals are estimates, this may be adequate. seller expectations can be set so their running balances do What if estimates are not acceptable, though? How not reflect the result of a transaction immediately. This is can you still decouple the user and transaction updates? Introducing a persistent message queue solves the problem. There are several Begin transaction choices for implement- Insert into transaction(id, seller_id, buyer_id, amount); ing persistent messages. End transaction The most critical factor in Begin transaction implementing the queue, Update user set amt_sold=amt_sold+$amount where id=$seller_id; however, is ensuring that Update user set amt_bought=amount_bought+$amount the backing persistence is where id=$buyer_id; on the same resource as the FIG 4 End transaction database. This is necessary to allow the queue to be transactionally committed without involving a 2PC. Now the SQL operations look a bit different, as Begin transaction shown in figure 5. Insert into transaction(id, seller_id, buyer_id, amount); This example takes Queue message “update user(“seller”, seller_id, amount)”; some liberties with syntax Queue message “update user(“buyer”, buyer_id, amount)”; and oversimplifying the End transaction logic to illustrate the For each message in queue concept. By queuing a Begin transaction persistent message within Dequeue message the same transaction as If message.balance == “seller” the insert, the information Update user set amt_sold=amt_sold + message.amount needed to update the run- where id=message.id; ning balances on the user Else has been captured. The Update user set amt_bought=amt_bought + message.amount transaction is contained on FIG 5 where id=message.id; a single database instance End if and therefore will not End transaction impact system availability. End for A separate message- processing component will 52 May/June 2008 ACM QUEUE rants: feedback@acmqueue.com
  • 6. into a separate back-end component, you preserve the Update Table availability of your customer-facing component. The lower availability of the message processor may be accept- updates_applied able for business requirements. trans_id Suppose, however, that 2PC is simply never acceptable balance in your system. How can this problem be solved? First, user_id you need to understand the concept of idempotence. An FIG 6 operation is considered idempotent if it can be applied one time or multiple times with the same result. Idem- potent operations are useful in that they permit partial failures, as applying them repeatedly does not change the final state of the system. The selected example is problematic when looking dequeue each message and apply the information to the for idempotence. Update operations are rarely idempo- user table. The example appears to solve all of the issues, tent. The example increments balance columns in place. but there is a problem. The message persistence is on the Applying this operation more than once obviously will transaction host to avoid a 2PC during queuing. If the result in an incorrect balance. Even update operations message is dequeued inside a transaction involving the that simply set a value, however, are not idempotent user host, we still have a 2PC situation. with regard to order of operations. If the system cannot One solution to the 2PC in the message-processing guarantee that updates will be applied in the order they component is to do nothing. By decoupling the update are received, the final state of the system will be incorrect. More on this later. In the case of balance Begin transaction updates, you need a way to Insert into transaction(id, seller_id, buyer_id, amount); track which updates have Queue message “update user(“seller”, seller_id, amount)”; been applied successfully Queue message “update user(“buyer”, buyer_id, amount)”; and which are still out- End transaction standing. One technique is For each message in queue to use a table that records Peek message the transaction identifiers Begin transaction that have been applied. Select count(*) as processed where trans_id=message.trans_id The table shown in and balance=message.balance and user_id=message.user_id figure 6 tracks the transac- If processed == 0 tion ID, which balance has If message.balance == “seller” been updated, and the user Update user set amt_sold=amt_sold + message.amount ID where the balance was where id=message.id; applied. Now our sample Else pseudocode is as shown in Update user set amt_bought=amt_bought + message.amount figure 7. where id=message.id; This example depends End if upon being able to peek a Insert into updates_applied message in the queue and (message.trans_id, message.balance, message.user_id); remove it once success- End if fully processed. This can End transaction be done with two indepen- FIG 7 If transaction successful dent transactions if neces- Remove message from queue sary: one on the message End if queue and one on the user End for database. Queue operations are not committed unless more queue: www.acmqueue.com ACM QUEUE May/June 2008 53
  • 7. upon which order the messages are processed in, you will have an incorrect value for last_purchase. Fortunately, this kind of update can be handled with a minor modifi- AN ACID ALTERNATIVE cation to the SQL, as illustrated in figure 9. By simply not allowing the last_purchase time to go backward in time, you have made the update operations order independent. You can also use this approach to protect any update from out-of-order updates. As an alter- database operations successfully commit. The algorithm native to using time, you can also try a monotonically now supports partial failures and still provides transac- increasing transaction ID. tional guarantees without resorting to 2PC. There is a simpler technique for assuring idempotent oRDERINg oF MESSAgE QUEUES updates if the only concern is ordering. Let’s change our A short side note on ordered message delivery is relevant. sample schema just a bit to illustrate the challenge and Message systems offer the ability to ensure that messages the solution (see figure 8). Suppose you also want to track are delivered in the order they are received. This can be the last date of sale and purchase for the user. You can expensive to support and is often unnecessary, and, in rely on a similar scheme of updating the date with a mes- fact, at times gives a false sense of security. sage, but there is one problem. The examples provided here illustrate how message Suppose two purchases occur within a short time ordering can be relaxed and still provide a consistent window, and our message system doesn’t ensure ordered view of the database, eventually. The overhead required operations. You now have a situation where, depending to relax the ordering is nominal and in most cases is significantly less than enforcing ordering in the message system. Further, a Web application is semantically an event- Alternate Schema driven system regardless of the style of interaction. The user transaction client requests arrive to the system in arbitrary order. Processing time required per request varies. Request id xid scheduling throughout the components of the systems is name seller_id nondeterministic, resulting in nondeterministic queuing amt_sold buyer_id of messages. Requiring the order to be preserved gives a amt_bought amount false sense of security. The simple reality is that nondeter- last_sale ministic inputs will lead to nondeterministic outputs. last_purchase SoFT STATE/EvENTUAllY CoNSISTENT Up to this point, the focus has been on trading con- FIG 8 sistency for availability. The other side of the coin is understanding the influence that soft state and eventual consistency has on application design. As software engineers we tend to look at our systems For each message in queue: Peek message Begin transaction Update user set last_purchase=message.trans_date where id=message.buyer_id and last_purchase<message.trans_date; FIG 9 End transaction If transaction successful Remove message from queue End for 54 May/June 2008 ACM QUEUE rants: feedback@acmqueue.com
  • 8. as closed loops. We think about the predictability of their we are relying upon soft state and eventual consistency in behavior in terms of predictable inputs producing predict- the implementation. able outputs. This is a necessity for creating correct soft- ware systems. The good news in many cases is that using EvENT-DRIvEN ARCHITECTURE BASE doesn’t change the predictability of a system as a What if you do need to know when state has become closed loop, but it does require looking at the behavior in consistent? You may have algorithms that need to be total. applied to the state but only when it has reached a con- A simple example can help illustrate the point. Con- sistent state relevant to an incoming request. The simple sider a system where users can transfer assets to other approach is to rely on events that are generated as state users. The type of asset is irrelevant—it could be money becomes consistent. or objects in a game. For this example, we will assume Continuing with the previous example, what if you that we have decoupled the two operations of taking the need to notify the user that the asset has arrived? Creat- asset from one user and giving it to the other with a mes- ing an event within the transaction that commits the sage queue used to provide the decoupling. asset to the receiving user provides a mechanism for per- Immediately, this system feels nondeterministic and forming further processing once a known state has been problematic. There is a period of time where the asset has reached. EDA (event-driven architecture) can provide dramatic improvements in scalability and architectural decoupling. Further discussion about the application of EDA is beyond the scope of this article. CoNClUSIoN Scaling systems to dramatic transaction rates requires a new way of thinking about managing resources. The tra- ditional transactional models are problematic when loads need to be spread across a large number of components. Decoupling the operations and performing them in turn provides for improved availability and scale at the cost of consistency. BASE provides a model for thinking about The good news is that this decoupling. Q using BASE doesn’t change RefeRences the predictability of a system as 1. http://highscalability.com/unorthodox-approach- a closed loop, but it does require database-design-coming-shard. looking at the behavior in total. 2. http://citeseer.ist.psu.edu/544596.html. LOVE IT, HATE IT? LET US KNOW feedback@acmqueue.com or www.acmqueue.com/forums left one user and has not arrived at the other. The size of this time window can be determined by the messaging DAN PRITCHETT is a Technical fellow at eBay where he has system design. Regardless, there is a lag between the begin been a member of the architecture team for the past four and end states where neither user appears to have the years. In this role, he interfaces with the strategy, business, asset. product, and technology teams across eBay marketplaces, If we consider this from the user’s perspective, how- PayPal, and skype. With more than 20 years of experience at ever, this lag may not be relevant or even known. Neither technology companies such as sun Microsystems, Hewlett- the receiving user nor the sending user may know when Packard, and silicon Graphics, Pritchett has a depth of the asset arrived. If the lag between sending and receiving technical experience, ranging from network-level protocols is a few seconds, it will be invisible or certainly tolerable and operating systems to systems design and software pat- to users who are directly communicating about the asset terns. He has a B.s. in computer science from the University transfer. In this situation the system behavior is consid- of Missouri, Rolla. ered consistent and acceptable to the users, even though © 2008 AcM 1542-7730/08/0500 $5.00 more queue: www.acmqueue.com ACM QUEUE May/June 2008 55