59
Exam Preparation Guido Salvaneschi 1

preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ExamPreparationGuidoSalvaneschi

1

Page 2: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Warning!

• Thesearejustexamplesofthekindofquestionsthatcanappearintheexam.

• Theyarenotsupposedtobecomplete(ofcourse).

• Theyarenotrepresentativeofthecoverageofthecoursetopicsintheexam.

• Theydonotcoverquestionsaboutcoding(but“simple”exercisesprovidegoodexamplesforthat).

2

Page 3: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explain3reasonsthatmotivatebuildingasysteminadistributedway

3

Page 4: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

WhyDistributedSystems

• Functionaldistribution• Computershavedifferent functional capabilities(e.g.,Fileserver,printer )yetmayneedtoshareresources

• Client /server• Datagathering/dataprocessing

• Incrementalgrowth• Easiertoevolvethesystem• Modularexpandability

• Inherentdistributioninapplicationdomain• Banks,reservationservices,distributed games,mobileapps• physicallyoracrossadministrativedomains• cashregisterandinventorysystemsforsupermarket chains• computersupportedcollaborativework

Page 5: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

WhyDistributedSystems

• Economics• collections ofmicroprocessorsofferabetterprice/performanceratiothanlargemainframes.

• Lowprice/performance ratio:costeffectivewaytoincrease computingpower.

• Betterperformance• Loadbalancing• Replicationofprocessingpower• Adistributedsystemmayhavemoretotalcomputingpowerthanamainframe.Ex.10,000CPUchips,each runningat50MIPS.Notpossible tobuild500,000MIPSsingleprocessorsince itwouldrequire0.002nsec instructioncycle.Enhancedperformancethroughloaddistributing.

• IncreasedReliability• Exploit independentfailuresproperty• Ifonemachinecrashes,thesystemasawholecanstill survive.

• Anotherdriving force:theexistenceoflargenumberofpersonalcomputers, theneedforpeople tocollaborateandshareinformation.

Page 6: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explain3goals(andchallenges)ofdistributedsystems

Page 7: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Goalsandchallengesofdistributedsystems

• Transparency• Howtoachieve thesingle-systemimage

• Performance• Thesystemprovideshigh(computing,storage,..)performance

• Scalability• Theability toservemoreusers,provideacceptableresponsetimeswithincreasedamountofdata

• Openness• Anopendistributedsystemcanbeextendedandimprovedincrementally• Requirespublicationofcomponentinterfacesandstandardsprotocolsforaccessinginterfaces

• Reliability/faulttolerance• Maintainavailabilityevenwhenindividual componentsfail

• Heterogeneity• Network,hardware,operatingsystem,programminglanguages,differentdevelopers

• Security• Confidentiality,integrityandavailability

Page 8: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whichtechniquescanbeusedtomakeasystemscalable?Brieflyexplainthem.

8

Page 9: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Scalingtechniques

Distribution• Splittingaresource(suchasdata)intosmallerparts,andspreading thepartsacrossthesystem(cf DNS)

9

Page 10: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Scalingtechniques

• Replication• Replicateresources(services,data)acrossthesystem,canaccesstheminmultipleplaces

• Cachingtoavoidrecomputation• Increasedavailabilityreducestheprobability thatabigger systembreaks

• Hidingcommunicationlatencies• Avoidwaitingforresponses toremoteservicerequests

• Useasynchronouscommunication

10

Page 11: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ShowthesignatureoftheMapfunctionandtheReducefunctioninMapReduce.WhatistheMapphaseandwhataretheReducephaseresponsiblefor?

Page 12: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Functionalprogramming“foundations”

• mapinMapReduce↔mapinFP• map::(a→b)→[a]→[b]• Example:Doubleallnumbers inalist.• >map((*)2)[1,2,3]>[2,4,6]

• Inapurelyfunctionalsetting,anelementofalistbeingcomputedbymapcannotseetheeffectsofthecomputationsonotherelements.

• Iftheorderofapplicationofafunctionftoelementsinalistiscommutative,thenwecanreorderorparallelizeexecution.

12

Note:Thereisnoprecise1-1correspondence.Pleasetakethisjustasananalogy.

Page 13: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Functionalprogramming“foundations”

• Moveoverthelist,applyftoeachelementandanaccumulator. freturnsthenextaccumulatorvalue,whichiscombinedwiththenextelement.

• reduceinMapReduce↔foldinFP• foldl ::(b→a→b)→b→[a]→b• Example:Sumofallnumbers inalist.• >foldl (+)0[1,2,3]foldl (+)0[1,2,3]>6

13

Note:Thereisnoprecise1-1correspondence.Pleasetakethisjustasananalogy.

Page 14: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

MapReduceBasicProgrammingModel

• Transformasetofinputkey-valuepairstoasetofoutputvalues:• Map:(k1,v1)→list(k2,v2)• MapReducelibrarygroupsallintermediatepairswithsamekeytogether.

• Reduce:(k2,list(v2))→list(v2)

14

Page 15: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatistheproblemwith“stragglers”(slowworkers)andwhatcanbedonetosolvethisproblem?

Page 16: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Stragglers&BackupTasks

• Problem:“Stragglers”(i.e.,slowworkers)significantlylengthenthecompletiontime.

• Solution:Closetocompletion,spawnbackupcopiesoftheremainingin-progresstasks.

• Whicheveronefinishes first,“wins”.

• Additionalcost:afewpercentmoreresourceusage.• Example:Asortprogramwithoutbackup=44%longer.

16

Page 17: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

SketchtheGFSarchitecturepresentingthecomponentsthatconstitutesitandthemaininteractions.

Page 18: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

GFS- Overview

18

Page 19: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisthe“operatorplacement”problem?

Page 20: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Deploymentmodel

• Automaticdistributionofprocessing introducestheoperatorplacementproblem

• Givenasetofrules(composedofoperators)andasetofnodes

• Howtosplittheprocessingload• Howtoassignoperatorstoavailablenodes

• Inotherwords• Givenaprocessingnetwork• Howtomapitontothephysicalnetworkofnodes

20

Page 21: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ExplainthesemanticsofthefollowingEsper query

select name, avg(price) as averagePricefrom StockTickEvent.win:length(100)group by name

Page 22: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ExplainthesemanticsofthefollowingEsper query

select name, avg(price) as averagePricefrom StockTickEvent.win:length(100)group by name

• Returnstheaveragepricepernameforthelast100stockticks

Page 23: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Inthecontextofconcurrency,whatisthe”happens-before”relationship?

23

Page 24: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisahappens-beforerelationship?

24

• Whenasynchronizedmethodexits,itestablishesahappens-beforerelationshipwithanysubsequentinvocationofasynchronizedmethodforthesameobject.

• Whenthehappens-before relationisestablishedbyaprogrammer,e.g.,bymeansofsynchronization,wehavetheguaranteethatmemorywritesbystatementAexecutedbyThreadTAarevisibletoanotherspecificstatementBexecutedbyThreadTB.

Page 25: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explainwhatafutureis

25

Page 26: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explainwhatafutureis

26

• Placeholderobjectforavaluethatmaynotyetexist• ThevalueoftheFutureissuppliedconcurrentlyandcansubsequentlybeused

Page 27: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ExplainwhatOSGi is

27

Page 28: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

OSGi

28

• TheOSGi specificationsdefineastandardized,componentoriented,computingenvironmentfornetworkedservices thatisthefoundationofanenhancedserviceorientedarchitecture

• TheOSGi ServicePlatformisaJavabasedapplicationserver fornetworkeddevices...

• TheOSGi ServicePlatformis[...] consideredtobethecheapest,fastestandeasiestwaytoenablethedynamicdeploymentofWeb2.0servicesandmashups inthenextgenerationJavaServicePlatform

• TheOSGi specifications[...] formasmalllayerthatallowsmultiple,Javabased,componentstoefficientlycooperateinasingleJavaVirtualMachine

Page 29: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisawebservice?

29

Page 30: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisawebservice?

30

• [...] self-contained,modularbusinessapplicationsthathaveopen,internet-oriented, standards-basedinterfaces.

Page 31: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisawebservice?

31

Page 32: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisawebservice?

32

Page 33: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisawebservice?

• Thecomponents:• Servicerequester:Thepotentialuserofaservice

• Serviceprovider:Theentitythatimplements theserviceandofferstocarryitoutonbehalfoftherequester

• Serviceregistry:Aplacewhere• availableservicesarelisted

33

Page 34: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

WhichunderlyingdatastructureisusedbyApacheSpark?Showaminimal exampleandindicatewheresuchdatastructureisused.

34

Page 35: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

RDD (ResilientDistributedDatasets)

• Restrictedformofdistributedsharedmemory• immutable,partitionedcollectionof records• canonlybebuiltthrough coarse-graineddeterministictransformations

(map, filter, join...)

• Efficientfault-toleranceusinglineage• Logcoarse-grainedoperations insteadoffine-graineddataupdates• AnRDDhasenough information abouthowit’sderivedfromother

dataset• Recompute lostpartitionsonfailure

35

Page 36: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

SparkandRDDs

• ImplementsResilientDistributedDatasets(RDDs)

• OperationsonRDDs• Transformations:definesnewdatasetbasedonpreviousones• Actions:startsajobtoexecuteoncluster

• Well-designedinterfacetorepresentRDDs• Makesitveryeasyto

implement transformations• MostSparktransformation

implementation<20LoC

36

Page 37: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

MoreonRDDs

Workwithdistributedcollectionsasyouwouldwithlocalones

• Resilientdistributeddatasets(RDDs)• Immutablecollectionsofobjectsspreadacrossacluster• Builtthroughparalleltransformations (map, filter,etc)• Automaticallyrebuiltonfailure• Controllablepersistence(e.g.,cachinginRAM)

• Differentstoragelevelsavailable,fallback todiskpossible

• Operations• Transformations (e.g.map,filter,groupBy, join)

• LazyoperationstobuildRDDsfromotherRDDs• Actions (e.g.count,collect,save)

• Returnaresultorwriteittostorage

Page 38: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

WorkflowwithRDDs

• CreateanRDDfromadatasource: <list>• ApplytransformationstoanRDD:mapfilter• ApplyactionstoanRDD:collectcount

distFile = sc.textFile("...", 4) • RDDdistributed in4partitions• Elementsarelinesofinput• Lazyevaluationmeansnoexecutionhappensnow

38

Page 39: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

GiveapossibleexplanationwhythecomputationofthePageRankissignificantlydifferentbetweenHadoop andSpark

171

80

23

14

020406080

100120140160180200

30 60

Iteratio

ntim

e(s)

Numberofmachines

HadoopSpark

Page 40: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Spark

• Fast,expressiveclustercomputingsystemcompatiblewithApacheHadoop

• WorkswithanyHadoop-supported storagesystem(HDFS,S3,Avro,…)

• Improvesefficiency through:• In-memorycomputing primitives• Generalcomputationgraphs

• Improvesusability through:• RichAPIsinJava,Scala,Python• Interactiveshell

Up to 100× faster

Often 2-10× less code

Page 41: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

PageRank

• Givepagesranks(scores)basedonlinkstothem• Linksfrommanypagesè high rank• Linkfromahigh-rankpageè high rank

• Goodexampleofamorecomplexalgorithm• Multiple stagesofmap&reduce

• BenefitsfromSpark’sin-memorycaching• Multiple iterationsoverthesamedata

Image: en.wikipedia.org/wiki/File:PageRank-hi-res-2.png

Page 42: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explaintworeasonswhydatacanbegeodistributed

Page 43: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Explaintwomotivationswhydatacanbegeodistributed

• Manylargedatasetsgeo-distributed,i.e.,splitacrosssites• Storednearresp.sources,frequentlyaccessingentities• Gatheredandstoredbydifferent (sub-)organizations yetsharedtowardsacommongoal

• E.g.,UScensus,Google“buckets”• Replicatedacrossdatacentersforavailability,incompletelytolimittheoverheadofupdates

• Manyanalysistasksinvolveseveraldatasets,whichmaybedistributed

• Legalconstraintsmayconfinecertaindatasetstospecificlocations

• The“cloud”isnotasingledatacenter• Inter-DClatency≠intra-DClatency

Page 44: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatisaresourcemanagementsystem,e.g.,ApacheYARN?

Page 45: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ResourceManagement

• Typicallyimplementedbyasystemdeployedacrossnodesofacluster

• Layerbelow“frameworks”likeHadoop• Onanynode, thesystemkeepstrackofavailabilities• Applicationsontopuseinformationandestimationsofownrequirements tochoosewheretodeploysomething

• RMsystems(RMSs)differinabstractions/interfaceprovidedandactual schedulingdecisions

Page 46: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatarebyzantinefailures?Howcantheybesolved?

Page 47: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ByzantineFaultTolerance

• Protect“computation”withBFT[Lamport,Shostak, Pease;TOPLAS’82]replication

• Processes(statemachines)withbenignandmaliciousfailures• 3f +1replicasforf failuresinasynchronousdistributedsystems

• Safetywithf +1• Liveness with2f +1insynchronoussystem

• Comparisonofoutputs

Page 48: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

BFTReplication

Page 49: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

BFTReplication

Page 50: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Whatishomomorphicencryption?Besidesthetechnicalities,explainthekeygoalitachieves.

Page 51: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

FullyHomomorphic Encryption

Page 52: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

GiventhescenarioX,whatisthetechnology/approachthatyouwouldrecommendforsolvingproblemY?• MapReduce• HDFS• Adatabase• Complexeventprocessing• ApacheSpark• OSGi• REST• …• ...

52

Page 53: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

MapReducevs.TraditionalRDBMS

MapReduce TraditionalRDBMSDatasize Petabytes GigabytesAccess Batch Interactiveandbatch

Updates Writeonce,readmanytimes

Readandwritemanytimes

Structure Dynamicschema StaticschemaIntegrity Low High(normalizeddata)

Scaling Linear Non-linear(generalSQL)

53

Page 54: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

ASummary

54

Page 55: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

55

ProgrammingModel

DataOrganization

Decla

rativ

e

StructuredFlatRawTypes

Proced

ural

Page 56: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Event-drivenapplications

• Canweuseexistingtechnologiesforbatchprocessing?• Theyarenotdesigned tominimizelatency• Weneedawholenewmodel!

Page 57: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Esper inanutshell

• EPL:richlanguagetoexpressrules• Grounded ontheDSMSapproach

• Windowing• Relational select, join,aggregate,…• Relation-to-streamoperatorstoproduceoutput• Sub-queries

• Queriescanbecombined toformagraph• IntroducessomefeaturesofCEPlanguages

• Patterndetection

• Designedforperformance• High throughput• Lowlatency

Page 58: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

Goals

Batch

Interactive Streaming

One stack to

rule them all?

§ Easy to combine batch, streaming, and interactive computations§ Easy to develop sophisticated algorithms§ Compatiblewith existing open source ecosystem (Hadoop/HDFS)

Page 59: preparation - GitHub Pagesstg-tud.github.io/ctbd/2016/CTBD_17_preparation.pdf · Functional programming “foundations ... , Scala, Python • Interactive shell Up to 100× faster

59