{"id":13508893,"url":"https://github.com/heroku/redo","last_synced_at":"2025-10-21T19:01:39.972Z","repository":{"id":15124527,"uuid":"17851547","full_name":"heroku/redo","owner":"heroku","description":"pipelined erlang redis client","archived":false,"fork":true,"pushed_at":"2019-01-17T23:48:02.000Z","size":150,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-03-07T06:17:40.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jkvor/redo","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heroku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-18T02:46:37.000Z","updated_at":"2024-11-20T14:49:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f745ca1-3175-4a74-a053-f146ee220c06","html_url":"https://github.com/heroku/redo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fredo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fredo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fredo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fredo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroku","download_url":"https://codeload.github.com/heroku/redo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314044,"owners_count":20757455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:00.088Z","updated_at":"2025-10-21T19:01:39.623Z","avatar_url":"https://github.com/heroku.png","language":"Erlang","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"### Philosophy\n\n\u003e If you wish to write a redis client from scratch, you must first invent the universe.\n\n### About\n\nRedo is a pipelined redis client written in Erlang. It lacks any sort of syntactic sugar. The only API function is redo:cmd, which takes a raw redis command.\n\n### Build\n\n    $ make\n\n### Test\n\n#### Unit tests\n\n    $ ./rebar eunit suite=redo\n\n#### Local read benchmark\n\n    $ erl -pa ebin\n    1\u003e bench:sync(1000).\n    91ms\n    10989 req/sec\n\n    2\u003e bench:async(1000, 100).\n    38ms\n    26315 req/sec\n\n#### Concurrency test\n\n    $ erl -pa ebin\n    1\u003e redo_concurrency_test:run(20, 100). %% 20 pids, 100 random operations performed per pid\n\n### Start\n\nNo arguments: register process as \"redo\"\n\n    $ erl -pa ebin\n    1\u003e redo:start_link().\n    {ok, \u003c0.33.0\u003e\n    2\u003e whereis(redo).\n    \u003c0.33.0\u003e\n    3\u003e redo:cmd([\"PING\"]).  \n    \u003c\u003c\"PONG\"\u003e\u003e\n\nRegister with custom name\n\n    erl -pa ebin\n    1\u003e redo:start_link(myclient).\n    {ok,\u003c0.33.0\u003e}\n    2\u003e whereis(myclient).\n    \u003c0.33.0\u003e\n    8\u003e redo:cmd(myclient, [\"PING\"]).  \n    \u003c\u003c\"PONG\"\u003e\u003e\n\nStart anonymous Redo process\n\n    erl -pa ebin\n    1\u003e {ok, Pid} = redo:start_link(undefined).\n    {ok,\u003c0.33.0\u003e}\n    2\u003e redo:cmd(Pid, [\"PING\"]).\n    \u003c\u003c\"PONG\"\u003e\u003e\n\nSpecifying connection options\n\n    erl -pa ebin\n    1\u003e redo:start_link([{host, \"localhost\"}, {port, 6379}]).\n    {ok,\u003c0.33.0\u003e}\n    2\u003e redo:cmd([\"PING\"]).\n    \u003c\u003c\"PONG\"\u003e\u003e\n\n    3\u003e redo:start_link(myclient, [{host, \"localhost\"}, {port, 6379}]).\n    {ok,\u003c0.37.0\u003e}\n    4\u003e redo:cmd(myclient, [\"PING\"]).\n    \u003c\u003c\"PONG\"\u003e\u003e\n\n### Commands\n\n    erl -pa ebin\n    1\u003e redo:start_link().\n    \u003c0.33.0\u003e\n    2\u003e redo:cmd([\"SET\", \"foo\"]).\n    {error,\u003c\u003c\"ERR wrong number of arguments for 'set' command\"\u003e\u003e}\n    3\u003e redo:cmd([\"SET\", \"foo\", \"bar\"]).\n    \u003c\u003c\"OK\"\u003e\u003e\n    4\u003e redo:cmd([\"GET\", \"foo\"]).\n    \u003c\u003c\"bar\"\u003e\u003e\n    5\u003e redo:cmd([\"HMSET\", \"hfoo\", \"ONE\", \"ABC\", \"TWO\", \"DEF\"]).\n    \u003c\u003c\"OK\"\u003e\u003e\n    6\u003e redo:cmd([\"HGETALL\", \"hfoo\"]).\n    [\u003c\u003c\"ONE\"\u003e\u003e,\u003c\u003c\"ABC\"\u003e\u003e,\u003c\u003c\"TWO\"\u003e\u003e,\u003c\u003c\"DEF\"\u003e\u003e]\n\n### Pipelined commands\n\n    1\u003e redo:start_link().\n    \u003c0.33.\u003e\n    2\u003e redo:cmd([[\"GET\", \"foo\"], [\"HGETALL\", \"hfoo\"]]).\n    [\u003c\u003c\"bar\"\u003e\u003e, [\u003c\u003c\"ONE\"\u003e\u003e,\u003c\u003c\"ABC\"\u003e\u003e,\u003c\u003c\"TWO\"\u003e\u003e,\u003c\u003c\"DEF\"\u003e\u003e]]\n\n### Pub/Sub\n\n    $ erl -pa ebin\n    1\u003e redo:start_link().\n    {ok,\u003c0.33.0\u003e}\n    2\u003e Ref = redo:subscribe(\"chfoo\").\n    #Ref\u003c0.0.0.42\u003e\n    3\u003e (fun() -\u003e receive {Ref, Res} -\u003e Res after 10000 -\u003e timeout end end)().\n    [\u003c\u003c\"subscribe\"\u003e\u003e,\u003c\u003c\"chfoo\"\u003e\u003e,1]\n    4\u003e redo:start_link(client).  \n    {ok,\u003c0.39.0\u003e}\n    5\u003e redo:cmd(client, [\"PUBLISH\", \"chfoo\", \"hello\"]).\n    1\n    6\u003e (fun() -\u003e receive {Ref, Res} -\u003e Res after 10000 -\u003e timeout end end)().\n    [\u003c\u003c\"message\"\u003e\u003e,\u003c\u003c\"chfoo\"\u003e\u003e,\u003c\u003c\"hello\"\u003e\u003e]\n\n    %% restart redis server...\n\n    7\u003e (fun() -\u003e receive {Ref, Res} -\u003e Res after 10000 -\u003e timeout end end)().\n    closed\n    8\u003e f(Ref).\n    ok\n    9\u003e Ref = redo:subscribe(\"chfoo\").                                        \n    #Ref\u003c0.0.0.68\u003e\n    10\u003e (fun() -\u003e receive {Ref, Res} -\u003e Res after 10000 -\u003e timeout end end)().\n    [\u003c\u003c\"subscribe\"\u003e\u003e,\u003c\u003c\"chfoo\"\u003e\u003e,1]\n    11\u003e redo:cmd(client, [\"PUBLISH\", \"chfoo\", \"hello again\"]).\n    1\n    12\u003e (fun() -\u003e receive {Ref, Res} -\u003e Res after 10000 -\u003e timeout end end)().\n    [\u003c\u003c\"message\"\u003e\u003e,\u003c\u003c\"chfoo\"\u003e\u003e,\u003c\u003c\"hello again\"\u003e\u003e]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fredo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroku%2Fredo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fredo/lists"}