Crosstalk Overview (Austin JavaScript/Node.js Meetup) - 2012-12-07

904 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
904
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Crosstalk Overview (Austin JavaScript/Node.js Meetup) - 2012-12-07

  1. 1. Crosstalk
  2. 2. The Internet is broken
  3. 3. The Internet is brokenfor non-programmers
  4. 4. Composability
  5. 5. ComposabilityWhat skills do you need?
  6. 6. Internet Scale
  7. 7. Internet ScaleDistributed Systems
  8. 8. Fallacies of Distributed Computing● the network is reliable● latency isnt a problem● bandwidth isnt a problem● the network is secure● topology wont change● the administrator will know what to do● transport cost isnt a problem● the network is homogeneous● the system is atomic/monolithic● the system is finished● business logic can and should be centralized
  9. 9. Internet ScaleDistributed Systems
  10. 10. Internet ScaleDistributed Systems Never Done
  11. 11. How should we design our composable distributed software system?
  12. 12. non-programmers
  13. 13. Crosstalk
  14. 14. The way you should be doing things should beeasy and the way you shouldnt do things should be difficult. -- Ryan Dahl, original Node.js presentation, JSConf 2009
  15. 15. CrosstalkModular - Composable - Resilient
  16. 16. CrosstalkModular - Composable - Resilient in JavaScript
  17. 17. Terminology
  18. 18. TerminologyWorker Prime Swarm
  19. 19. TerminologyWorker Prime Swarm
  20. 20. TerminologyWorker Prime Swarm
  21. 21. TerminologyWorker Prime Swarm
  22. 22. Architecture
  23. 23. Crosstalk Swarm
  24. 24. Prime PrimePrime Prime Prime Prime Crosstalk SwarmPrime Prime Prime Prime Prime Prime Prime Prime
  25. 25. Every Prime lies on the "surface area"
  26. 26. Every Prime lies on the "surface area"
  27. 27. Gossip
  28. 28. Gossip
  29. 29. Gossip
  30. 30. Gossip
  31. 31. Gossip
  32. 32. Prime Lifecycle
  33. 33. Prime Lifecycle Let it crash
  34. 34. Φ accrual failure detection
  35. 35. Prime LifecycleLet it Make it crash
  36. 36. Worker Lifecycle
  37. 37. Worker Lifecycle Let it crash
  38. 38. Worker LifecycleLet it Make it crash
  39. 39. Getting things done
  40. 40. Getting things donei.e: building workers
  41. 41. index.jspackage.json
  42. 42. Hello distributed world!
  43. 43. Hello distributed world!"magic" global variable
  44. 44. Hello distributed world!"magic" global variable message name
  45. 45. Hello distributed world! function to execute when"magic" global variable message name a message arrives
  46. 46. Hello distributed world! function to execute when"magic" global variable message name a message arrives name of message to emit
  47. 47. Alice and a sandwichAlice worker #1Alice worker #2
  48. 48. Alice and a sandwich its just JavaScriptAlice worker #1Alice worker #2
  49. 49. Alice and a sandwich its just JavaScriptAlice worker #1Alice worker #2 emit "sandwich" messages
  50. 50. Alice and a sandwich its just JavaScriptAlice worker #1 listen for "sandwich" messagesAlice worker #2 emit "sandwich" messages
  51. 51. Alice and BobAlices workerBobs worker
  52. 52. Alice and BobAlices worker public scopeBobs worker
  53. 53. Alice and BobAlices worker public scopeBobs worker addressed message
  54. 54. Alice and Bob address is omitted when declaring aAlices worker message listener public scopeBobs worker addressed message
  55. 55. Alice and Bob using request-reply (1 of 2)Alices worker
  56. 56. Alice and Bob using request-reply (1 of 2)Alices worker addressed message
  57. 57. Alice and Bob using request-reply ( 2 of 2 )Bobs worker
  58. 58. Alice and Bob using request-reply ( 2 of 2 ) address is omittedBobs worker when declaring a message listener
  59. 59. Eve enters... ( 1 of 2 )Eves worker
  60. 60. Eve enters... ( 1 of 2 )Eves worker anyone can send Alice a message
  61. 61. Eve enters... ( 2 of 2 )Alices improved worker
  62. 62. Eve enters... ( 2 of 2 ) only messages fromAlices improved worker @bob (Bob) are processed
  63. 63. Eve-n betterAlices configuration fileAlices refactored worker
  64. 64. Eve-n betterAlices configuration file import Crosstalk functionality using CommonJS moduleAlices refactored worker pattern
  65. 65. Eve-n betterAlices configuration file import Crosstalk functionality using CommonJS moduleAlices refactored worker pattern factor out dependencies
  66. 66. Generic Bob ( 1 of 2 )Carls worker
  67. 67. Generic Bob ( 1 of 2 ) send data with yourCarls worker messages
  68. 68. Generic Bob ( 2 of 2 )Previous Bob workerGeneralized Bob worker
  69. 69. Generic Bob ( 2 of 2 )Previous Bob workerGeneralized Bob worker access data in messages
  70. 70. Generic Bob ( 2 of 2 )Previous Bob workerGeneralized Bob worker access data in messages
  71. 71. Generic Bob ( 2 of 2 )Previous Bob workerGeneralized Bob worker access data in messages
  72. 72. C-C-C-C-C-Callback!Bob worker using callbackNew Carl worker
  73. 73. C-C-C-C-C-Callback!Bob worker using callback callback will reply to senderNew Carl worker
  74. 74. C-C-C-C-C-Callback!Bob worker using callback callback will reply to if sender provides it senderNew Carl worker
  75. 75. C-C-C-C-C-Callback!Bob worker using callback callback will reply to if sender provides it senderNew Carl worker by convention, the first parameter is always an error
  76. 76. C-C-C-C-C-Callback!Bob worker using callback callback will reply to if sender provides it senderNew Carl worker by convention, the first second param is parameter is always an error the response
  77. 77. C-C-C-C-C-Callback!Bob worker using callback no error callback will reply to if sender provides it senderNew Carl worker by convention, the first second param is parameter is always an error the response
  78. 78. C-C-C-C-C-Callback!Bob worker using callback sandwich response callback will reply to no error if sender provides it senderNew Carl worker by convention, the first second param is parameter is always an error the response
  79. 79. Secure CallbackMore secure Carl worker
  80. 80. Secure Callback scope for the callback responseMore secure Carl worker
  81. 81. Secure Callback scope for the callback response only @bob can respondMore secure Carl worker to this request
  82. 82. How many sandwiches?Alices generic web sandwich worker
  83. 83. Node.js style HTTP request handler function
  84. 84. Node.js style HTTP request handler functionbuilt-in Crosstalk API for web services
  85. 85. Node.js style HTTP request handler function built-in Crosstalk API for web servicessubdomain (required)
  86. 86. Node.js style HTTP request handler function built-in Crosstalk API for web services subdomain (required)request listener (required)
  87. 87. Node.js style HTTP request handler function built-in Crosstalk API for web services subdomain (required)request listener (required)
  88. 88. How many secure sandwiches?Alices https web sandwich worker
  89. 89. How many secure sandwiches?Alices https web sandwich worker httpsOnly flag (optional)
  90. 90. Persistent sandwich
  91. 91. Persistent sandwich another Crosstalk API
  92. 92. Persistent sandwich another Crosstalk API refactored dependencies
  93. 93. Recoverable sandwich
  94. 94. Theres more...
  95. 95. Crosstalk runs on Crosstalk
  96. 96. CrosstalkModular - Composable - Resilient in JavaScript
  97. 97. Crosstalkhttps://github.com/crosstalk
  98. 98. Crosstalk https://github.com/crosstalknpm install -g crosstalk-idenpm install -g crosstalk-cli

×