

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















So far, we've been studying what business wants clouds to do. Now, for a brief time, let's study what computer scientists want the cloud to do. A real trip on the wild side OOM more work with OOM less code. The CALM principle. An implementation: "Bloom". First paper: 2011. This is hot ; really hot! Several key ideas: A real trip on the wild side Wednesday, April 27, 2011 10:26 AM Docsity.com
OOM=orders of magnitude OOM more work: more useful computation OOM less code: less drudge work. Source: Berkeley's BOOM project. OOM more work with OOM less code OOM Wednesday, April 27, 2011 10:28 AM Docsity.com
Logically monotonic code is eventually consistent without locking. We can make non-monotonic code logically monotonic by use of locking, at what CALM calls points of order. Compute the list of keywords that appeared yesterday. Let them become (eventually) consistent. Then form the negation. (A naïve view… I will make this more precise in a second) Example: to make the non-monotonic example on the previous page monotonic, we change the problem: The point of CALM Points of order Wednesday, April 27, 2011 10:36 AM Docsity.com
temporal logic , eventual consistency , and logical monotonicity. A language framework for disorderly programming in clouds. Based upon Bloom Bloom Wednesday, April 27, 2011 10:41 AM Docsity.com
A dialect of ruby with distributed objects and operators. Basics of BUD table :clouds, [:key] =>[:value] Pasted from a distributed object logically, a set :key, :value are field names (ruby atoms). keys are unique values need not be unique can have keys or values that are themselves tuples defines a table, which is a set of key-value pairs Basic data structure: a table Basics of BUD Wednesday, April 27, 2011 11:21 AM Docsity.com
Bud has its roots in Prolog: logic programming It is perhaps best to think of a bud table as a set of facts. A fact, once known, is not forgotten. But a fact, once known, remains known. This is the crux of logical monotonicity. Collections, Sets, and Facts Create new collections from them. Merge collections into them. You cannot delete from collections, but you can bind collections together via difference operations. You can do only two things with collections: Collections, Sets, and Facts Wednesday, April 27, 2011 2:43 PM Docsity.com
Keywords that are mentioned today but not yesterday today <~ some_keyword_search yesterday <~ another_keyword_search today <- yesterday
A simple quandary solved We start off two asynchronous search processes to determine "today" and "yesterday". When today and yesterday merges finish, we present today without yesterday's keys. But how does this work? A simple quandary solved Wednesday, April 27, 2011 12:25 PM Docsity.com
Nothing we currently know about is a good analogue of a bud table. It is best to think of a bud table as being like a continuous query in SQL. It doesn't define "what to do with data you have. " It defines "what to do with data you get ." Continuous queries Continuous queries Wednesday, April 27, 2011 4:04 PM Docsity.com
A deferred subtraction is not an action, but rather, a binding. It says: from now on, return for the value of x, the things that are in x but not in y. No matter how y changes. You can bind multiple sets to x. you cannot subtract an element from a set. You can bind sets together, so that the binding implements a subtraction, while both sets are computed via monotonic logic! Note that: A better model of deferral Wednesday, April 27, 2011 4:09 PM Docsity.com
The schema for a table determines what parts constitute the key and what parts constitute the value. [:key]=>[:value], The default schema for a table is which means that an arbitrary element e has parts e.key and e.value. table :foo [:k1, :k2] => [:v1, :v2, :v3] Can make any table have an arbitrary schema via, e.g., [e.k1, e.k2, e.v1, e.v2, e.v3] where e is an element constructs a table foo that consists of quintuples Schemas Schemas Wednesday, April 27, 2011 2:37 PM Docsity.com
A grouping in Bud always has the outcome of creating aggregate data. There is no such thing as a Pig grouping that creates hierarchy. t1 has schema [:game] => [:player, :score] Example: if totals <= t1.groupby([:player],sum(:score)) then has schema [:player]=>[:score] (Implicitly, the grouped thing becomes a key!) Groupings count, sum, choose, avg, min, max... Builtin aggregate functions: Groupings Wednesday, April 27, 2011 2:49 PM Docsity.com
As in Pig, one useful construction is the cross product. keys that are pairs of keys from t1, t2, values that are pairs of values. For tables t1 and t2, (t1 * t2) is a new table with I.e., if k1 => v1 is in t1 and k2 => v2 is in t2, then [k1,k2] => [v1,v2] is in t1 * t Products In Pig, this is equivalent with CROSS Products Wednesday, April 27, 2011 12:34 PM Docsity.com
Bud is at least as powerful as Pig FILTER-BY FOREACH-GENERATE COGROUP-BY etc… Demonstration: Are all implementable in Bud. A simple claim But wait, there's more! A simple claim Wednesday, April 27, 2011 3:01 PM Docsity.com
A bloom program executes in ticks. Until a tick, all statements are considered to be declarations. At a tick, statements are executed and the results are cached. (Compare with pig's "store" command). A tick is logically equivalent to a barrier synchronization , i.e., it waits for (eventual) consistency of the affected tables. Merges and ticks Merges and ticks Wednesday, April 27, 2011 11:21 AM Docsity.com