Etso — Ecto 3 adapter allowing use of Ecto schemas held in ETS tables

Hi, Etso has recently reached version 1, with Ecto 3.8+ compatibility.


Etso is an ETS adapter, allowing you to use Ecto schemas with ETS tables.

Hex / GitHub

Within this library, a bare-bones Ecto Adapter is provided. The Adapter transparently spins up ETS tables for each Ecto Repo and Schema combination. The tables are publicly accessible to enable concurrency, and tracked by reference to ensure encapsulation. Each ETS table is spun up by a dedicated Table Server under a shared Dynamic Supervisor.

Changes from the initial version include:

• Added support for Ecto 3.8.3
• Added support for order_by
• Added support for parallel preloads

See this test to understand its capabilities.

40 Likes

:fire: nice! :fire:

1 Like

Just giving this a whirl now — very nice work indeed. Thanks!

1 Like

Congratulations! I’ve been looking for something like this forever, so I can use the same schema in a pass-through cache from an ETS repo to a PG one.

2 Likes

Hi, I’m using flop 0.19, which requires ecto 3.9. While adding logflare(which needs etso) I’m getting this issue:

Because etso >= 1.0.0 depends on ecto ~> 3.8.3 and flop >= 0.18.0 depends on ecto ~> 3.9, etso >= 1.0.0 is incompatible with flop >= 0.18.0.
And because your app depends on etso ~> 1.1, flop >= 0.18.0 is forbidden.
So, because your app depends on flop ~> 0.19, version solving failed.

when I experimentally drop flop(haha “drop flop”) to 0.18 I see:

Because ecto_sql >= 3.9.0 and < 3.9.2 depends on ecto ~> 3.9.0 and ecto_sql >= 3.9.2 and < 3.10.0 depends on ecto ~> 3.9.2, ecto_sql >= 3.9.0 and < 3.10.0 requires ecto ~> 3.9.0.
And because ecto_sql >= 3.10.0 depends on ecto ~> 3.10.0, ecto_sql >= 3.9.0 requires ecto ~> 3.9.0 or ~> 3.10.0.
And because etso >= 1.0.0 depends on ecto ~> 3.8.3, etso >= 1.0.0 is incompatible with ecto_sql >= 3.9.0.
And because your app depends on ecto_sql ~> 3.9, etso >= 1.0.0 is forbidden.
So, because your app depends on etso ~> 1.1, version solving failed.

I’m not why there is this hard limit on etso seeming to needing ecto 3.8.3 precisely. Am I doing something wrong?

Michael

Hi, Etso was tested ok with Ecto 3.9 so you could use an override in the meantime.

1 Like