{"id":19506279,"url":"https://github.com/ne-sachirou/mnemonics","last_synced_at":"2026-02-07T18:32:34.882Z","repository":{"id":25406388,"uuid":"101561939","full_name":"ne-sachirou/mnemonics","owner":"ne-sachirou","description":"Read only data store for Elixir: fast, concurrently, for large data \u0026 hot reloadable.","archived":false,"fork":false,"pushed_at":"2025-01-04T23:15:34.000Z","size":190,"stargazers_count":13,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-29T16:48:49.992Z","etag":null,"topics":["database","elixir","elixir-lang","elixir-language","elixir-library","elixir-programming-language"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ne-sachirou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-27T15:32:32.000Z","updated_at":"2023-10-25T13:30:45.000Z","dependencies_parsed_at":"2024-11-10T22:36:54.027Z","dependency_job_id":"3232ef26-1ed3-4677-81fb-ab3ec05134a2","html_url":"https://github.com/ne-sachirou/mnemonics","commit_stats":{"total_commits":57,"total_committers":4,"mean_commits":14.25,"dds":0.2807017543859649,"last_synced_commit":"cf98e1831e3d42bafd46fb89f2081436ff04e19d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ne-sachirou/mnemonics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ne-sachirou%2Fmnemonics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ne-sachirou%2Fmnemonics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ne-sachirou%2Fmnemonics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ne-sachirou%2Fmnemonics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ne-sachirou","download_url":"https://codeload.github.com/ne-sachirou/mnemonics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ne-sachirou%2Fmnemonics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29203782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T17:44:10.191Z","status":"ssl_error","status_checked_at":"2026-02-07T17:44:07.936Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["database","elixir","elixir-lang","elixir-language","elixir-library","elixir-programming-language"],"created_at":"2024-11-10T22:36:20.209Z","updated_at":"2026-02-07T18:32:34.866Z","avatar_url":"https://github.com/ne-sachirou.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/ne-sachirou/mnemonics/workflows/test/badge.svg)](https://github.com/ne-sachirou/mnemonics/actions)\n[![Coverage Status](https://coveralls.io/repos/github/ne-sachirou/mnemonics/badge.svg)](https://coveralls.io/github/ne-sachirou/mnemonics)\n[![Hex.pm](https://img.shields.io/hexpm/v/mnemonics.svg)](https://hex.pm/packages/mnemonics)\n\n# Mnemonics\n\nRead only data store for Elixir: fast, concurrently, for large data \u0026 hot reloadable.\n\nMnemonics is analogous to Ruby's [ActiveHash](https://rubygems.org/gems/active_hash) in it's usecase.\n\n[Document](https://hex.pm/docs/mnemonics).\n\n## Installation\n\nAdd `mnemonics` to your list of dependencies in `mix.exs`.\n\n```elixir\ndef deps do\n  [\n    {:mnemonics, \"~\u003e 0.5\"}\n  ]\nend\n```\n\nStart under your application.\n\n```elixir\ndefmodule Your.Application do\n  use Application\n\n  def start(_type, _args) do\n    children = [\n      {Mnemonics, [name: Your.Mnemonics, ets_dir: \"/tmp\"]}\n    ]\n\n    opts = [strategy: :one_for_one, name: Your.Supervisor]\n    Supervisor.start_link(children, opts)\n  end\nend\n```\n\n## Usage\n\nCreate an `example.ets` by `:ets.tab2file/3`. Then put it into the ets_dir. The `examples.ets` stores `{:example1, %{id: :example1}}`.\n\n```\npriv/\n└repo/\n  └seeds/\n    └examples.ets\n```\n\nCreate an `Example` module, use Mnemonics \u0026 load.\n\n```elixir\ndefmodule Example do\n  use Mnemonics, table_name: :examples, sup_name: Your.Mnemonics\nend\n\nExample.load(1)\n```\n\nWe can lookup the table.\n\n```elixir\n:ets.lookup(Example.table_name(1), :example1)\n```\n\nLet's reload a new table. Put a new `examples.ets` into the ets_dir \u0026 load it with a new version number.\n\n```elixir\nExample.load(2)\n```\n\nWe can lookup the new table.\n\n```elixir\n:ets.lookup(Example.table_name(2), :example1)\n\nsnap = Mnemonics.Snap.snap(Mnemonics.Snap.new(), 2, %{})\n:ets.lookup(Example.table_name(snap), :example1)\n```\n\nMnemonics has cache function named `Mnemonics.Snap`.\n\n```elixir\nsnap = Mnemonics.Snap.snap(Mnemonics.Snap.new(), 2, %{})\nget_and_update_in(snap[:examples].cache[:example1], fn\n  nil -\u003e\n    example = :ets.lookup Example.table_name(snap), :example1\n    {example, example}\n\n  example -\u003e\n    {example, example}\nend)\n```\n\n### :ets.new/2 Option\n\n- Should `:public` or `:protected`. `:protected` (default) is recommended.\n- Can't `:named_table`.\n- `{:read_concurrency, true}` is recommended.\n\n## Architechture\n\n[![processes](./processes.png)](https://github.com/ne-sachirou/mnemonics/blob/master/processes.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fne-sachirou%2Fmnemonics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fne-sachirou%2Fmnemonics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fne-sachirou%2Fmnemonics/lists"}