How to create a new Ecto Adapter?

Hi,

I was thinking about creating a new Ecto Adapter for Apache Geode, as a way to learn something new about both Geode and Ecto and because I would like to use Geode in a Elixir project of mine.
The question is that I have been looking for some kind of documentation, tutorial o whatever documentations that could help me to figure out how to build a new Ecto Adapter… but with no success at all.

It would be great if someone could point me to any kind of help regarding this topic.

Thanks in advance…

2 Likes

This will give you some overview of the Ecto side of things, but not help with Geode.

3 Likes

This series is also very helpful: http://blog.plataformatec.com.br/2018/11/building-a-new-mysql-adapter-for-ecto-part-i-hello-world/

2 Likes

If Apache Geode runs SQL, then you’re a lucky guy, and the resource given above will suffice I think.
Otherwise, you’re not so lucky because you’ll have to work with the entrails of Ecto.Query to translate them into the language you want to use.
When I wrote my own adapter, I look the adapter for Mnesia (ecto_mnesia) to have an idea of how to do things because, as you noticed docs is not so abundant.

Good luck!

1 Like

Apache geode does not run SQL… in fact it is a kind of key/value store with a Rest interface. It has some drivers for java ( the language used to write Geode) and some others.

My intention was to write an adapter using the Rest interface.

Thanks for the resources … I have not seen the video yet, but I have read the article and does not get anything from there … Maybe the last one is the only one with some information regarding Ecto.

I was looking for some info regarding how Ecto adapters works and the interface to fulfill to write a new one for a new database.

I will review the articles after watching the video

Thanks for all the information :slight_smile: