{"id":26014712,"url":"https://github.com/superlistapp/ferryman_ex","last_synced_at":"2025-08-19T03:02:50.702Z","repository":{"id":62429554,"uuid":"464670391","full_name":"superlistapp/ferryman_ex","owner":"superlistapp","description":"A pure Elixir JSONRPC2 Client \u0026 Server realization with Redix.","archived":false,"fork":false,"pushed_at":"2022-03-02T16:03:55.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-13T20:54:42.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/ferryman_ex/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superlistapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-28T22:54:54.000Z","updated_at":"2024-07-21T09:02:17.000Z","dependencies_parsed_at":"2022-11-01T20:07:27.438Z","dependency_job_id":null,"html_url":"https://github.com/superlistapp/ferryman_ex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/superlistapp/ferryman_ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superlistapp%2Fferryman_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superlistapp%2Fferryman_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superlistapp%2Fferryman_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superlistapp%2Fferryman_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superlistapp","download_url":"https://codeload.github.com/superlistapp/ferryman_ex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superlistapp%2Fferryman_ex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271092828,"owners_count":24697914,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-03-06T02:33:43.828Z","updated_at":"2025-08-19T03:02:50.681Z","avatar_url":"https://github.com/superlistapp.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡️ FerrymanEx\n\n[![CI](https://github.com/superlistapp/ferryman_ex/actions/workflows/main.yml/badge.svg)](https://github.com/superlistapp/ferryman_ex/actions/workflows/main.yml)\n[![Hex.pm](https://img.shields.io/hexpm/v/ferryman_ex.svg)](https://hex.pm/packages/ferryman_ex)\n[![docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/ferryman_ex/)\n\n`FerrymanEx` is a pure Elixir JSONRPC2 Client \u0026 Server realization.\n\n[Ferryman](https://github.com/superlistapp/ferryman) is a JSONRPC 2.0 Client \u0026 Server realization for Erlang and Ruby.\n\n## 💻 Installation\n\n```elixir\ndef deps do\n  [\n    {:ferryman_ex, github: \"superlistapp/ferryman_ex\"}\n  ]\nend\n```\n\n## 🚀 Getting Started\n\nTo get started, make sure you have a running instance of Redis.\n\n`FerrymanEx` uses [Redix](https://hex.pm/packages/redix) as redis driver.\n\nYou can start a local redis instance by running `docker run --name my-redis -p 6379:6379 -d redis`\n\n### Server\n\nFirst, let's define a JSONRPC2 handler, and define the functions we want to be\nhandled by RPC calls.\n\n```elixir\ndefmodule ExampleHandler do\n  use JSONRPC2.Server.Handler\n\n  def handle_request(\"add\", [x, y]) do\n    x + y\n  end\nend\n```\n\nNow we can start our Ferryman Server.\n\n```elixir\niex\u003e {:ok, pid} = Ferryman.Server.start_link(redis_config: [], channels: [\"mychannel\"], handler: ExampleHandler)\n```\n\nThe default `redis_config` will look for a redis instance on `\"localhost:6379\"`.\nFor more configuration options, please check the [Redix Docs](https://hexdocs.pm/redix/Redix.html#module-ssl).\n\nYou can define a list of `channels`, and pass the `handler` module.\n\n### Client\n\nTo start communicating with the Ferryman server, let's first start our redis process:\n\n```elixir\niex\u003e {:ok, redis} = Redix.start_link()\n```\n\nNow we can simply call the functions, the server has implemented:\n\n```elixir\niex\u003e Ferryman.Client.call(redis, \"mychannel\", \"add\", [1, 2])\n{:ok, 3}\n```\n\n## 🤓 Used Libraries\n\n[Redix](https://hex.pm/packages/redix)\n[Jason](https://hex.pm/packages/jason)\n[JSONRPC2](https://hex.pm/packages/jsonrpc2)\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\nCopyright (c) 2022 Superlist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperlistapp%2Fferryman_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperlistapp%2Fferryman_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperlistapp%2Fferryman_ex/lists"}