Top Banner
The magic is in The magic is in the glue the glue XQuery+Cloud XQuery+Cloud Daniela Florescu Daniela Florescu Oracle Oracle
57

The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

Dec 27, 2015

Download

Documents

Thomasine Webb
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

The magic is in the The magic is in the glueglue

XQuery+CloudXQuery+CloudDaniela Florescu Daniela Florescu

OracleOracle

Page 2: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

2

My personal historyMy personal history

PhD in object-oriented query PhD in object-oriented query processing/optimizationprocessing/optimization

Loved the database theory and Loved the database theory and practice (relational, object-oriented, practice (relational, object-oriented, semi-structured)semi-structured)

Got really interested in it, and Got really interested in it, and thought it was important…thought it was important…

…….then I joined Oracle..then I joined Oracle.

Page 3: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

3

… … after 4 years in Oracleafter 4 years in OracleApplications are the Applications are the reallyreally important issue important issue

How to develop, deploy, maintain, evolve, How to develop, deploy, maintain, evolve, customizecustomize

Databases are a side effectDatabases are a side effectCustomers are educated to think they need themCustomers are educated to think they need them

DB are only useful as part of a general application DB are only useful as part of a general application architecturearchitecture

Customer is the kingCustomer is the kingIf they don’t make $$$, you don’t eitherIf they don’t make $$$, you don’t either

Customers are Customers are in painin pain building apps right building apps right nownow

Page 4: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

4

AgendaAgenda

Current Current painpain in building apps in building apps

What can What can XQueryXQuery do for customers ? do for customers ?

What can the What can the Cloud Cloud do for customers ?do for customers ?

How do we put them How do we put them togethertogether ? ?

How do XQuery+Cloud How do XQuery+Cloud solvesolve the the problem ?problem ?

Some Some open researchopen research problems problems

Page 5: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

5

Imagine I am a customer, I Imagine I am a customer, I need to build a new app.need to build a new app.

1.1. How much does itHow much does it cost costCost of developing the app (salaries)Cost of developing the app (salaries)

Cost of deploying the appCost of deploying the appHardware, software licenses, maintenanceHardware, software licenses, maintenance

Loss of income because of mis-Loss of income because of mis-provisioning provisioning

Do I have to pay up front?Do I have to pay up front?

Is the cost proportional with the Is the cost proportional with the income ?income ?

Page 6: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

6

Other questions ?Other questions ?2.2. How How fastfast can I deliver the appcan I deliver the app

Quicker on the market then my competitors ?Quicker on the market then my competitors ?

3.3. How How goodgood the application is the application isMore customers for the app. => more incomeMore customers for the app. => more incomeAcceptable operational characteristics ?Acceptable operational characteristics ?

4.4. Can ICan I adaptadapt if something changes ? if something changes ?Operational characteristics Operational characteristics FunctionalityFunctionality

5.5. Can I Can I customizecustomize the same app in a the same app in a different vertical / different set of different vertical / different set of customers ?customers ?

6.6. Is there a Is there a risk risk in the technology ?in the technology ?

Page 7: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

7

Customers concernsCustomers concerns

CostCost

Time to marketTime to market

FlexibilityFlexibility

CustomizabilityCustomizability

SustainabilitySustainability

RiskRisk

Often a tradeoffOften a tradeoff

Page 8: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

8

Different classes of Different classes of customerscustomersEnterprise (e.g. Bank of America)Enterprise (e.g. Bank of America)

CostCostSustainabilitySustainabilityRiskRiskCustomizabilityCustomizabilityFlexibilityFlexibilityTime to marketTime to market

Government agency (eg. DoD)Government agency (eg. DoD)SustainabilitySustainabilityCostCostTime to market (?)Time to market (?)Flexibility (?)Flexibility (?)CustomizabilityCustomizabilityRiskRisk

Consumer (e.g Craiglist)Consumer (e.g Craiglist)Time to marketTime to marketCostCostFlexibilityFlexibilityCustomizabilityCustomizabilitySustainabilitySustainabilityRiskRisk

Page 9: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

9

Typical enterprise app Typical enterprise app stackstack

CommunicationCommunication(XML, REST, WS)(XML, REST, WS)

Application logicApplication logic(Java, C#)(Java, C#)

DatabaseDatabaseSQL)SQL)

OracleOracleIBMIBMSAPSAP

MicrosoftMicrosoft

Page 10: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

10

Cost ? $$$$!Cost ? $$$$!

CommunicationCommunication(XML, REST, WS)(XML, REST, WS)

Application logicApplication logic(Java, C#)(Java, C#)

DatabaseDatabaseSQL)SQL)

Cost of developing the app Cost of developing the app

Cost of deploying the appCost of deploying the app(hardware, software licenses, (hardware, software licenses, maintenance)maintenance)

Loss of income because of mis-Loss of income because of mis-provisioning provisioning

Do I have to pay up front?Do I have to pay up front?

Is the cost proportional with the income ?Is the cost proportional with the income ?

Page 11: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

11

Time to market ? Years!Time to market ? Years!

CommunicationCommunication(XML, REST, WS)(XML, REST, WS)

Application logicApplication logic(Java, C#)(Java, C#)

DatabaseDatabaseSQL)SQL)

2.2. How How fastfast can I deliver the app can I deliver the app

Page 12: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

12

Flexibility ? Flexibility ? Customizability? Hardly Customizability? Hardly any !any ! CommunicationCommunication

(XML, REST, WS)(XML, REST, WS)

Application logicApplication logic(Java, C#)(Java, C#)

DatabaseDatabaseSQL)SQL)

Can ICan I adapt adapt if something changes ? if something changes ?Operational characteristics Operational characteristics

FunctionalityFunctionality

Can I customise it to a different vertical?Can I customise it to a different vertical?

Oracle experience: for every $1M Oracle experience: for every $1M

for Oracle app licenses, customersfor Oracle app licenses, customers

pay $2M to customize it.pay $2M to customize it.

(SAP experience even worse :-)(SAP experience even worse :-)

Page 13: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

13

Two major evil pointsTwo major evil points

1.1. Multi layer infrastructureMulti layer infrastructure2.2. Schemas a pre-requisiteSchemas a pre-requisite

New apps:New apps:Even the Oracle apps !Even the Oracle apps !

New platforms:New platforms:Salesforce, GoogleApps, FacebookSalesforce, GoogleApps, Facebook

CommunicationCommunication

Application Application LogicLogic

(schema-less)(schema-less)

Persistent (key, value) storePersistent (key, value) store(schema-less)(schema-less)

XQuery a possible solution.XQuery a possible solution.

putputgetget

Page 14: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

14

Another evil pointAnother evil point

Lack of Lack of cost elasticitycost elasticityCost proportional with incomeCost proportional with income

Lack of Lack of elasticity in performanceelasticity in performanceResponse time independent of # clientsResponse time independent of # clients

The Cloud is the beginning of a solution.The Cloud is the beginning of a solution.

Page 15: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

15

AgendaAgenda

Current Current painpain in building apps in building apps

What can What can XQueryXQuery do for customers ? do for customers ?

What can the What can the Cloud Cloud do for customers ?do for customers ?

How do we put them How do we put them togethertogether ? ?

How do XQuery+Cloud How do XQuery+Cloud solvesolve the the problem ?problem ?

Some Some open researchopen research problems problems

Page 16: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

16

Why XML ?Why XML ?

Covers all spectrum from Covers all spectrum from structuredstructured data to data to textual textual information information

Schema independent Schema independent

Platform independentPlatform independent

Continuity with the basic Internet Continuity with the basic Internet infrastructure (URI, HTML, HTTP)infrastructure (URI, HTML, HTTP)

Page 17: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

17

What is XQuery ?What is XQuery ?A programming language for XML processingA programming language for XML processing

Functional in styleFunctional in style

Turing completeTuring complete

Contains:Contains:NavigationNavigation

Declarative query and aggregation (FLWOR)Declarative query and aggregation (FLWOR)

Search (full text)Search (full text)

Declarative updatesDeclarative updates

TransformsTransforms

ScriptingScripting

Streaming and windowingStreaming and windowing

Error handling and second order expressionsError handling and second order expressions

Packaging (modules)Packaging (modules)

Has limitations (further)Has limitations (further)

Page 18: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

18

History and statusHistory and status

Standard of the W3CStandard of the W3CGood and badGood and bad

10 years old10 years old

40 existing implementations40 existing implementations

Implemented in major databasesImplemented in major databases

Best implementations in open sourceBest implementations in open source

If you have XML data, it is hard to If you have XML data, it is hard to avoid.avoid.

Page 19: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

19

NavigationNavigation

fn:doc("catalog.xml") /items/itemfn:doc("catalog.xml") /items/item fn:doc("catalog.xml")/items//itemfn:doc("catalog.xml")/items//item

fn:doc("catalog.xml")/items//*fn:doc("catalog.xml")/items//*

fn:doc("catalog.xml")/items/@itemfn:doc("catalog.xml")/items/@item

fn:doc("parts.xml")/parts/part[partno = fn:doc("parts.xml")/parts/part[partno = $i/partno]$i/partno]

$x/items/item$x/items/item

Page 20: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

20

FLWORFLWOR

for $i in for $i in fn:doc("catalog.xml")/items/item, fn:doc("catalog.xml")/items/item,

$p in $p in fn:doc("parts.xml")/parts/part[partno fn:doc("parts.xml")/parts/part[partno = $i/partno], = $i/partno],

$s in $s in fn:doc("suppliers.xml")/suppliers fn:doc("suppliers.xml")/suppliers /supplier[suppno = $i/suppno] /supplier[suppno = $i/suppno]

order by $p/description, $s/suppnameorder by $p/description, $s/suppname

return $ s return $ s

Groupby, having, outerjoins, etcGroupby, having, outerjoins, etc

Page 21: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

21

Creation of new Creation of new informationinformation<descriptive-catalog> <descriptive-catalog>

{ for $i in fn:doc("catalog.xml")/items/item, { for $i in fn:doc("catalog.xml")/items/item,

$p in fn:doc("parts.xml")/parts/part[partno $p in fn:doc("parts.xml")/parts/part[partno = $i/partno], = $i/partno],

$s in fn:doc("suppliers.xml")/suppliers $s in fn:doc("suppliers.xml")/suppliers /supplier[suppno = $i/suppno] /supplier[suppno = $i/suppno]

order by $p/description, $s/suppname order by $p/description, $s/suppname

returnreturn <item> { $p/description, $s/suppname, <item> { $p/description, $s/suppname,

$i/price } $i/price }

</item> } </item> }

</descriptive-catalog> </descriptive-catalog>

Page 22: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

22

Textual searchTextual search

$doc ftcontains ( ( "mustang" ftand $doc ftcontains ( ( "mustang" ftand ({("great", "excellent")} any word ({("great", "excellent")} any word occurs at least 2 times) ) window 11 occurs at least 2 times) ) window 11 words ftand ftnot "rust" ) same words ftand ftnot "rust" ) same paragraph paragraph

Page 23: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

23

Declarative updatesDeclarative updates

for $p in /inventory/partfor $p in /inventory/part

let $deltap := $changes/part[partno eq let $deltap := $changes/part[partno eq $p/partno]$p/partno]

return return replace value of node $p/quantity with replace value of node $p/quantity with

$p/quantity + $deltap/quantity $p/quantity + $deltap/quantity

Page 24: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

24

TransformsTransforms

let $oldx := /a/b/x let $oldx := /a/b/x

return return copy $newx := $oldx copy $newx := $oldx

modify modify (rename node $newx as "newx", (rename node $newx as "newx",

replace value of node $newx by $newx * 2) replace value of node $newx by $newx * 2)

return ($oldx, $newx)return ($oldx, $newx)

Page 25: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

25

Streams and windowingStreams and windowing

for sliding window $w in (2, 4, 6, 8, 10, 12, for sliding window $w in (2, 4, 6, 8, 10, 12, 14) 14)

start at $s when fn:true() start at $s when fn:true()

only end at $e when $e - $s eq 2only end at $e when $e - $s eq 2

return <window>{ $w }</window> return <window>{ $w }</window>

Result of the above query:Result of the above query:<window>2 4 6</window><window>2 4 6</window>

<window>4 6 8</window><window>4 6 8</window>

<window>6 8 10</window><window>6 8 10</window>

<window>8 10 12</window> <window>8 10 12</window>

<window>10 12 14</window> <window>10 12 14</window>

Page 26: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

26

Scripting expressionsScripting expressionsblock block { {

declare $a as xs:integer := 0; declare $a as xs:integer := 0; declare $b as xs:integer := 1; declare $b as xs:integer := 1; declare $c as xs:integer := $a + $b; declare $c as xs:integer := $a + $b; declare $fibseq as xs:integer* := ($a, declare $fibseq as xs:integer* := ($a, $b); $b); while ($c < 100) while ($c < 100) { {

set $fibseq := set $fibseq := ($fibseq, $c); ($fibseq, $c);

set $a := $b; set $a := $b; set $b := $c; set $b := $c; set $c := $a + $b; set $c := $a + $b;

}; }; $fibseq; $fibseq;

} }

Page 27: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

27

Where can it be used in Where can it be used in today’s architectures?today’s architectures?

DatabasesDatabases

Middle tiersMiddle tiersInformation dispatchInformation dispatch

TransformationTransformation

Data integrationData integration

Browsers (see XQIB demo, WWW’09 Browsers (see XQIB demo, WWW’09 paper)paper)

Mobile devices Mobile devices (XQuery on iPhone (XQuery on iPhone anyone ?)anyone ?)

Page 28: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

28

XQuery’s real potentialXQuery’s real potential

Standalone Standalone programming programming language for language for information intensive information intensive applicationsapplications

Can build extremely Can build extremely rich applicationsrich applications

Application Application LogicLogic

(XQuery)(XQuery)

XMLXML XMLXML

XMLXML

Page 29: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

29

Why XQuery ?Why XQuery ?

Because of XMLBecause of XMLSchema independentSchema independentContinuity with basic Internet infrastructureContinuity with basic Internet infrastructureContinuity structured data <--> textual Continuity structured data <--> textual informationinformation

XQuery’s own advantagesXQuery’s own advantagesDeclarativeDeclarativeSingle layer codeSingle layer codeOpen source friendlyOpen source friendly

Extra GoodiesExtra GoodiesOpportunity to rethink ACID transactionsOpportunity to rethink ACID transactionsUnique opportunities for introspectionUnique opportunities for introspectionCode Code andand data migration data migration

1. Cost2. Time to market3. Flexibility4. Customizability5. Sustainability6. Risk

Page 30: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

30

DeclarativityDeclarativitySmall number of lines of codeSmall number of lines of code

Development costDevelopment cost

Time to marketTime to market

# bugs # bugs

Easy to optimize automaticallyEasy to optimize automatically

Easy to parallelize automaticallyEasy to parallelize automaticallyEspecially important in the cloudEspecially important in the cloud

Easier to achieve elasticity in performanceEasier to achieve elasticity in performance

Easier to generate automaticallyEasier to generate automaticallyImportant for smart/non-developers UIsImportant for smart/non-developers UIs

Page 31: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

31

Declarativity, negative Declarativity, negative sideside1.1. Less number of developers capable Less number of developers capable

of writing such codeof writing such code

2.2. Easy to write, harder to readEasy to write, harder to read

3.3. Tools harder to make (e.g. Tools harder to make (e.g. debuggers)debuggers)

4.4. Performance can be unstablePerformance can be unstable

Despite that, in the history of CS we evolve in the Despite that, in the history of CS we evolve in the direction of declarativitydirection of declarativity

Assembly, C, C++, Java, HaskellAssembly, C, C++, Java, HaskellCobol, SQLCobol, SQL

Page 32: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

32

Rethink transactions and Rethink transactions and data consistencydata consistency

XQuery silent as ACID transactions goXQuery silent as ACID transactions goOn purpose !On purpose !

Are ACID transactions really needed ?Are ACID transactions really needed ?

Are they really enforced in Web apps ?Are they really enforced in Web apps ?

No.No.

Open research fieldOpen research fieldInteraction of programming languages with new Interaction of programming languages with new transactional models and new data consistency transactional models and new data consistency modelsmodels

Page 33: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

33

Sigmod’08Sigmod’08Data consistency is something to optimize, not Data consistency is something to optimize, not an absolute requirementan absolute requirementData consistency models [Tanembaum]Data consistency models [Tanembaum]

Shared-Disk (NaShared-Disk (Naïïve approach)ve approach)No concurrency control at allNo concurrency control at all

Eventual Consistency (Basic Protocol)Eventual Consistency (Basic Protocol)Updates become visible any time and will persistUpdates become visible any time and will persistNo lost update on page levelNo lost update on page level

AtomicityAtomicityAll or no updates of a transaction become visibleAll or no updates of a transaction become visible

Monotonic reads, Read your writes, Monotonic Monotonic reads, Read your writes, Monotonic writes, ...writes, ...Strong ConsistencyStrong Consistency

database-style consistency (ACID) via OCCdatabase-style consistency (ACID) via OCC

Data consistency a la carteData consistency a la carte

Page 34: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

34

Introspection Introspection opportunitiesopportunitiesClosed worldClosed world

Everything is (or will be) XMLEverything is (or will be) XMLData, schemas, code, PULs, metadata, Data, schemas, code, PULs, metadata, configs, runtime informationconfigs, runtime information

Unique opportunity to:Unique opportunity to:introspect at runtime all of themintrospect at runtime all of them

reason about themreason about them

change them dynamically (not only data, change them dynamically (not only data, but schemas, code and configuration)but schemas, code and configuration)

Open research fieldOpen research field: : Consequences on programmingConsequences on programming

Page 35: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

35

Why NOT XQueryWhy NOT XQueryXML is complicatedXML is complicated

XML Schema is hard/impossible to understandXML Schema is hard/impossible to understand

XQuery is complicatedXQuery is complicated

XQuery is incomplete XQuery is incomplete (maybe research opport.?)(maybe research opport.?)Missing a standard persistent data modelMissing a standard persistent data model

Missing DDL functionality (indexes, integrity constraints)Missing DDL functionality (indexes, integrity constraints)

Missing basic functionalities (e.g. eval, function Missing basic functionalities (e.g. eval, function overloading)overloading)

Missing basic data modeling functionality (n:m Missing basic data modeling functionality (n:m relationships)relationships)

XQuery lacks a standard environment (e.g. J2EE) XQuery lacks a standard environment (e.g. J2EE) (maybe research opport.?)(maybe research opport.?)

No tools (debuggers, profilers) No tools (debuggers, profilers) (maybe research (maybe research opport.?)opport.?)

Performance is not clear yet Performance is not clear yet (certainly research (certainly research opport !)opport !)

There are few XQuery developers There are few XQuery developers (teaching (teaching opport opport ) )

Page 36: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

36

AgendaAgenda

Current Current painpain in building apps in building apps

What can What can XQueryXQuery do for customers ? do for customers ?

What can the What can the Cloud Cloud do for customers ?do for customers ?

How do we put them How do we put them togethertogether ? ?

How do XQuery+Cloud How do XQuery+Cloud solvesolve the the problem ?problem ?

Some Some open researchopen research problems problems

Page 37: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

37

What is Cloud What is Cloud Computing ?Computing ?The „rental cars“ paradigm for computingThe „rental cars“ paradigm for computing

Commoditization of (certain aspects of ) Commoditization of (certain aspects of ) ComputingComputing

CPU, storage, and networkCPU, storage, and network

Goal 1: Reduction of CostGoal 1: Reduction of Costprinciple: fine-grained renting of resourcesprinciple: fine-grained renting of resources

„„pay as you go“ (elasticity of cost)pay as you go“ (elasticity of cost)

Goal 2: Simplification of ManagementGoal 2: Simplification of Managementpotentially infinite/unbreakable computing potentially infinite/unbreakable computing resourcesresources

potentially no administrationpotentially no administration

Goal 3: Elasticity of performanceGoal 3: Elasticity of performanceSame resp time independently of workloadSame resp time independently of workload

Note: does not work yet for DB or appsNote: does not work yet for DB or apps

Page 38: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

38

Case Study: Amazon AWSCase Study: Amazon AWSEC2EC2 : scalable virtual private servers : scalable virtual private servers using Xen.using Xen.S3S3 : WS based storage for : WS based storage for applicationsapplicationsSQSSQS : hosted message queue for web : hosted message queue for web applicationsapplicationsSimpleDBSimpleDB : the core functionality of a : the core functionality of a databasedatabaseHadoopHadoop based functionality based functionalitySimilar providers:Similar providers: IBM Blue Cloud, IBM Blue Cloud, Microsoft Azure, (GoogleApp engine)Microsoft Azure, (GoogleApp engine)

Page 39: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

39

The limits of the (Amazon) The limits of the (Amazon) CloudCloud

Cloud Computing a great starting Cloud Computing a great starting pointpoint

Unfortunately, only a fraction of the Unfortunately, only a fraction of the stackstack

Hardware

DBMS

Application Server

Application

Customization, Training, ...

Page 40: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

40

Making use of the CloudMaking use of the Cloud

Solution 1 (conservative)Solution 1 (conservative)Take an existing application Take an existing application (Java+SQL, etc) and try to make (Java+SQL, etc) and try to make it run on the cloud (e.g. make it run on the cloud (e.g. make Oracle run on AWS)Oracle run on AWS)

Solution 2 (reactionary)Solution 2 (reactionary)Create an fresh new Create an fresh new infrastructure, specially infrastructure, specially designed for Web apps designed for Web apps requirements, to be deployed in requirements, to be deployed in the cloudthe cloud

BenefitBenefitRiskRisk

Page 41: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

41

Solution 1 (conservative) Solution 1 (conservative) take a traditional DBMS (e.g., Oracle, MySQL, ...)take a traditional DBMS (e.g., Oracle, MySQL, ...)install it on an EC2 instanceinstall it on an EC2 instanceuse S3 or EBS as a persistent storeuse S3 or EBS as a persistent store

AdvantagesAdvantagestraditional databases are availabletraditional databases are availableproven to work well; many toolsproven to work well; many toolspeople trained and confident with thempeople trained and confident with them

DisadvantagesDisadvantagestraditional DBMS solve the wrong problem anyway (e.g. traditional DBMS solve the wrong problem anyway (e.g. focus on consistency)focus on consistency)traditional DBMS make the wrong assumptions (DB traditional DBMS make the wrong assumptions (DB optimizers fail on virtualized hardware)optimizers fail on virtualized hardware)

Page 42: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

42

Solution 2 (reactionary)Solution 2 (reactionary)Rethink the whole system architectureRethink the whole system architecture

do NOT use a traditional DBMS and app serverdo NOT use a traditional DBMS and app server

create new breed of application server (with DB)create new breed of application server (with DB)

run application server on run application server on nn EC2 instances EC2 instances

use S3 + distributed consistency protocolsuse S3 + distributed consistency protocols

AdvantagesAdvantages and and DisadvantagesDisadvantagesrequires new breed of (immature) systems + toolsrequires new breed of (immature) systems + tools

solves the right problem and gets it rightsolves the right problem and gets it right

Examples: Examples: GoogleApps (Python in the cloud)GoogleApps (Python in the cloud)

Sausalito (www.28msec.com) (XQuery in the cloud)Sausalito (www.28msec.com) (XQuery in the cloud)

Page 43: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

43

AgendaAgenda

Current Current painpain in building apps in building apps

What can What can XQueryXQuery do for customers ? do for customers ?

What can the What can the Cloud Cloud do for customers ?do for customers ?

How do we put them How do we put them togethertogether ? ?

How do XQuery+Cloud How do XQuery+Cloud solvesolve the the problem ?problem ?

Some Some open researchopen research problems problems

Page 44: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

44

XQuery + AWS CloudXQuery + AWS CloudCookbook:Cookbook:

Take an existing XQuery processorTake an existing XQuery processor

Partition the XML data on S3Partition the XML data on S3

Map REST calls to XQuery programs Map REST calls to XQuery programs

Run the XQuery programs on EC2Run the XQuery programs on EC2

Use SQS for (asyncronous) updatesUse SQS for (asyncronous) updates

Voila.Voila.

The magic is in the glue (XQuery proc. + The magic is in the glue (XQuery proc. + AWS )AWS )

Application Server + Web Server + DatabaseApplication Server + Web Server + Databaseintegrated XQuery based application stack for integrated XQuery based application stack for Web-based appsWeb-based apps

fully SOA enabledfully SOA enabled

all pre-configured and lean (ZERO admin)all pre-configured and lean (ZERO admin)

Page 45: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

45

XQuery in the Cloud XQuery in the Cloud (connected)(connected)

Page 46: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

46

Customers concernsCustomers concerns

CostCost

Time to marketTime to market

FlexibilityFlexibility

CustomizabilityCustomizability

Sustainability Sustainability

Page 47: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

47

XQuery in the Cloud (no XQuery in the Cloud (no Server)Server)

Page 48: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

48

XQuery in the Cloud XQuery in the Cloud (offline)(offline)

Page 49: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

49

Demo at Demo at www.28msec.com ! !

Look at Look at www.programmableweb.com for for use cases ( consumer and use cases ( consumer and enterprise mashups)enterprise mashups)

Page 50: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

50

Competitors: InternetCompetitors: Internet

Web 2.0 Development FrameworksWeb 2.0 Development FrameworksE.g., Ruby on Rails, PHP / LAMP, ...E.g., Ruby on Rails, PHP / LAMP, ...Deployment in the cloud still problematicDeployment in the cloud still problematic

Google AppEngine, Facebook AppsGoogle AppEngine, Facebook AppsProprietary programming model (Python-Proprietary programming model (Python-based)based)Limited functionalityLimited functionalityVendor lock-in, privacy issuesVendor lock-in, privacy issues

Oracle on AWS, do-it-yourself on AWSOracle on AWS, do-it-yourself on AWSlimited functionality and/or scalabilitylimited functionality and/or scalability

Page 51: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

51

Competitors: EnterpriseCompetitors: EnterpriseSalesforce AppExchangeSalesforce AppExchange

proprietary programming modelproprietary programming modelLimited applications domain (CRM)Limited applications domain (CRM)

Microsoft AzureMicrosoft Azure.Net programming model .Net programming model manual configuration neededmanual configuration needed(recent offering, market adoption unclear)(recent offering, market adoption unclear)

Virtualization Companies (e.g., VMWare)Virtualization Companies (e.g., VMWare)No offerings / expertise for data No offerings / expertise for data managementmanagement

Oracle (Grid, RAC)Oracle (Grid, RAC)limited scalability, cost prohibitivelimited scalability, cost prohibitive

Page 52: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

52

Web 2.0 Support vs. Cloud Web 2.0 Support vs. Cloud SupportSupport

Proprietary Standard

Development

Deployment

Cloud

Trad.

XQuery+AWS

AWS

Azure

Google App Engine,Facebook

Ruby on Rails

OracleVMWare Cloud,Citrix

Salesforce, Workday

Page 53: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

53

AgendaAgenda

Current Current painpain in building apps in building apps

What can What can XQueryXQuery do for customers ? do for customers ?

What can the What can the Cloud Cloud do for customers ?do for customers ?

How do we put them How do we put them togethertogether ? ?

How do XQuery+Cloud How do XQuery+Cloud solvesolve the the problem ?problem ?

Some Some open researchopen research problems problems

Page 54: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

54

Versions and variationsVersions and variationsHuman mind does not like agreementsHuman mind does not like agreements

We like our differences (for a good reason)We like our differences (for a good reason)

Different ways to see:Different ways to see:DataDataSchemasSchemasCodeCode

Current stack is imposing agreementCurrent stack is imposing agreementunlike our own natureunlike our own nature

We have to come up with solutions that We have to come up with solutions that allow, welcome and exploit variationsallow, welcome and exploit variationsDarwinian, evolutionary approach to Darwinian, evolutionary approach to data, schema and code mutationsdata, schema and code mutations

Page 55: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

55

Versions and variationsVersions and variationsResearch problems:Research problems:

What is a (data, schema, code) What is a (data, schema, code) variation ?variation ?What does it mean to run an app in the What does it mean to run an app in the presence of variations ?presence of variations ?How do you store (index, etc) How do you store (index, etc) variations ?variations ?How do you re-integrate them back into How do you re-integrate them back into mainstream app (e.g. community mainstream app (e.g. community voting ?)voting ?)What is the correct lifecycle for data, What is the correct lifecycle for data, schema, code that allows and maximally schema, code that allows and maximally exploits variations ?exploits variations ?

Note:Note: I have a easier time to think of I have a easier time to think of a solution if the app is in XML/XQuery a solution if the app is in XML/XQuery rather if the app is in Java+SQL (even rather if the app is in Java+SQL (even Python)Python)

Page 56: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

56

ConclusionConclusion

XQuery in the cloud a serious XQuery in the cloud a serious alternative for alternative for somesome (large # and (large # and large $$) customerslarge $$) customers

Nothing equivalent in the Nothing equivalent in the competition:competition:

How “solid” (standard, tested) this isHow “solid” (standard, tested) this is

Richness of applicationsRichness of applications

Potential for optimization and Potential for optimization and parallelizationparallelization

Ease of porting to the cloudEase of porting to the cloud

Page 57: The magic is in the glue XQuery+Cloud Daniela Florescu Oracle.

57

My adviceMy advice

Keep the eye on the apps, not Keep the eye on the apps, not dbdb

Keep the customer in mindKeep the customer in mind

Rethink the entire stackRethink the entire stack

Don’t be afraid to shake down Don’t be afraid to shake down existing ideas about how existing ideas about how applications are supposed to applications are supposed to workwork

Thank you!Thank you!