From Client to   developer   execution           Disclaimer
DisclaimerThis lecture and slides should be used only in humor, and thats how it should be understoodIf you find it offens...
What does people think Redis is ?
So what is Redis ?Open source in memory fast binary safe database that support the following:  Key Value information  Arra...
Ah, yes, but what is Redis ?        Hello my name is    REmote Dictionary Server          prepare to die
OK, its a Key Value database    Are you happy now ?
How I met Redis ? I needed to use it with an Object Pascal basedProject, and there was no Object Pascal client …          ...
What is the first rule of Redis ?You do not talk about Redis …Rediss developer created most client libraries that exists t...
So how do you write a client for              Redis ?Reading the Protocol documentation (well, duh …)Finding that some of ...
Why ? Its very readable programming language Its string types (yes in plural) are easy to use Because it is one of the bes...
Can you show us an example ?…var  my_command : TRedisAbstractCommands;…writeln(my_command.ParamsToStr([a, 3.14,   False]))...
In soviet Russia several ways implement youFour ways to implement the client:  Thinking like dynamic language (but code in...
Data types                             TPersistent                          TRedisReturnType TRedisNullReturnType         ...
There shell be a command !                                 TRedisObject  TRedisParser                                     ...
Few more words regarding commands Every new version of Redis has new/changes to  commands. Cant support such changes for l...
Sockets TSynaClient  TRedisIO
Debug, Errors and log filesEach class can have its own log file for debug/error or no file at all !You can use also the sa...
The final slideShould we use Redis ?
The final slideShould we use Redis ?Oh fuck, its a Perl lecture, I forgot to add some details on that ...
Redis and Perlmain module: https://metacpan.org/module/Redissome benchmarks:  http://blogs.perl.org/users/wolfgang_kinkeld...
The final slideRight, so what did I asked ?
The final slideShould we use Redis ? A   Yes B   No C   All of the above
CreditsAngry birdExcitedBoredMemCachedRedisBuzz Lightyear
Questions ?
Redis - from client to execution
Redis - from client to execution
Redis - from client to execution
Upcoming SlideShare
Loading in …5
×

Redis - from client to execution

1,533 views

Published on

A lecture about a client for Redis that I'm writing, and it's hardships that I encountered.

This lecture and slides should be used only in humor, and should not be viewed with different light

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

No Downloads
Views
Total views
1,533
On SlideShare
0
From Embeds
0
Number of Embeds
567
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Redis - from client to execution

  1. 1. From Client to developer execution Disclaimer
  2. 2. DisclaimerThis lecture and slides should be used only in humor, and thats how it should be understoodIf you find it offensive in any way, please do not use this slides, and go out from the lecture !
  3. 3. What does people think Redis is ?
  4. 4. So what is Redis ?Open source in memory fast binary safe database that support the following: Key Value information Arrays/Lists and nested lists Sets/Sorted Sets Hashes Type of Message Queue Distributed work
  5. 5. Ah, yes, but what is Redis ? Hello my name is REmote Dictionary Server prepare to die
  6. 6. OK, its a Key Value database Are you happy now ?
  7. 7. How I met Redis ? I needed to use it with an Object Pascal basedProject, and there was no Object Pascal client … So I started to work on one: https://github.com/ik5/redis_client.fpc And I still do (when I have free time ...)
  8. 8. What is the first rule of Redis ?You do not talk about Redis …Rediss developer created most client libraries that exists today …The documentation that you see, well its can be better: What you read and what that is implemented are different things (sometimes) There are a lot of missing information,
  9. 9. So how do you write a client for Redis ?Reading the Protocol documentation (well, duh …)Finding that some of the real implementation is different then the protocol itselfWishing a slow death to the developerBitching about it at your blog (posts)Asking yourself: why dont you use a dynamic programming language ...Sitting down and solving the problems
  10. 10. Why ? Its very readable programming language Its string types (yes in plural) are easy to use Because it is one of the best compiled programminglanguages ever existedBecause I can !
  11. 11. Can you show us an example ?…var  my_command : TRedisAbstractCommands;…writeln(my_command.ParamsToStr([a, 3.14,  False]));…(* output as string :   arn3.14rnFalsern *)
  12. 12. In soviet Russia several ways implement youFour ways to implement the client: Thinking like dynamic language (but code in Pascal) Thinking in C (but code in Pascal) Thinking in Java/C# (but code in Pascal) Think in Pascal …I read few implementation of the clients: Lua, Ruby, Perl, Python, Java and CDecided on the 4th way as the proper wayResearch and documentation by me on each command !“To infinity and beyond”
  13. 13. Data types TPersistent TRedisReturnType TRedisNullReturnType TRedisNumericReturnTypeTRedisStatusReturnType TRedisErrorReturnType TRedisMultiBulkReturnTypTRedisBulkReturnType e
  14. 14. There shell be a command ! TRedisObject TRedisParser TRedisAbstractCommandsCommand group Command group Command group Command group Command group Command group
  15. 15. Few more words regarding commands Every new version of Redis has new/changes to commands. Cant support such changes for long time So I my library helping you, by allowing you to call commands, never existed when I wrote the client, without going insane ! OK, You might go insane, but not because of my library...
  16. 16. Sockets TSynaClient TRedisIO
  17. 17. Debug, Errors and log filesEach class can have its own log file for debug/error or no file at all !You can use also the same logger for every classYour own error handlers using callbacks, or just let exception raise up
  18. 18. The final slideShould we use Redis ?
  19. 19. The final slideShould we use Redis ?Oh fuck, its a Perl lecture, I forgot to add some details on that ...
  20. 20. Redis and Perlmain module: https://metacpan.org/module/Redissome benchmarks: http://blogs.perl.org/users/wolfgang_kinkeldei/2012/01servers, plugins, and interesting stuff: https://metacpan.org/module/Redis::Queue https://metacpan.org/module/Nginx::Redis https://metacpan.org/module/Redis::hiredis https://metacpan.org/module/Redis::Client https://metacpan.org/module/AnyEvent::Redis https://metacpan.org/module/Protocol::Redis https://metacpan.org/module/Tie::Redis https://metacpan.org/module/MojoX::Redis
  21. 21. The final slideRight, so what did I asked ?
  22. 22. The final slideShould we use Redis ? A Yes B No C All of the above
  23. 23. CreditsAngry birdExcitedBoredMemCachedRedisBuzz Lightyear
  24. 24. Questions ?

×