• Like
Crosstalk Overview (Austin JavaScript/Node.js Meetup) - 2012-12-07
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

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

  • 456 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
456
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
8
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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