Commit Graph

56 Commits

Author SHA1 Message Date
Alice Ryhl
31e3a7db42 Update write_decimal max string length (#73) 2021-01-03 12:36:55 +01:00
Milan
7ee3ae8342 Updates cargo run command in examples (#71) 2020-12-29 00:13:32 +01:00
Carl Lerche
0fb264826d chore: update to Tokio 1.0 (#70) 2020-12-23 09:41:23 -08:00
Taiki Endo
da29371460 Update async-stream to 0.3.0 (#69) 2020-11-09 12:57:00 -08:00
Alice Ryhl
8ecd82107e Remove note about AsyncBufRead (#68) 2020-10-24 14:42:24 -07:00
Carl Lerche
77df32d15e Track Tokio v0.3 changes (#67) 2020-10-22 20:18:54 -07:00
Raphael Megzari
b552f53c3f fix typo (#64) 2020-09-28 11:07:20 +02:00
Alice Ryhl
85e19aa21a Reword disclaimer about production use (#62) 2020-08-16 19:48:45 +02:00
Carl Lerche
cefca5377a prepare v0.2.0 release (#60) 2020-07-15 14:38:05 -07:00
Carl Lerche
16be963908 make more types public (#59) 2020-07-15 14:21:17 -07:00
Carl Lerche
b7bab20d0c Split Connection::read_frame for readability (#58)
The `read_frame` function was fairly big. This splits up the function
into a separate `parse_frame` function. This should help with breaking
up the concept of framing into smaller chunks.
2020-06-24 10:57:57 -07:00
João Oliveira
98e712ac96 add a specific Command enum to buffer.rs (#57) 2020-06-21 17:55:15 +02:00
Carl Lerche
1cb8ec9b0f rename pool to buffer (#56) 2020-06-12 19:38:27 -07:00
Carl Lerche
03f8281431 make more APIs public (#55) 2020-06-12 15:15:51 -07:00
Alice Ryhl
f1042d6b7c simplify Subscribe::apply (#54) 2020-06-11 20:39:15 -07:00
Evan Cameron
0991ee25b2 Add explicit notify_sender drop (#45) 2020-06-11 13:43:24 -07:00
João Oliveira
c0bcee4300 add initial connection pool (#53) 2020-06-11 13:43:02 -07:00
João Oliveira
dc8993b56b fix typo on Set command apply function: Get should be Set (#52) 2020-05-27 09:19:35 -07:00
avinassh
e9c38ed030 Update README.md to use renamed bins introduced on #44 2020-05-27 11:06:52 +01:00
Alice Ryhl
58e816e36e fix broken sentence (#51) 2020-05-20 15:24:25 -05:00
avinassh
4c9ef8b31f fix typos (#50) 2020-05-20 21:58:16 +02:00
Taiki Endo
4c9edec0b1 Remove unnecessary allocations (#49) 2020-05-19 13:37:02 -07:00
guanqun
bbaa16c6f5 typo fix (#48) 2020-05-18 11:25:04 -05:00
Alice Ryhl
9af44d6336 Update Tokio to 0.2.21 (#46)
As Tokio version 0.2.21 contains a fix in the broadcast channel that
removes a memory leak in mini-redis, I don't think 0.2.20 should be
considered the minimum supported version, even if the codebase compiles
with that version.

Refs: #38
2020-05-15 14:51:24 -07:00
Carl Lerche
a3f3dd867d rename bins (#44)
This better supports `cargo install mini-redis`.
2020-05-15 14:23:58 -07:00
Carl Lerche
a372a3cb8c remove accidental Tokio 0.1 dependency (#43) 2020-05-15 14:23:41 -07:00
Carl Lerche
2965f9a1cf Prepare v0.1.0 release (#42) 2020-05-13 13:50:09 -07:00
Carl Lerche
fdba12b964 use structopt instead of Clap (#41)
mini-redis uses the CLI derive pattern. Clap does not yet have a release
supporting this pattern. Using structopt allows mini-redis to avoid git
dependencies.
2020-05-12 16:48:16 -07:00
Carl Lerche
84f7086238 use a released version of Tokio (#40) 2020-05-12 16:40:34 -07:00
Carl Lerche
4bc7af4455 readme: indicate there is no persistence yet. (#36) 2020-04-15 13:37:21 -07:00
Carl Lerche
f17525569c tweak CI (#35) 2020-04-15 13:14:51 -07:00
Carl Lerche
f855dc5d50 Use GitHub actions for CI 2020-04-15 12:28:40 -07:00
Carl Lerche
81888e36b5 fmt (#34) 2020-04-15 09:47:28 -07:00
Carl Lerche
ecf1eb4ea8 More comments and tweak details (#33)
Co-authored-by: Alice Ryhl <alice@ryhl.io>
2020-04-15 09:44:12 -07:00
Carl Lerche
5752d1e0fc mostly docs, some code tweaks as well (#31)
Db background tasks never shutdown o_O
2020-04-13 21:02:32 -07:00
Carl Lerche
757de6762d add readme and license (#30)
Co-authored-by: Alice Ryhl <alice@ryhl.io>
2020-04-13 15:26:54 -07:00
Carl Lerche
b0edd092f4 write conn comments (#29)
Co-Authored-By: Alice Ryhl <alice@ryhl.io>
2020-04-13 12:49:19 -07:00
Carl Lerche
6f7abbcb48 fix test broken by merge (#28) 2020-04-10 15:55:43 -07:00
Carl Lerche
d4f0dac671 add server pub/sub tests, fix pub/sub response (#27)
mini-redis server responses on PUB/SUB commands did not match real
redis.
2020-04-06 16:34:12 -07:00
João Oliveira
922919a9d4 add unknown commands handling without breaking client connection (#26)
- fix client unsubscribe when subscribe list in the event of the
  received unsubscribe list is in a different order than subscribed
- add tests for subscribe and unsubscribe commands
- add tests for unknown command handling
2020-04-06 13:27:58 -07:00
João Oliveira
e7f6a372f0 add initial client tests (#25) 2020-04-05 20:57:45 -07:00
João Oliveira
83cdedf34f fix startup panic by raising shutdown channel buffer to 1 (#24) 2020-04-05 13:17:51 -07:00
João Oliveira
3fbd9ddc42 add pub sub client implementation with examples (#22)
* add pub sub client implementation with examples

* replace subscribed_channels list Vec with HashSet to avoid duplicates

* update Subscriber to use async-stream instead of manual Stream impl

* revert update to error handling server.rs, as #21 handles it

* remove uneeded recursion limit extension
2020-04-05 18:33:21 +01:00
Carl Lerche
f187085156 Improve accept logic (#21)
Handle accept errors using an exponential backoff strategy. Also uses a
semaphore to limit the max number connections.

Adds inline documentation and comments.
2020-04-05 10:24:49 -07:00
João Oliveira
2115ebfb41 add hello world example (#20) 2020-04-03 15:10:20 -07:00
Carl Lerche
4ac69aeb76 write server test (#19) 2020-04-03 12:21:39 -07:00
Carl Lerche
e3a7aac271 chore: remove dump.rdb (#18) 2020-04-02 15:05:02 -07:00
Carl Lerche
bbb80c341e apply client/cli polish (#15)
Continuation of #11. Refines the client structure and implements GET.

`clap` is decoupled from the lib code. This is done to avoid any CLI
parsing concerns to leak into the lib. The main motivation for this is
to allow the reader to focus on Tokio concerns and not CLI parsing
concerns.
2020-04-01 16:09:41 -07:00
Avery Harnish
7bd7086d41 implement client set (#11) 2020-03-28 14:00:47 -07:00
Carl Lerche
fc5597f293 server: implement key expiration (#13) 2020-03-25 13:45:54 -07:00