Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Socket.IO 1.0

Socket.IO 1.0

Guillermo Rauch

June 14, 2012
Tweet

More Decks by Guillermo Rauch

Other Decks in Programming

Transcript

  1. My name is John My name is John User A

    User B Thursday, June 14, 12
  2. My name is John My name is John User A

    User B #1 #1 Thursday, June 14, 12
  3. My name is John My name is John User A

    User B #1 #1 concurrently Thursday, June 14, 12
  4. My name is John My name is John User A

    User B #1 #1 concurrently My name is John Hello Thursday, June 14, 12
  5. My name is John My name is John User A

    User B #1 #1 concurrently My name is John Hello My name is John Doe Thursday, June 14, 12
  6. My name is John My name is John User A

    User B #1 #1 concurrently My name is John Hello My name is John Doe 1. Go to position 0 and remove 10 characters Thursday, June 14, 12
  7. My name is John My name is John User A

    User B #1 #1 concurrently My name is John Hello My name is John Doe 1. Go to position 0 and remove 10 characters 2. Add “Hello” at position 0 Thursday, June 14, 12
  8. My name is John My name is John User A

    User B #1 #1 concurrently My name is John Doe { “rev”: 1, “ops“: [ { “type“: “delete”, “pos”: 0, “length”: 10 } , { “type“: “add”, “pos”: 0, “text”: “Hello” } ]} Thursday, June 14, 12
  9. My name is John My name is John User A

    User B #1 #1 concurrently { “rev”: 1, “ops“: [ { “type“: “delete”, “pos”: 0, “length”: 10 } , { “type“: “add”, “pos”: 0, “text”: “Hello” } ]} { “rev”: 1, “ops“: [ { “type“: “add”, “text”: “ Doe”, “pos”: 15 } ]} Thursday, June 14, 12
  10. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position 15 Thursday, June 14, 12
  11. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 1. Add “ Doe” at position 15 || Thursday, June 14, 12
  12. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position 10 Thursday, June 14, 12
  13. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position (15 - 10 + 5) Thursday, June 14, 12
  14. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position (15 - 10 + 5) 1 Thursday, June 14, 12
  15. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position (15 - 10 + 5) 2 Thursday, June 14, 12
  16. 1. Go to position 0 and remove 10 characters 2.

    Add “Hello” at position 0 3. Add “ Doe” at position 10 Thursday, June 14, 12
  17. “I love the 500 lines of embedded Flash websocket emulation

    code in the socket.io-client” said no one ever Thursday, June 14, 12