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

Building a CQL driver

Building a CQL driver

Slides from my talk at Cassandra Summit EU 2013

Theo Hultberg

October 17, 2013
Tweet

More Decks by Theo Hultberg

Other Decks in Technology

Transcript

  1. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30
  2. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  3. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  4. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00 0000 0001 1000 0001
  5. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  6. #CASSANDRAEU @ICONARA 02 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 82 00 2a 02 00 00 00 00
  7. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  8. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  9. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  10. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  11. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  12. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  13. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  14. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  15. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b C Q L _ V E R S I O N 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  16. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  17. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  18. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 3 . 0 . 0 81 00 2a 02 00 00 00 00
  19. #CASSANDRAEU @ICONARA 01 00 2a 01 00 00 00 16

    00 01 00 0b 43 51 4c 5f 56 45 52 53 49 4f 4e 00 05 33 2e 30 2e 30 81 00 2a 02 00 00 00 00
  20. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  21. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  22. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  23. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 S E L E C T * F R O M U S E R S 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  24. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  25. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  26. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  27. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 u s e r _ n a m e 00 0d 00 05 e m a i l 00 0d 00 08 p a s s w o r d 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  28. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  29. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 p h i l 00 00 00 0e p h i l @ i n t e r . n e t 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 s u e 00 00 00 0d s u e @ i n t e r . n e t 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  30. #CASSANDRAEU @ICONARA 01 00 00 07 00 00 00 19

    00 00 00 13 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 73 00 04 81 00 00 08 00 00 00 bf 00 00 00 02 00 00 00 01 00 00 00 03 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d 00 05 65 6d 61 69 6c 00 0d 00 08 70 61 73 73 77 6f 72 64 00 03 00 00 00 02 00 00 00 04 70 68 69 6c 00 00 00 0d 70 68 69 6c 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 5e b6 3b bb e0 1e ee d0 93 cb 22 bb 8f 5a cd c3 00 00 00 03 73 75 65 00 00 00 0d 73 75 65 40 69 6e 74 65 72 2e 6e 65 74 00 00 00 20 32 7b 6f 07 43 58 11 23 9b c4 7e 15 44 35 32 73
  31. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  32. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  33. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 S E L E C T * F R O M u s e r W H E R E u s e r _ n a m e = ? 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  34. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  35. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  36. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  37. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 u s e r _ n a m e 00 0d
  38. #CASSANDRAEU @ICONARA 01 00 03 09 00 00 00 2a

    00 00 00 26 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 75 73 65 72 20 57 48 45 52 45 20 75 73 65 72 5f 6e 61 6d 65 20 3d 20 3f 81 00 03 08 00 00 00 3e 00 00 00 04 00 10 ca 48 7f 1e 7a 82 d2 3c 4e 8a f3 35 51 71 a5 2f 00 00 00 01 00 00 00 01 00 0a 6d 79 6b 65 79 73 70 61 63 65 00 05 75 73 65 72 73 00 09 75 73 65 72 5f 6e 61 6d 65 00 0d
  39. #CASSANDRAEU @ICONARA STREAM 0b STREAM 0c STREAM 0d STREAM 0e

    STREAM 07 STREAM 08 STREAM 09 STREAM 0a STREAM 0f STREAM 10 STREAM 06
  40. #CASSANDRAEU @ICONARA Map: a [short] n indicating the size of

    the map, followed by n entries. Each entry is composed of two [short bytes] representing the key and the value of the entry map.