fromhandtomouth
Pavlo Baronpavlo.baron@codecentric.de              @pavlobaron
Forget backend
Or at least whatyou call a backend
Your application serverwill just slow downyour machines tokeep step with them
Or you will slow downyour incoming trafficto give your applicationserver a chance tobreathe
User experience:order foodat McDonalds, getqueued and receivethe ordered foodthrough mail 3days later
User experience with somepsychology: order food atMcDonalds, get queued,leave the restaurantwith color pictures ofyour foo...
Every single dataabstraction layer onlyhelps ruin theatmosphere throughheating
Hey, man,you carry around a damnUSS Enterprise in yourpocket         And you can run a         damn Babylon 5 in          ...
And in the end, itsalways store/update/delete/read/search/process.Isnt it?
So why drive a clown carwhen you can havea Ferrarifull of these?
Why not just livefrom hand to mouth?
You haz this:Your user. Totally drunk ina football stadium. Justwants to inform the worldthat Ronaldo has scored agoal. Sh...
You want this:Let him protocol the fact atany cost.Look at it later, togetherwith further facts to makea picture of the sp...
Concrete:Mobile clients write fromeverywhere, buffer,read occasionally,post-processing completelybehind the scenes, likest...
Even more concrete:Immediate, reliable, massivewrites. Analytics andprocessing in a batchafterwards. No need tobe exact to...
More concrete:
Very concrete:           ProtoBufs, REST           Round Robin   local                      REST, local Erlang client  Buf...
Infrastructure can be solved.More challenging is howto get structured records outof a bunch of facts written byshaking han...
HTF does it work?
Da core
Da ringX bit integer space       0 <= N <= 2 ^ Xor: 2 x Pi      0 <= A <= 2 x Pi      x(N) = cos(A)      y(N) = sin(A)
Da cluster12 partitions (constant)    3 nodes, 4 vnodes eachadd node    4 nodes, 3 vnodes eachAlternatives:  3 nodes, 2 x ...
Da quorumV: vnodes holding a keyW: write quorumR: read quorumDW, PW, PR     W > 0.5 * V     R+W>V
Insert keyKey = “foo”# = N, W = 2               (sloppy quorum)                   replicate               N               ...
Add node       co        py             leaveleave                co                  py  y             leave   pco
Lookup key                         (sloppyN                       quorum)      Value = “bar”    Key = “foo”    # = N, R = 2
Remove                 nodecopy       leave
write          RM2          Da Gossip                            RM1  Clock table                           Value  Update ...
Da vector clocksNode 1         1,0,0    2,2,0           3,2,0   4,3,3Node 2          1,1,0   1,2,0   1,3,3           4,4,3...
Da MapReduce                          query =Node X                    "Alice"map         reduce         hit              ...
Da hinted handoffN: node, G: group including Nnode(N) is unavailable     replicate to G or     store data(N) locally     h...
Key = “foo”, # = N ->           Replicahandoff hint = true               failsKey = “foo”                        N        ...
Replicahandoff   recovers
And thats by far not all:You can search throughindex with data locality.You can tag objects andquery through 2i.You can ad...
You dont even need to storeanything.Just distribute yourcalculation, search, batch
Have a look at tendita.com
So its even comfy to loadyour clown carwith these
Thank you
Most images originate from            istockphoto.com         except few ones taken  from Wikipedia or Flickr (CC)        ...
Upcoming SlideShare
Loading in...5
×

From Hand To Mouth (@pavlobaron)

1,576

Published on

Slides of my talk I gave at the NoSQL Roadshow in Zurich and at Berlin Buzzwords, both 2012

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,576
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

From Hand To Mouth (@pavlobaron)

  1. 1. fromhandtomouth
  2. 2. Pavlo Baronpavlo.baron@codecentric.de @pavlobaron
  3. 3. Forget backend
  4. 4. Or at least whatyou call a backend
  5. 5. Your application serverwill just slow downyour machines tokeep step with them
  6. 6. Or you will slow downyour incoming trafficto give your applicationserver a chance tobreathe
  7. 7. User experience:order foodat McDonalds, getqueued and receivethe ordered foodthrough mail 3days later
  8. 8. User experience with somepsychology: order food atMcDonalds, get queued,leave the restaurantwith color pictures ofyour food and wait 3days for its delivery
  9. 9. Every single dataabstraction layer onlyhelps ruin theatmosphere throughheating
  10. 10. Hey, man,you carry around a damnUSS Enterprise in yourpocket And you can run a damn Babylon 5 in a cluster
  11. 11. And in the end, itsalways store/update/delete/read/search/process.Isnt it?
  12. 12. So why drive a clown carwhen you can havea Ferrarifull of these?
  13. 13. Why not just livefrom hand to mouth?
  14. 14. You haz this:Your user. Totally drunk ina football stadium. Justwants to inform the worldthat Ronaldo has scored agoal. Shaking hand, lots oftypos and confusion.
  15. 15. You want this:Let him protocol the fact atany cost.Look at it later, togetherwith further facts to makea picture of the sports fact.
  16. 16. Concrete:Mobile clients write fromeverywhere, buffer,read occasionally,post-processing completelybehind the scenes, likestatistics etc.
  17. 17. Even more concrete:Immediate, reliable, massivewrites. Analytics andprocessing in a batchafterwards. No need tobe exact to the secondand 100% data complete
  18. 18. More concrete:
  19. 19. Very concrete: ProtoBufs, REST Round Robin local REST, local Erlang client Buffer Web Apps, R, tools etc.
  20. 20. Infrastructure can be solved.More challenging is howto get structured records outof a bunch of facts written byshaking hands.Thats different story tho.
  21. 21. HTF does it work?
  22. 22. Da core
  23. 23. Da ringX bit integer space 0 <= N <= 2 ^ Xor: 2 x Pi 0 <= A <= 2 x Pi x(N) = cos(A) y(N) = sin(A)
  24. 24. Da cluster12 partitions (constant) 3 nodes, 4 vnodes eachadd node 4 nodes, 3 vnodes eachAlternatives: 3 nodes, 2 x 5 + 1 x 2 vnodes container based
  25. 25. Da quorumV: vnodes holding a keyW: write quorumR: read quorumDW, PW, PR W > 0.5 * V R+W>V
  26. 26. Insert keyKey = “foo”# = N, W = 2 (sloppy quorum) replicate N ok
  27. 27. Add node co py leaveleave co py y leave pco
  28. 28. Lookup key (sloppyN quorum) Value = “bar” Key = “foo” # = N, R = 2
  29. 29. Remove nodecopy leave
  30. 30. write RM2 Da Gossip RM1 Clock table Value Update log stable clockReplica clock updates Value Executed operation table
  31. 31. Da vector clocksNode 1 1,0,0 2,2,0 3,2,0 4,3,3Node 2 1,1,0 1,2,0 1,3,3 4,4,3Node 3 1,0,1 1,2,2 1,2,3 4,3,4
  32. 32. Da MapReduce query =Node X "Alice"map reduce hit list map map N= N= N=„Alice" "Alice" "Alice" Node A Node B Node C
  33. 33. Da hinted handoffN: node, G: group including Nnode(N) is unavailable replicate to G or store data(N) locally hint handoff for later node(N) is alive handoff data to node(N)
  34. 34. Key = “foo”, # = N -> Replicahandoff hint = true failsKey = “foo” N replicate
  35. 35. Replicahandoff recovers
  36. 36. And thats by far not all:You can search throughindex with data locality.You can tag objects andquery through 2i.You can add hooks.
  37. 37. You dont even need to storeanything.Just distribute yourcalculation, search, batch
  38. 38. Have a look at tendita.com
  39. 39. So its even comfy to loadyour clown carwith these
  40. 40. Thank you
  41. 41. Most images originate from istockphoto.com except few ones taken from Wikipedia or Flickr (CC) and product pages/publicly available presentations or generated through public online generators

×