Stambecco Preso Base 2010-04-12

download Stambecco Preso Base 2010-04-12

of 18

Transcript of Stambecco Preso Base 2010-04-12

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    1/18

    Scaling with Stambecco

    David Pollak @dppScala BASE, April 12th2010

    http:!tambecco"org

    @goat#rodeo

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    2/18

    Abo$t DPP

    %rote Beginning Scala

    Started &i't in 200( Started )e!a in 1**1

    +oding 'or mone, 1*((

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    3/18

    Problem!

    +ache -nvalidation

    +onc$rrenc Solved well b .DB)S

    /ntil it! not

    hen h$ge pain

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    4/18

    Scaling Di!trib$tion 33 4ard

    -t! a di''erent wa o' coding

    .e'erence! dont work 5on6logic 'ail$re i! common

    &ack o' !nchronicit

    4ard to !im$late locall

    &ike !ailing the high !ea!

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    5/18

    Stambecco

    5aming: the other hard problem

    %orker! 7Actor6i!h8 A!nchrono$!-mm$table )e!!age!

    A!kAn!wer 7.e9$e!t!8

    -nter6worker ran!action!

    Per6worker S& !tore

    5ot abo$t 'inancial tran!action!

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    6/18

    %hat! the ;oat good 'orede!tro case class Follow(who: UserId) extends UserMsg

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    8/18

    A!nc-mm$table )e!!age!

    )e!!age !end i! a!nchrono$!

    )e!!age! are compiler g$aranteed -mm$table

    ?S5 Seriali>able

    imeo$t! on A!kAn!wer action

    Sent to %orker pro=

    )e!!aging t$rtle! all the wa down

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    9/18

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    10/18

    A!kAn!wer +ode

    for {

    user

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    11/18

    -nter6worker ran!action!

    nl within %orker!

    Action!: PrePo!t6+ommit.ollback 5o e=ternal me!!age! within =action

    -ntegrated with S&

    5e!ted, rec$r!ive transaction on otherWorker complete

    {result = 99} send MyMessage(123)

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    12/18

    Per %orker S&

    Private S& Store

    Backed b 42 -ntegrated with tran!action!

    +an al!o acce!! e=ternal S& !tore!

    +an al!o acce!! 5oS&

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    13/18

    .$n mode!

    e!t: in memor

    Single 5ode: 42 ile!!tem )$ltiple 5ode

    )e!!age!: .abbit)

    ran!action!: Cooeeper S&: 42 +a!!andra

    Same %orker +lient code

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    14/18

    %orker +lient code the !ame

    .$n mode change, b$t

    5o change! to worker code

    5o change! to client code

    +hange! to %orker)a!ter

    &ocal v!" .emote

    42 /.&

    )e!!age !endreceive mechanic!

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    15/18

    %h doe! it !caleation

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    16/18

    4o$!ekeeping

    .$n! on Scala 2"

    S;i coming 5ot tied to &i't

    Apache 2"0 &icen!e

    +ommercial mod$le!: balancing, load!hedding, !mart m!g dela, mgt ;/-, etc"

    5ope, no big6name $!er!""" et

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    17/18

    %here to get the ;oat

    http:!tambecco"org

    @goat#rodeo

    http:gro$p!"google"comgro$pgoat6rodeo

  • 8/9/2019 Stambecco Preso Base 2010-04-12

    18/18

    $e!tion!