Last time, we studied how to build a service using SOAP:

Size: px
Start display at page:

Download "Last time, we studied how to build a service using SOAP:"

Transcription

1 Services Monday, November 26, :54 AM Last time, we studied how to build a service using SOAP: Services Page 1

2 The dream of service architecture Monday, November 26, :03 AM The dream of service architecture You create a subroutine in Java. You ask politely that it be presented as a service. The service is written for you. Your service's nature is advertised on the web. Your service becomes discoverable in searches. Clients are automatically written to call the service -- in any language. Services Page 2

3 Services Page 3 Science fiction? Monday, November 26, :08 AM This is not science fiction, but I am glossing over some really important details: You must comply with a service pattern in order for your subroutine to be wrappable. This pattern includes requirements on how you store and retrieve local persistent data. The paradigm has limits: notably, that the service input and output schemas only represent the limits of the language's type system. You must learn a new programming paradigm: generate and modify.

4 Services Page 4 Details of a cloud-based service Monday, November 26, :23 PM Details of a cloud-based service Part I: Code generation strategies. What happens "outside the code"? Part II: Persistence strategies. What has to happen "inside the code"?

5 Services Page 5 Part I: code generation Monday, November 26, :24 PM Part I: code generation How can we avoid the tedium of XML/XSchemas in writing web services? What will we give up as a result?

6 Services Page 6 Developing SOAP the old way Wednesday, March 10, :01 AM Developing SOAP the old way: "top-down" Define input schema. Define output schema. Define request handler for the schema, that generates appropriate output for each input. Define client that calls the request handler and encodes data according to the schema. Zzzz...

7 Services Page 7 Bottom-up service development Wednesday, March 10, :05 AM The new world order: bottom-up service development Start by defining Plain Old Java Objects (POJOs) that you want to turn into web services, e.g., that read NoSQL data. Generate XML Schemas, service stubs, etc using a service deployment framework, e.g., Apache Axis 2. Don't even learn XML or Schemas! The framework handles all of that!

8 Services Page 8 Service deployment frameworks Wednesday, March 10, :31 PM Service deployment frameworks Manage "deployment" of a service. Require only minimal input from you. Java Code to deploy. Some configuration options. Result: a running service. Two main ones: Apache Axis (LAMP) Microsoft Visual Studio Services (IIS)

9 Services Page 9 Apache Axis 2 Wednesday, March 10, :12 AM Apache Axis 2 Built on top of the Apache Tomcat Java Servlet Engine. Supported in native Eclipse J2EE edition (without plugins, but you do have to download local copies of Apache Tomcat and Axis and get them running and bound into Eclipse). Takes plain old java objects (POJOs) as input. Generates service and client code that treats POJOs as services!

10 Services Page 10 Requirements Monday, November 26, :40 PM Requirements The POJO must be "serializable": it must be possible to make a portable copy of the object. The service calls must be methods in the object.

11 Services Page 11 Using Axis Wednesday, March 10, :18 AM Using Axis Define a simple service as a java class. Tell Axis it should become a service. "Package" the service. "Deploy" the service. Reference:

12 Services Page 12 Defining a service Wednesday, March 10, :19 AM /** * The service implementation class */ public class SimpleService { public String echo(string value) { return value; } } Pasted from <

13 Informing Axis of the service Wednesday, March 10, :19 AM Informing Axis of the service: services.xml <service> <parameter name="serviceclass" locked="false">simpleservice</parameter> <operation name="echo"> <messagereceiver class="org.apache.axis2.rpc.receivers.rpcmessagereceiver"/> </operation> </service> Pasted from < Services Page 13

14 Services Page 14 Packaging the service Wednesday, March 10, :21 AM Packaging the service Axis expects service files to be found in a specific directory hierarchy. Creating the hierarchy: mkdir temp javac SimpleService.java -d temp/ mkdir temp/meta.inf cp services.xml temp/meta.inf/ cd temp jar -cvf SimpleService.aar *

15 Services Page 15 Deploying the service Wednesday, March 10, :30 AM Deploying the service Choose a web server platform (e.g., Apache Tomcat+Axis2 or SimpleHTTPserver + Axis2) (Instructions differ.) Simplest deployment: SimpleHTTPserver included with Axis2.

16 Services Page 16 Using SimpleHTTPServer Wednesday, March 10, :32 AM Using SimpleHTTPServer Create a "repository" axis2-repo containing conf subdirectory containing axis2.xml empty modules subdirectory (contains jars that your code might need). services directory containing SimpleService.aar Run the SimpleHTTPserver: sh http-server.sh /path/to/axis2-repo

17 Services Page 17 Now things get interesting Wednesday, March 10, :45 AM Now things get interesting Axis2 Services are reflective, i.e., they are self-describing on the web. If one runs the SimpleHTTPserver and browses to one gets a description of the service and even how to use it. Weird: one has to have the service running before one can build a client to it.

18 Creating a client Wednesday, March 10, :49 AM Creating a client Client code is generated by querying the reflection interface for a running service! (It doesn't matter how you wrote the service) sh WSDL2Java.sh -uri \\ \\ -o /path/to/my/client/code/ This generates code in the Axis2 hierarchy that calls the service. It can be run on a different host than the host on which the service was developed! It can be written in a different language. Services Page 18

19 Querying via generated code Wednesday, March 10, :51 AM // SimpleServer.echo corresponds to // SimpleServiceStub.EchoResponse // in generated code. package org.apache.axis2; import org.apache.axis2.simpleservicestub.echoresponse; public class Client { public static void main(string[] args) throws Exception { SimpleServiceStub stub = new SimpleServiceStub(); //Create the request SimpleServiceStub.Echo request = new SimpleServiceStub.Echo(); request.setparam0("hello world"); } } //Invoke the service EchoResponse response = stub.echo(request); System.out.println("Response : " + response.get_return()); Pasted from < Services Page 19

20 Services Page 20 What did we give up? Monday, November 26, :25 PM What did we give up? XSchemas are generated by the language type system. They do not fully enforce preconditions. In Axis, it isn't possible to do so. Reason: just-in-time compilation. XML is slow to encode/decode. This is a performance issue. So we don't use this for non-public interfaces.

21 Services Page 21 A tale of two service generators Monday, November 26, :46 PM Apache Axis Just-in-time compilation XSchema preconditions are based upon language type system Microsoft Visual Studio Web Services Generate and modify Can modify XSchemas to assert more than language-based preconditions

22 Services Page 22 Part II: Persistence Monday, November 26, :09 AM Your java subroutine must be written to be: horizontally scalable: it is possible to deploy more service instances without problems. stateless: any instance of the service can handle any request. consistency aware: it is not possible for multiple instances to get confused about persistent service state.

23 Services Page 23 Relationship between Parts I and II Monday, November 26, :26 PM Relationship between Parts I and II Part I: how to generate a service from a java class. Part II: how to make that class intelligently use persistent data.

24 Services Page 24 A simple example of persistent state Monday, November 26, :43 AM A simple example of persistent state An "availability" service: remembers whether you're busy now or available to chat. Key: your user identifier (e.g., Windows LiveID or Google ID) Value: boolean: TRUE if you're available. Two service calls: put(id,avail): set the availability for a user ID to a specific state avail = get(id): get the availability for a user ID.

25 A cloud model of a service Monday, November 26, :25 AM Services Page 25

26 Services Page 26 Why we are going to this trouble Monday, November 26, :59 PM We want horizontal scalability of the front end: we should be able to add front-ends without modifying behavior. We want vertical scalability of the datastore: we should be able to add storage resources without changing behavior.

27 Distributable programs Wednesday, January 27, :06 AM "Distributable" applications Are regular serial application programs. Can have many concurrent instances running in different locations. All instances do the same thing. All instances have the same view of the world. Services Page 27

28 Distributed objects Wednesday, January 27, :08 AM Distributed objects Give all instances of an application "the same view" of the world. Are opaque to the application. Are distributed in ways that the application cannot detect. Services Page 28

29 Services Page 29 Classes and instances Monday, January 24, :58 PM Best to think about cloud clients and services in terms of classes and instances: For a client: The class determines the kind of application. An instance is one copy of a program that satisfies class requirements There can be many concurrent instances of a client (e.g., 1000 cellphone users) For a service: The class is the kind of service An instance is one copy of a program that provides the service. There can be many instances of the same service (e.g., geographically distributed)

30 Binding Monday, January 24, :01 PM The concept of binding You run an app on your cellphone. It connects to a service. It does something (e.g., recording your Lat/Long location) It logs out. What can you assume about this transaction? You cannot assume that you'll ever get the same server again. or that the server you get will have the same view of the cloud. unless you know something more about the cloud! When you write a service All data must be stored in the cloud. There is no useful concept of local data. There is no concept of server-to-server communication except through the datastore. Services Page 30

31 A model of cloud execution Monday, January 24, :54 PM Services Page 31

32 Services Page 32 ACID Wednesday, January 27, :09 AM Datastores should exhibit what is commonly called ACID: Atomicity: requested operations either occur or not, and there is nothing in between "occurring" and "not occurring". Consistency: what you wrote is what you read. Isolation: no other factors other than your actions affect data. Durability: what you wrote remains what you read, even after system failures.

33 Services Page 33 Consistency and concurrency Wednesday, January 27, :19 AM Consistency and concurrency Two visible properties of a distributed object: consistency and concurrency Consistency: the extent to which "what you write" is "what you read" back, afterward. Concurrency: what happens when two instances of your application try to do conflicting things at the same exact time?

34 Consistency Wednesday, January 27, :20 AM Consistency The extent to which "what you write" into a distributed object is "what you read" later. Two kinds: Strong consistency: if you write something into a distributed object, you always read what you wrote, even immediately after the write. Weak (eventual) consistency: if you write something into a distributed object, then eventually -- after some time passes -- you will be able to read it back. Immediate queries may return stale data. Services Page 34

35 Services Page 35 A file analogy Wednesday, January 27, :36 AM A file analogy Strong consistency is like writing to a regular file or database: what you write is always what you get back. Eventual consistency is like writing something on pieces of paper and mailing them to many other people. What you get back depends upon which person you talk to and when you ask. Eventually, they'll all know about the change.

36 Services Page 36 Concurrency Wednesday, January 27, :23 AM Concurrency How conflicting concurrent operations are handled. Two kinds: Strong concurrency: if two or more conflicting operations are requested at the same time, they are serialized and done in arrival order, and both are treated as succeeding. Thus the last request determines the outcome. Weak ("opportunistic") concurrency: if two conflicting operations are requested at the same time, the first succeeds and the second fails. Thus the first request determines the outcome.

37 Services Page 37 A file analogy Wednesday, January 27, :41 AM A file analogy On linux, file writes exhibit strong concurrency, in the sense that conflicting writes all occur and the last one wins. Likewise, in a database, a stream of conflicting operations are serialized and all occur -- the last one determines the outcome. Opportunistic concurrency only occurs when there is some form of data locking, e.g., in a transaction block.

38 Services Page 38 Strong consistency and concurrency Wednesday, January 27, :54 AM Consistency/Concurrency tradeoffs Obviously, we want both strong consistency and strong concurrency But we can't have both at the same time!

39 Services Page 39 Strong consistency requirements Wednesday, January 27, :01 AM Strong consistency requires Some form of write blocking until a consistent state, Which implies a (relatively) slow write time before unblocking. Which means we can't afford to "wait" for the write to end in order to sequence writes. Which means we can't have strong concurrency!

40 Services Page 40 Strong concurrency requirements Wednesday, January 27, :01 AM Strong concurrency requires Some form of write sequencing. A (relatively) fast write time, with little blocking. Which means writes need time to propagate. Which means we can't have strong consistency!

41 Services Page 41 Two approaches to Consistency and Concurrency Wednesday, January 27, :03 AM Google's "appengine" Provides strong consistency At the expense of opportunistic concurrency. Amazon's "dynamo" Provides strong concurrency. At the expense of exhibiting eventual consistency.

42 Services Page 42 AppEngine Wednesday, January 27, :18 AM AppEngine properties Strong consistency: what you write is always what you read, even if you read at a (geographically) different place! Opportunistic concurrency: updates can fail; application is responsible for repeating failed update operations. Updates should be contained in "try" blocks!

43 Services Page 43 Modifying distributed objects in AppEngine Wednesday, January 27, :23 AM Modifying distributed objects in AppEngine A distributed object is controlled by a persistence manager. A distributed object retrieved from the persistence manager remains "attached" to the cloud. If you "set" something in a persistent object, this implicitly modifies the cloud version and every copy in other concurrently running application instances! This is what strong consistency means! So if some concurrent application instance sets something else in an object instance you fetched, your object will reflect that change (via strong consistency). So mostly, you observe what appears to be strong concurrency.

44 Services Page 44 The illusion of strong consistency Monday, January 24, :09 PM The illusion of strong consistency How is this actually done? It's actually smoke and mirrors! Creating strong consistency Every object is "dirty" if changed, and "clean" if not. Very fast mechanisms for propogating "dirty" information (e.g., a bit array). A class of objects is dirty if any instance is. An instance is dirty if its data isn't completely propogated. Relatively slow mechanisms for changing something from "dirty" to "clean". Actually propogate the data, then relabel the thing as clean. Applications get "dirty" info immediately, and then wait until the data is clean before proceeding!

45 An example object Wednesday, January 27, :28 AM import com.google.appengine.api.datastore.key; import java.util.date; import javax.jdo.annotations.idgeneratorstrategy; import javax.jdo.annotations.identitytype; import javax.jdo.annotations.persistencecapable; import javax.jdo.annotations.persistent; import = IdentityType.APPLICATION) public class = IdGeneratorStrategy.IDENTITY) private Key private String private String private Date hiredate; public Employee(String firstname, String lastname, Date hiredate) { this.firstname = firstname; this.lastname = lastname; this.hiredate = hiredate; } // Accessors for the fields. JDO doesn't use these, but your application does. public Key getkey() { return key; } public String getfirstname() { Services Page 45

46 public String getfirstname() { return firstname; } public void setfirstname(string firstname) { this.firstname = firstname; } public String getlastname() { return lastname; } public void setlastname(string lastname) { this.lastname = lastname; } } public Date gethiredate() { return hiredate; } public void sethiredate(date hiredate) { this.hiredate = hiredate; } Pasted from < ses.html> Services Page 46

47 Services Page 47 Entity identity and keys Wednesday, January 27, :36 PM Entity identity and keys An object of type Key helps one locate persistent objects in the cloud By default, the system assigns it. You can also make one that is easier to remember.

48 Services Page 48 Creating an object with a settable key Wednesday, January 27, :45 PM import javax.jdo.annotations.idgeneratorstrategy; import javax.jdo.annotations.persistent; import javax.jdo.annotations.primarykey; import = IdGeneratorStrategy.IDENTITY) private Key key; public void setkey(key key) { this.key = key; } Pasted from < ddeletingdata.html>

49 Making an object with a known key Wednesday, January 27, :46 PM import com.google.appengine.api.datastore.key; import com.google.appengine.api.datastore.keyfactory; //... Key key = KeyFactory.createKey(Employee.class.getSimpleName(), "Alfred.Smith@example.com"); Employee e = new Employee(); e.setkey(key); pm.makepersistent(e); Pasted from < ddeletingdata.html> Services Page 49

50 Services Page 50 Retrieving an object via a known key Wednesday, January 27, :47 PM Key k = KeyFactory.createKey(Employee.class.getSimpleName(), "Alfred.Smith@example.com"); Employee e = pm.getobjectbyid(employee.class, k); Pasted from < ddeletingdata.html>

51 Services Page 51 Changing persistent objects Wednesday, January 27, :52 PM Key k = KeyFactory.createKey(Employee.class.getSimpleName(), "Alfred.Smith@example.com"); Employee e = pm.getobjectbyid(employee.class, k); e.setfirstname("alfred"); // happens in distributed space, immediately!

52 Services Page 52 A hard thing to understand Wednesday, January 27, :57 PM

53 Services Page 53 Persistent object caveats Wednesday, January 27, :38 PM Persistent object caveats Changes to a persistent object occur when requested. Access functions must be used; persistent data must be private; the PM factory adds management code to make this happen! Changes are reflected everywhere the object is being referenced!

54 Services Page 54 What does strong consistency mean? Wednesday, January 27, :02 PM What does strong consistency mean? When you change something in an instance of a persistent object, it is changed in every other image of that instance, including inside other instances of your application! But this is a polite illusion; in reality, other instances of your application wait for data they need to arrive! If -- on average -- there is one app looking at the object, then -- on average -- no one waits!

55 Services Page 55 Updating an entity from its own values Wednesday, January 27, :08 PM Consider the code: Key k = KeyFactory.createKey(Employee.class.getSimpleName(), "Alfred.Smith@example.com"); // assume existence of persistent getsalary and setsalary methods Employee e = pm.getobjectbyid(employee.class, k); e.setsalary(e.getsalary()+100); // Give Alfred a raise! Consider what happens when two application instances invoke this code at nearly the same time.

56 Services Page 56 The problem of concurrent updates Wednesday, January 27, :11 PM The code e.setsalary(e.getsalary()+100) is the same thing as (and is implemented as!) tmp = e.getsalary() tmp = tmp e.setsalary(tmp)

57 Services Page 57 So, we can execute this as: Wednesday, January 27, :13 PM So, we can execute this twice according to the following schedule: Instance 1 Instance 2 e.getsalary e.getsalary e.setsalary e.setsalary And Alfred gets a $100 raise rather than a $200 raise :(

58 Services Page 58 Transactions Wednesday, January 27, :16 PM Transactions allow us to avoid that problem: Identify operations that should be done without interruption. Keep other concurrent things from interfering between begin() and commit(). E.g.: Key k = KeyFactory.createKey(Employee.class.getSimpleName(), "Alfred.Smith@example.com"); pm.currenttransaction().begin(); Employee e = pm.getobjectbyid(employee.class, k); e.setsalary(e.getsalary()+100); // Give Alfred a raise! try { pm.currenttransaction().commit(); } catch (JDOCanRetryException ex) { // ouch: something prevented the transaction! throw ex; // share the pain! }

59 Services Page 59 How this works Wednesday, January 27, :32 PM How this works The transaction block (from begin() to commit()) attempts to execute before any other changes can be made to e. If no other changes have been made to e between begin() and commit(), the transaction succeeds. If some change in e has been made meanwhile, the transaction fails, e gets the changed values, the whole transaction is cancelled, and the application has to recover somehow (if it can).

60 Services Page 60 How this behaves Wednesday, January 27, :34 PM How this behaves If two applications try to do this, then the object will only change due to a commit. If two commits interleave, an exception is thrown. So we know we've goofed! It is the use of transactions that "creates" weak concurrency, but without them, we have chaos!

61 Services Page 61 Optimistic concurrency Wednesday, January 27, :23 PM Optimistic concurrency Transaction blocks delimit things that should be done together. If something changes about the object between begin() and commit(), the transaction throws an exception. So, the application knows that its request failed.

62 Services Page 62 Coping with optimistic concurrency via retries Wednesday, January 27, :25 PM for (int i = 0; i < NUM_RETRIES; i++) { pm.currenttransaction().begin(); Employee e = pm.getobjectbyid(employee.class, k); e.setsalary(e.getsalary()+100); // Give Alfred a raise! try { pm.currenttransaction().commit(); break; // from retry loop! } catch (JDOCanRetryException ex) { if (i == (NUM_RETRIES - 1)) { throw ex; } } }

63 Services Page 63 Global picture Monday, November 26, :47 PM

64 Services Page 64 End of Lecture on 11/26/2012 Monday, November 26, :33 PM

65 Services Page 65 When is strong concurrency a good choice? Wednesday, January 27, :34 AM When is strong concurrency a good choice? So far, we see that the outcome of concurrency is weak (transaction) consistency. Why does strong concurrency work well in Amazon dynamo? This is really subtle. Dynamo is intended as a data warehouse. Thus it is not a database itself, but rather, a historical record of a database. Thus it is never necessary to invoke a transaction on it!

66 Services Page 66 The NoSQL controversy Wednesday, March 09, :10 PM The NoSQL controversy NoSQL = "Not only Structured Query Language" Often misunderstood: some more radical authors interpret NoSQL as "Prevent Structured Query Language":) In actuality, the NoSQL movement: Assumes that the majority of queries are simple key fetches that don't require SQL syntax Optimizes simple key fetches for quick response. Often contains a fallback to interpreting full SQL, with performance disadvantages.

67 Services Page 67 A typical NoSQL service Wednesday, March 09, :12 PM A typical NoSQL storage service Operations are: ValueType get(keytype key) Assert the binding of a key to a value. Subsequent puts update data. int put(keytype key, ValueType value) Gets the last value associated with a key (most of the time).

68 Services Page 68 Roots of NoSQL Wednesday, March 09, :13 PM Roots of NoSQL The most common use-case is retrieval by key. Values are just bags of bits; the user can given them structure as needed. The CAP theorem: one cannot build a distributed database system that exhibits all of Consistency, high Availability, and robustness in the presence of Partitioning (loss of messages).

69 Services Page 69 The CAP Theorem Wednesday, March 09, :15 PM The CAP Theorem The CAP conjecture (Eric Brewer, 2000): any distributed datastore can only exhibit two of the following three properties Consistency: all nodes have the same view of data. (High) Availability: data is instantly available from the system. Partitionability: the system continues to respond if messages are lost (due to system or network failure). Proved to be true by Gilbert and Lynch (2002).

70 Services Page 70 Impact of the CAP theorem Wednesday, March 09, :56 PM In the context of cloud services: Main contribution: cloud datastores can be categorized in terms of the two (of three) properties C,A,P that they exhibit. AppEngine Java Distributed Objects (JDO) are in class CP = Consistency + Partitionability Only other reasonable class is AP = Availability + Partionability We don't usually want a cloud datastore that loses data! (e.g., P)

71 Services Page 71 The class AP Wednesday, March 09, :58 PM The class AP contains datastores like: Amazon Dynamo Facebook's Cassandra LinkedIn's Project Voldemort Why so many? Everybody needed one. Google didn't publish theirs (AppEngine/BigTable) in open source.

72 Services Page 72 Inside Dynamo Wednesday, March 09, :16 PM Inside Dynamo An arbitrary choice Because it's very well documented

73 Services Page 73 What is dynamo? Wednesday, March 09, :17 PM What is dynamo? The back-end cloud datastore for amazon.com itself. Serves requests for shopping carts, purchases. On an eventually consistent datastore! How?

74 Services Page 74 Unique features of dynamo Wednesday, March 09, :27 PM Unique features of Dynamo Vector clocks for conflict detection. Business logic for conflict resolution.

75 Services Page 75 Vector clocks Wednesday, March 09, :56 PM Vector clocks Every change transaction contains a timestamp and a pointer to the previous version of the object. As transactions flow through the system, they are accumulated in a local history (queue) on each (redundant) storage node. Local history is Pruned if there are no conflicts. Resolved (in an application-specific manner) if conflicts occur.

76 Example: shopping cart Wednesday, March 09, :03 PM Services Page 76

77 Services Page 77 Business-based recovery Wednesday, March 09, :05 PM Business-based recovery What happens when a conflict occurs is based upon business rules. If object is a shopping cart, contents are merged. If object is a purchase record, apparent duplicate purchases are eliminated.

78 Services Page 78 Why? Wednesday, March 09, :16 PM Why Amazon "gets away with" Dynamo one would usually not want to store business data in an eventually consistent store. customer dissatisfaction: "buy this" responds with "you haven't bought it (yet)" Amazon "gets away with" doing that, by embedding business logic. using vector clock updates. for each kind of object, separately. This is a complex game, which is why Dynamo isn't available directly to their customers.

Lessons learned so far... Wednesday, January 26, :16 PM

Lessons learned so far... Wednesday, January 26, :16 PM Consistency_and_Concurrency Page 1 Lessons learned so far... Wednesday, January 26, 2011 4:16 PM Last lecture: syntax: A cloud application is a java serial program that interacts with persistent instances

More information

Pieces of the puzzle. Wednesday, March 09, :29 PM

Pieces of the puzzle. Wednesday, March 09, :29 PM SOAP_and_Axis Page 1 Pieces of the puzzle Wednesday, March 09, 2011 12:29 PM Pieces of the puzzle so far Google AppEngine/GWTJ: a platform for cloud computing. Map/Reduce: a core technology of cloud computing.

More information

What is a cloud? Monday, January 25, :13 PM

What is a cloud? Monday, January 25, :13 PM Introduction Page 1 What is a cloud? 12:13 PM What is "Cloud Computing"? A programming paradigm for distributed applications A business paradigm for reassigning business risk An infrastructure paradigm

More information

SCALABLE CONSISTENCY AND TRANSACTION MODELS

SCALABLE CONSISTENCY AND TRANSACTION MODELS Data Management in the Cloud SCALABLE CONSISTENCY AND TRANSACTION MODELS 69 Brewer s Conjecture Three properties that are desirable and expected from realworld shared-data systems C: data consistency A:

More information

objects, not on the server or client! datastore to insure that application instances see the same view of data.

objects, not on the server or client! datastore to insure that application instances see the same view of data. Scalability Page 1 Scalability Wednesday, February 03, 2010 3:59 PM The commandments of cloud computing So far, we've constructed cloud applications according to a (so far) unjustified set of "commandments:

More information

Report to Brewer s original presentation of his CAP Theorem at the Symposium on Principles of Distributed Computing (PODC) 2000

Report to Brewer s original presentation of his CAP Theorem at the Symposium on Principles of Distributed Computing (PODC) 2000 Brewer s CAP Theorem Report to Brewer s original presentation of his CAP Theorem at the Symposium on Principles of Distributed Computing (PODC) 2000 Written by Table of Contents Introduction... 2 The CAP-Theorem...

More information

CAP Theorem. March 26, Thanks to Arvind K., Dong W., and Mihir N. for slides.

CAP Theorem. March 26, Thanks to Arvind K., Dong W., and Mihir N. for slides. C A CAP Theorem P March 26, 2018 Thanks to Arvind K., Dong W., and Mihir N. for slides. CAP Theorem It is impossible for a web service to provide these three guarantees at the same time (pick 2 of 3):

More information

Designing for the Cloud

Designing for the Cloud Design Page 1 Designing for the Cloud 3:47 PM Designing for the Cloud So far, I've given you the "solution" and asked you to "program a piece of it". This is a short-term problem! In fact, 90% of the real

More information

CS5412: TRANSACTIONS (I)

CS5412: TRANSACTIONS (I) 1 CS5412: TRANSACTIONS (I) Lecture XVII Ken Birman Transactions 2 A widely used reliability technology, despite the BASE methodology we use in the first tier Goal for this week: in-depth examination of

More information

Large-Scale Key-Value Stores Eventual Consistency Marco Serafini

Large-Scale Key-Value Stores Eventual Consistency Marco Serafini Large-Scale Key-Value Stores Eventual Consistency Marco Serafini COMPSCI 590S Lecture 13 Goals of Key-Value Stores Export simple API put(key, value) get(key) Simpler and faster than a DBMS Less complexity,

More information

Lab 10. Google App Engine. Tomas Lampo. November 11, 2010

Lab 10. Google App Engine. Tomas Lampo. November 11, 2010 Lab 10 Google App Engine Tomas Lampo November 11, 2010 Today, we will create a server that will hold information for the XML parsing app we created on lab 8. We will be using Eclipse and Java, but we will

More information

Eventual Consistency 1

Eventual Consistency 1 Eventual Consistency 1 Readings Werner Vogels ACM Queue paper http://queue.acm.org/detail.cfm?id=1466448 Dynamo paper http://www.allthingsdistributed.com/files/ amazon-dynamo-sosp2007.pdf Apache Cassandra

More information

Final Exam Logistics. CS 133: Databases. Goals for Today. Some References Used. Final exam take-home. Same resources as midterm

Final Exam Logistics. CS 133: Databases. Goals for Today. Some References Used. Final exam take-home. Same resources as midterm Final Exam Logistics CS 133: Databases Fall 2018 Lec 25 12/06 NoSQL Final exam take-home Available: Friday December 14 th, 4:00pm in Olin Due: Monday December 17 th, 5:15pm Same resources as midterm Except

More information

NoSQL systems. Lecture 21 (optional) Instructor: Sudeepa Roy. CompSci 516 Data Intensive Computing Systems

NoSQL systems. Lecture 21 (optional) Instructor: Sudeepa Roy. CompSci 516 Data Intensive Computing Systems CompSci 516 Data Intensive Computing Systems Lecture 21 (optional) NoSQL systems Instructor: Sudeepa Roy Duke CS, Spring 2016 CompSci 516: Data Intensive Computing Systems 1 Key- Value Stores Duke CS,

More information

Overview. * Some History. * What is NoSQL? * Why NoSQL? * RDBMS vs NoSQL. * NoSQL Taxonomy. *TowardsNewSQL

Overview. * Some History. * What is NoSQL? * Why NoSQL? * RDBMS vs NoSQL. * NoSQL Taxonomy. *TowardsNewSQL * Some History * What is NoSQL? * Why NoSQL? * RDBMS vs NoSQL * NoSQL Taxonomy * Towards NewSQL Overview * Some History * What is NoSQL? * Why NoSQL? * RDBMS vs NoSQL * NoSQL Taxonomy *TowardsNewSQL NoSQL

More information

CompSci 516 Database Systems

CompSci 516 Database Systems CompSci 516 Database Systems Lecture 20 NoSQL and Column Store Instructor: Sudeepa Roy Duke CS, Fall 2018 CompSci 516: Database Systems 1 Reading Material NOSQL: Scalable SQL and NoSQL Data Stores Rick

More information

Can "scale" cloud applications "on the edge" by adding server instances. (So far, haven't considered scaling the interior of the cloud).

Can scale cloud applications on the edge by adding server instances. (So far, haven't considered scaling the interior of the cloud). Recall: where we are Wednesday, February 17, 2010 11:12 AM Recall: where we are Can "scale" cloud applications "on the edge" by adding server instances. (So far, haven't considered scaling the interior

More information

The CAP theorem. The bad, the good and the ugly. Michael Pfeiffer Advanced Networking Technologies FG Telematik/Rechnernetze TU Ilmenau

The CAP theorem. The bad, the good and the ugly. Michael Pfeiffer Advanced Networking Technologies FG Telematik/Rechnernetze TU Ilmenau The CAP theorem The bad, the good and the ugly Michael Pfeiffer Advanced Networking Technologies FG Telematik/Rechnernetze TU Ilmenau 2017-05-15 1 / 19 1 The bad: The CAP theorem s proof 2 The good: A

More information

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi 1 Lecture Notes 1 Basic Concepts Anand Tripathi CSci 8980 Operating Systems Anand Tripathi CSci 8980 1 Distributed Systems A set of computers (hosts or nodes) connected through a communication network.

More information

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs 1 Anand Tripathi CSci 8980 Operating Systems Lecture Notes 1 Basic Concepts Distributed Systems A set of computers (hosts or nodes) connected through a communication network. Nodes may have different speeds

More information

Performance and Forgiveness. June 23, 2008 Margo Seltzer Harvard University School of Engineering and Applied Sciences

Performance and Forgiveness. June 23, 2008 Margo Seltzer Harvard University School of Engineering and Applied Sciences Performance and Forgiveness June 23, 2008 Margo Seltzer Harvard University School of Engineering and Applied Sciences Margo Seltzer Architect Outline A consistency primer Techniques and costs of consistency

More information

Horizontal or vertical scalability? Horizontal scaling is challenging. Today. Scaling Out Key-Value Storage

Horizontal or vertical scalability? Horizontal scaling is challenging. Today. Scaling Out Key-Value Storage Horizontal or vertical scalability? Scaling Out Key-Value Storage COS 418: Distributed Systems Lecture 8 Kyle Jamieson Vertical Scaling Horizontal Scaling [Selected content adapted from M. Freedman, B.

More information

Apache Cassandra - A Decentralized Structured Storage System

Apache Cassandra - A Decentralized Structured Storage System Apache Cassandra - A Decentralized Structured Storage System Avinash Lakshman Prashant Malik from Facebook Presented by: Oded Naor Acknowledgments Some slides are based on material from: Idit Keidar, Topics

More information

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL CISC 7610 Lecture 5 Distributed multimedia databases Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL Motivation YouTube receives 400 hours of video per minute That is 200M hours

More information

6.830 Lecture Recovery 10/30/2017

6.830 Lecture Recovery 10/30/2017 6.830 Lecture 14 -- Recovery 10/30/2017 Have been talking about transactions Transactions -- what do they do? Awesomely powerful abstraction -- programmer can run arbitrary mixture of commands that read

More information

CSE 344 Final Review. August 16 th

CSE 344 Final Review. August 16 th CSE 344 Final Review August 16 th Final In class on Friday One sheet of notes, front and back cost formulas also provided Practice exam on web site Good luck! Primary Topics Parallel DBs parallel join

More information

CS October 2017

CS October 2017 Atomic Transactions Transaction An operation composed of a number of discrete steps. Distributed Systems 11. Distributed Commit Protocols All the steps must be completed for the transaction to be committed.

More information

Consistency. CS 475, Spring 2018 Concurrent & Distributed Systems

Consistency. CS 475, Spring 2018 Concurrent & Distributed Systems Consistency CS 475, Spring 2018 Concurrent & Distributed Systems Review: 2PC, Timeouts when Coordinator crashes What if the bank doesn t hear back from coordinator? If bank voted no, it s OK to abort If

More information

Data Modeling and Databases Ch 14: Data Replication. Gustavo Alonso, Ce Zhang Systems Group Department of Computer Science ETH Zürich

Data Modeling and Databases Ch 14: Data Replication. Gustavo Alonso, Ce Zhang Systems Group Department of Computer Science ETH Zürich Data Modeling and Databases Ch 14: Data Replication Gustavo Alonso, Ce Zhang Systems Group Department of Computer Science ETH Zürich Database Replication What is database replication The advantages of

More information

Introduction Aggregate data model Distribution Models Consistency Map-Reduce Types of NoSQL Databases

Introduction Aggregate data model Distribution Models Consistency Map-Reduce Types of NoSQL Databases Introduction Aggregate data model Distribution Models Consistency Map-Reduce Types of NoSQL Databases Key-Value Document Column Family Graph John Edgar 2 Relational databases are the prevalent solution

More information

Goal of the presentation is to give an introduction of NoSQL databases, why they are there.

Goal of the presentation is to give an introduction of NoSQL databases, why they are there. 1 Goal of the presentation is to give an introduction of NoSQL databases, why they are there. We want to present "Why?" first to explain the need of something like "NoSQL" and then in "What?" we go in

More information

CA485 Ray Walshe NoSQL

CA485 Ray Walshe NoSQL NoSQL BASE vs ACID Summary Traditional relational database management systems (RDBMS) do not scale because they adhere to ACID. A strong movement within cloud computing is to utilize non-traditional data

More information

CISC 7610 Lecture 2b The beginnings of NoSQL

CISC 7610 Lecture 2b The beginnings of NoSQL CISC 7610 Lecture 2b The beginnings of NoSQL Topics: Big Data Google s infrastructure Hadoop: open google infrastructure Scaling through sharding CAP theorem Amazon s Dynamo 5 V s of big data Everyone

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

6.830 Lecture Recovery 10/30/2017

6.830 Lecture Recovery 10/30/2017 6.830 Lecture 14 -- Recovery 10/30/2017 Have been talking about transactions Transactions -- what do they do? Awesomely powerful abstraction -- programmer can run arbitrary mixture of commands that read

More information

So far, Wednesday, February 03, :47 PM. So far,

So far, Wednesday, February 03, :47 PM. So far, Binding_and_Refinement Page 1 So far, 3:47 PM So far, We've created a simple persistence project with cloud references. There were lots of relationships between entities that must be fulfilled. How do

More information

Source control with Subversion A user perspective

Source control with Subversion A user perspective http://svnbook.red-bean.com/ Source control with Subversion A user perspective Aaron Ponti What is Subversion? } It is a free and open-source version control system } It manages files and directories,

More information

Cassandra, MongoDB, and HBase. Cassandra, MongoDB, and HBase. I have chosen these three due to their recent

Cassandra, MongoDB, and HBase. Cassandra, MongoDB, and HBase. I have chosen these three due to their recent Tanton Jeppson CS 401R Lab 3 Cassandra, MongoDB, and HBase Introduction For my report I have chosen to take a deeper look at 3 NoSQL database systems: Cassandra, MongoDB, and HBase. I have chosen these

More information

Consistency in Distributed Systems

Consistency in Distributed Systems Consistency in Distributed Systems Recall the fundamental DS properties DS may be large in scale and widely distributed 1. concurrent execution of components 2. independent failure modes 3. transmission

More information

NoSQL systems: sharding, replication and consistency. Riccardo Torlone Università Roma Tre

NoSQL systems: sharding, replication and consistency. Riccardo Torlone Università Roma Tre NoSQL systems: sharding, replication and consistency Riccardo Torlone Università Roma Tre Data distribution NoSQL systems: data distributed over large clusters Aggregate is a natural unit to use for data

More information

CIB Session 12th NoSQL Databases Structures

CIB Session 12th NoSQL Databases Structures CIB Session 12th NoSQL Databases Structures By: Shahab Safaee & Morteza Zahedi Software Engineering PhD Email: safaee.shx@gmail.com, morteza.zahedi.a@gmail.com cibtrc.ir cibtrc cibtrc 2 Agenda What is

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2015 Lecture 14 NoSQL

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2015 Lecture 14 NoSQL CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2015 Lecture 14 NoSQL References Scalable SQL and NoSQL Data Stores, Rick Cattell, SIGMOD Record, December 2010 (Vol. 39, No.

More information

Scalability of web applications

Scalability of web applications Scalability of web applications CSCI 470: Web Science Keith Vertanen Copyright 2014 Scalability questions Overview What's important in order to build scalable web sites? High availability vs. load balancing

More information

Big Data Management and NoSQL Databases

Big Data Management and NoSQL Databases NDBI040 Big Data Management and NoSQL Databases Lecture 11. Advanced Aspects of Big Data Management Doc. RNDr. Irena Holubova, Ph.D. holubova@ksi.mff.cuni.cz http://www.ksi.mff.cuni.cz/~holubova/ndbi040/

More information

NewSQL Database for New Real-time Applications

NewSQL Database for New Real-time Applications Cologne, Germany May 30, 2012 NewSQL Database for New Real-time Applications PhD Peter Idestam-Almquist CTO, Starcounter AB 1 New real time applications Millions of simultaneous online users. High degree

More information

Integrity in Distributed Databases

Integrity in Distributed Databases Integrity in Distributed Databases Andreas Farella Free University of Bozen-Bolzano Table of Contents 1 Introduction................................................... 3 2 Different aspects of integrity.....................................

More information

A Survey Paper on NoSQL Databases: Key-Value Data Stores and Document Stores

A Survey Paper on NoSQL Databases: Key-Value Data Stores and Document Stores A Survey Paper on NoSQL Databases: Key-Value Data Stores and Document Stores Nikhil Dasharath Karande 1 Department of CSE, Sanjay Ghodawat Institutes, Atigre nikhilkarande18@gmail.com Abstract- This paper

More information

Transactions. ACID Properties of Transactions. Atomicity - all or nothing property - Fully performed or not at all

Transactions. ACID Properties of Transactions. Atomicity - all or nothing property - Fully performed or not at all Transactions - An action, or series of actions, carried out by a single user or application program, which reads or updates the contents of the database - Logical unit of work on the database - Usually

More information

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

BEAAquaLogic. Service Bus. Interoperability With EJB Transport BEAAquaLogic Service Bus Interoperability With EJB Transport Version 3.0 Revised: February 2008 Contents EJB Transport Introduction...........................................................1-1 Invoking

More information

Scaling Out Key-Value Storage

Scaling Out Key-Value Storage Scaling Out Key-Value Storage COS 418: Distributed Systems Logan Stafman [Adapted from K. Jamieson, M. Freedman, B. Karp] Horizontal or vertical scalability? Vertical Scaling Horizontal Scaling 2 Horizontal

More information

CS5412: TRANSACTIONS (I)

CS5412: TRANSACTIONS (I) 1 CS5412: TRANSACTIONS (I) Lecture XVI Ken Birman Transactions 2 A widely used reliability technology, despite the BASE methodology we use in the first tier Goal for this lecture and the next one: in-depth

More information

Announcements. SQL: Part IV. Transactions. Summary of SQL features covered so far. Fine prints. SQL transactions. Reading assignments for this week

Announcements. SQL: Part IV. Transactions. Summary of SQL features covered so far. Fine prints. SQL transactions. Reading assignments for this week Announcements 2 SQL: Part IV CPS 216 Advanced Database Systems Reading assignments for this week A Critique of ANSI SQL Isolation Levels, by Berenson et al. in SIGMOD 1995 Weaving Relations for Cache Performance,

More information

Introduction to Databases

Introduction to Databases Introduction to Databases Matthew J. Graham CACR Methods of Computational Science Caltech, 2009 January 27 - Acknowledgements to Julian Bunn and Ed Upchurch what is a database? A structured collection

More information

Strong Consistency & CAP Theorem

Strong Consistency & CAP Theorem Strong Consistency & CAP Theorem CS 240: Computing Systems and Concurrency Lecture 15 Marco Canini Credits: Michael Freedman and Kyle Jamieson developed much of the original material. Consistency models

More information

Data Consistency Now and Then

Data Consistency Now and Then Data Consistency Now and Then Todd Schmitter JPMorgan Chase June 27, 2017 Room #208 Data consistency in real life Social media Facebook post: January 22, 2017, at a political rally Comments displayed are

More information

An overview of this unit. Wednesday, March 30, :33 PM

An overview of this unit. Wednesday, March 30, :33 PM Process Page 1 An overview of this unit Wednesday, March 30, 2011 3:33 PM Businesses implement business processes Interacting human and computing components. Arrows depict information exchange. With a

More information

CMPT 354: Database System I. Lecture 11. Transaction Management

CMPT 354: Database System I. Lecture 11. Transaction Management CMPT 354: Database System I Lecture 11. Transaction Management 1 Why this lecture DB application developer What if crash occurs, power goes out, etc? Single user à Multiple users 2 Outline Transaction

More information

Engineering Robust Server Software

Engineering Robust Server Software Engineering Robust Server Software Scalability Other Scalability Issues Database Load Testing 2 Databases Most server applications use databases Very complex pieces of software Designed for scalability

More information

Distributed Data Store

Distributed Data Store Distributed Data Store Large-Scale Distributed le system Q: What if we have too much data to store in a single machine? Q: How can we create one big filesystem over a cluster of machines, whose data is

More information

INFO-H415 Adanvanced Databases Documents store and cloudant

INFO-H415 Adanvanced Databases Documents store and cloudant INFO-H413 Heuristic Optimization Implemenation Exercise 1 Dany S Efila ULB 000349507 Universite Libre de Bruxelles Avril 2017 INFO-H415 Adanvanced Databases Documents store and cloudant Dany S EFILA Michel

More information

File systems, databases, cloud storage

File systems, databases, cloud storage File systems, databases, cloud storage file: a sequence of bytes stored on a computer content is arbitrary (just bytes); any structure is imposed by the creator of the file, not by the operating system

More information

Database Availability and Integrity in NoSQL. Fahri Firdausillah [M ]

Database Availability and Integrity in NoSQL. Fahri Firdausillah [M ] Database Availability and Integrity in NoSQL Fahri Firdausillah [M031010012] What is NoSQL Stands for Not Only SQL Mostly addressing some of the points: nonrelational, distributed, horizontal scalable,

More information

Distributed Systems. 16. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 16. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 16. Distributed Lookup Paul Krzyzanowski Rutgers University Fall 2017 1 Distributed Lookup Look up (key, value) Cooperating set of nodes Ideally: No central coordinator Some nodes can

More information

10. Replication. Motivation

10. Replication. Motivation 10. Replication Page 1 10. Replication Motivation Reliable and high-performance computation on a single instance of a data object is prone to failure. Replicate data to overcome single points of failure

More information

CMU SCS CMU SCS Who: What: When: Where: Why: CMU SCS

CMU SCS CMU SCS Who: What: When: Where: Why: CMU SCS Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB s C. Faloutsos A. Pavlo Lecture#23: Distributed Database Systems (R&G ch. 22) Administrivia Final Exam Who: You What: R&G Chapters 15-22

More information

MITOCW ocw apr k

MITOCW ocw apr k MITOCW ocw-6.033-32123-06apr2005-220k Good afternoon. So we're going to continue our discussion about atomicity and how to achieve atomicity. And today the focus is going to be on implementing this idea

More information

6.830 Lecture Transactions October 23, 2017

6.830 Lecture Transactions October 23, 2017 6.830 Lecture 12 -- Transactions October 23, 2017 Quiz 1 Back? Transaction Processing: Today: Transactions -- focus on concurrency control today Transactions One of the 'big ideas in computer science'

More information

Lecture 17 : Distributed Transactions 11/8/2017

Lecture 17 : Distributed Transactions 11/8/2017 Lecture 17 : Distributed Transactions 11/8/2017 Today: Two-phase commit. Last time: Parallel query processing Recap: Main ways to get parallelism: Across queries: - run multiple queries simultaneously

More information

Epilogue. Thursday, December 09, 2004

Epilogue. Thursday, December 09, 2004 Epilogue Thursday, December 09, 2004 2:16 PM We have taken a rather long journey From the physical hardware, To the code that manages it, To the optimal structure of that code, To models that describe

More information

Scaling KVS. CS6450: Distributed Systems Lecture 14. Ryan Stutsman

Scaling KVS. CS6450: Distributed Systems Lecture 14. Ryan Stutsman Scaling KVS CS6450: Distributed Systems Lecture 14 Ryan Stutsman Material taken/derived from Princeton COS-418 materials created by Michael Freedman and Kyle Jamieson at Princeton University. Licensed

More information

Family Map Server Specification

Family Map Server Specification Family Map Server Specification Acknowledgements The Family Map project was created by Jordan Wild. Thanks to Jordan for this significant contribution. Family Map Introduction Family Map is an application

More information

CS Final Exam Review Suggestions

CS Final Exam Review Suggestions CS 325 - Final Exam Review Suggestions p. 1 last modified: 2017-12-06 CS 325 - Final Exam Review Suggestions Based on suggestions from Prof. Deb Pires from UCLA: Because of the research-supported learning

More information

Consistency: Relaxed. SWE 622, Spring 2017 Distributed Software Engineering

Consistency: Relaxed. SWE 622, Spring 2017 Distributed Software Engineering Consistency: Relaxed SWE 622, Spring 2017 Distributed Software Engineering Review: HW2 What did we do? Cache->Redis Locks->Lock Server Post-mortem feedback: http://b.socrative.com/ click on student login,

More information

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints Active Endpoints ActiveVOS Platform Architecture ActiveVOS Unique process automation platforms to develop, integrate, and deploy business process applications quickly User Experience Easy to learn, use

More information

Building Consistent Transactions with Inconsistent Replication

Building Consistent Transactions with Inconsistent Replication Building Consistent Transactions with Inconsistent Replication Irene Zhang, Naveen Kr. Sharma, Adriana Szekeres, Arvind Krishnamurthy, Dan R. K. Ports University of Washington Distributed storage systems

More information

Webinar Series TMIP VISION

Webinar Series TMIP VISION Webinar Series TMIP VISION TMIP provides technical support and promotes knowledge and information exchange in the transportation planning and modeling community. Today s Goals To Consider: Parallel Processing

More information

CS 138: Dynamo. CS 138 XXIV 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

CS 138: Dynamo. CS 138 XXIV 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. CS 138: Dynamo CS 138 XXIV 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Dynamo Highly available and scalable distributed data store Manages state of services that have high reliability and

More information

CS6450: Distributed Systems Lecture 15. Ryan Stutsman

CS6450: Distributed Systems Lecture 15. Ryan Stutsman Strong Consistency CS6450: Distributed Systems Lecture 15 Ryan Stutsman Material taken/derived from Princeton COS-418 materials created by Michael Freedman and Kyle Jamieson at Princeton University. Licensed

More information

Extreme Computing. NoSQL.

Extreme Computing. NoSQL. Extreme Computing NoSQL PREVIOUSLY: BATCH Query most/all data Results Eventually NOW: ON DEMAND Single Data Points Latency Matters One problem, three ideas We want to keep track of mutable state in a scalable

More information

TRANSACTIONS AND ABSTRACTIONS

TRANSACTIONS AND ABSTRACTIONS TRANSACTIONS AND ABSTRACTIONS OVER HBASE Andreas Neumann @anew68! Continuuity AGENDA Transactions over HBase: Why? What? Implementation: How? The approach Transaction Manager Abstractions Future WHO WE

More information

Databases : Lecture 1 2: Beyond ACID/Relational databases Timothy G. Griffin Lent Term Apologies to Martin Fowler ( NoSQL Distilled )

Databases : Lecture 1 2: Beyond ACID/Relational databases Timothy G. Griffin Lent Term Apologies to Martin Fowler ( NoSQL Distilled ) Databases : Lecture 1 2: Beyond ACID/Relational databases Timothy G. Griffin Lent Term 2016 Rise of Web and cluster-based computing NoSQL Movement Relationships vs. Aggregates Key-value store XML or JSON

More information

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson Distributed systems Lecture 6: Elections, distributed transactions, and replication DrRobert N. M. Watson 1 Last time Saw how we can build ordered multicast Messages between processes in a group Need to

More information

IBM Rational Software

IBM Rational Software IBM Rational Software Development Conference 2008 Introduction to the Jazz Technology Platform: Architecture Overview and Extensibility Scott Rich Distinguished Engineer, Jazz Architect IBM Rational SDP21

More information

Java Enterprise Edition

Java Enterprise Edition Java Enterprise Edition The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Make sure you have the latest Hive trunk by running svn up in your Hive directory. More detailed instructions on downloading and setting up

Make sure you have the latest Hive trunk by running svn up in your Hive directory. More detailed instructions on downloading and setting up GenericUDAFCaseStudy Writing GenericUDAFs: A Tutorial User-Defined Aggregation Functions (UDAFs) are an excellent way to integrate advanced data-processing into Hive. Hive allows two varieties of UDAFs:

More information

Important Lessons. Today's Lecture. Two Views of Distributed Systems

Important Lessons. Today's Lecture. Two Views of Distributed Systems Important Lessons Replication good for performance/ reliability Key challenge keeping replicas up-to-date Wide range of consistency models Will see more next lecture Range of correctness properties L-10

More information

DATABASE TRANSACTIONS. CS121: Relational Databases Fall 2017 Lecture 25

DATABASE TRANSACTIONS. CS121: Relational Databases Fall 2017 Lecture 25 DATABASE TRANSACTIONS CS121: Relational Databases Fall 2017 Lecture 25 Database Transactions 2 Many situations where a sequence of database operations must be treated as a single unit A combination of

More information

IBD Intergiciels et Bases de Données

IBD Intergiciels et Bases de Données IBD Intergiciels et Bases de Données RMI-based distributed systems Fabien Gaud, Fabien.Gaud@inrialpes.fr Overview of lectures and practical work Lectures Introduction to distributed systems and middleware

More information

CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris

CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris 1 Outline What is a database? The database approach Advantages Disadvantages Database users Database concepts and System architecture

More information

Distributed Hash Tables

Distributed Hash Tables Distributed Hash Tables What is a DHT? Hash Table data structure that maps keys to values essen=al building block in so?ware systems Distributed Hash Table (DHT) similar, but spread across many hosts Interface

More information

Riak. Distributed, replicated, highly available

Riak. Distributed, replicated, highly available INTRO TO RIAK Riak Overview Riak Distributed Riak Distributed, replicated, highly available Riak Distributed, highly available, eventually consistent Riak Distributed, highly available, eventually consistent,

More information

CS 241 Honors Concurrent Data Structures

CS 241 Honors Concurrent Data Structures CS 241 Honors Concurrent Data Structures Bhuvan Venkatesh University of Illinois Urbana Champaign March 27, 2018 CS 241 Course Staff (UIUC) Lock Free Data Structures March 27, 2018 1 / 43 What to go over

More information

Copyright 2016 Pivotal. All rights reserved. Cloud Native Design. Includes 12 Factor Apps

Copyright 2016 Pivotal. All rights reserved. Cloud Native Design. Includes 12 Factor Apps 1 Cloud Native Design Includes 12 Factor Apps Topics 12-Factor Applications Cloud Native Design Guidelines 2 http://12factor.net Outlines architectural principles and patterns for modern apps Focus on

More information

Introduction to NoSQL Databases

Introduction to NoSQL Databases Introduction to NoSQL Databases Roman Kern KTI, TU Graz 2017-10-16 Roman Kern (KTI, TU Graz) Dbase2 2017-10-16 1 / 31 Introduction Intro Why NoSQL? Roman Kern (KTI, TU Graz) Dbase2 2017-10-16 2 / 31 Introduction

More information

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 14 Distributed Transactions

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 14 Distributed Transactions CSE 544 Principles of Database Management Systems Alvin Cheung Fall 2015 Lecture 14 Distributed Transactions Transactions Main issues: Concurrency control Recovery from failures 2 Distributed Transactions

More information

CS /15/16. Paul Krzyzanowski 1. Question 1. Distributed Systems 2016 Exam 2 Review. Question 3. Question 2. Question 5.

CS /15/16. Paul Krzyzanowski 1. Question 1. Distributed Systems 2016 Exam 2 Review. Question 3. Question 2. Question 5. Question 1 What makes a message unstable? How does an unstable message become stable? Distributed Systems 2016 Exam 2 Review Paul Krzyzanowski Rutgers University Fall 2016 In virtual sychrony, a message

More information

Consistency in Distributed Storage Systems. Mihir Nanavati March 4 th, 2016

Consistency in Distributed Storage Systems. Mihir Nanavati March 4 th, 2016 Consistency in Distributed Storage Systems Mihir Nanavati March 4 th, 2016 Today Overview of distributed storage systems CAP Theorem About Me Virtualization/Containers, CPU microarchitectures/caches, Network

More information

Writing an Axis2 Service from Scratch By Deepal Jayasinghe Axis2 has designed and implemented in a way that makes the end user's job easier. Once he has learnt and understood the Axis2 basics, working

More information

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title Notes Ask course content questions on Slack (is651-spring-2018.slack.com) Contact me by email to add you to Slack Make sure you checked Additional Links at homework page before you ask In-class discussion

More information