Ankhers

Ankhers

Maintainer Wanted: MongoDB and MongoDB Ecto

Hello everyone!

I am looking for one or more individuals to take over the mongodb and mongodb_ecto packages. My company no longer uses MongoDB and I have not really been keeping up with the packages as much as I should. If anyone is interested in taking over the package, or just helping out with it, let me know and I will do what I can in order to help you get started with the codebase.

First 10 of 50 Posts! Switch mode

hauleth

hauleth

Probably I will be tasked to maintain it anyway, as my current company already does that as we added few features (transactions) to Your driver.

18
Post #1
Ankhers

Ankhers

If you want, I can give you commit access to the repository. Or, if you prefer, I can transfer the repository to the organization/user of your choosing.

deadtrickster

deadtrickster

We can move it over to our organization, what I have to do?

Ankhers

Ankhers

I just need the organization name on GitHub, as well as at least one hex.pm account name so you can continue to push updates.

deadtrickster

deadtrickster

josevalim

josevalim

Creator of Elixir

Thank you @deadtrickster and @hauleth for stepping up to maintain it. :slight_smile:

14
Post #6
Ankhers

Ankhers

I just finished transferring the packages and wanted to say thank you to @deadtrickster and @hauleth, as well as anyone else at KOBIL Systems for taking over these packages!

peoj

peoj

@deadtrickster @hauleth - it looks like the mongodb and mongo_ecto packages could do with some TLC. I had a quick look today what it might take to provide ecto 3.x compatibility but I quickly got stuck in broken tests so I thought I’d ask first. Do you have any plans to provide any updates soon, and if not do you have any guidance on what needs to be updated?

Thanks!

johnnyshields

johnnyshields

At TableCheck we’d really love to see these better maintained as well. We are a Ruby/Elixir + Mongo company but TBH the experience using Elixir+Mongo has been rocky at best – especially compared to Ruby’s fantastic Mongoid library.

If looks like zookzook/elixir-mongodb-driver has now eclipsed kobil-systems/mongodb in terms of functionality. I would propose there should be a project to move mongo_ecto to use the zookzook driver and also upgrade to Ecto 3. We could commit some resources to this on our end if others are willing to help as well.

peoj

peoj

Glad you agree.

I’m happy to put in some effort but it’d be really great if one of the maintainers could give an idea of what’s required to give a little head start!

As for the choice of mongo driver, I have no strong opinions; the existing one seems fine for most purposes. Whatever gives us the best way for encouraging further contributions and better maintenance going forward.

Last Post!

cortfritz

cortfritz

@josefrichter I see no answers and thought I would offer my unqualified opinion, as I have given this some thought.

I think this topic is not a casual one and rests on opinions that go beyond Elixir/Phoenix <=> Mongo and into RDBMS vs. NoSQL. I have experienced strong opinions about RDBMS vs NoSQL and I also believe I notice a strong preference for Postgres in the Elixir community. So I offer these opinions gently, and hopefully don’t invite too strong of an opposing reaction.

I also believe NoSQL is young and under-understood. Example: the Normal Forms for relational data were first published over fifty years ago. I am unaware of any equivalent body of guidance and thought for NoSQL. I know of database leaders who share best practices and good ideas, but these have tended to be contextual. E.g. a good design for a NoSQL product catalog at planetary scale. Or how to use NoSQL as an alternative to building a meta model in RDBMS for CRM. And so on.

I have wondered if I could synthesize these learnings into a modest version of the Normal Forms guidance for RDBMS but it hasn’t come to me yet. I remain faithful to what bdtomlin asserts, and so I am replying here, over a year and half later.

First, what are the advantages of NoSQL?

Ecto addresses, to a degree, what I believe to be the most important advantage: centralizing and homogenizing complexity from database technologies and implementation processes, to that of code. With migrations, the schema of your database is defined entirely in Elixir, in a specific manner. So db changes can be accomplished through CI/CD in a standard manner using the same mechanisms and intuitions as with Elixir, because with Ecto DB schema is Elixir. This is wonderful.

Using NoSQL without something like Ecto may allow a software team to gain even greater value - although without such a convention/standard/interface/adapter/etc many teams get into trouble, especially due to the lack of understanding mentioned above. But an adept team that wants to define their own DBAPI can form it to their liking without the constraints of Ecto. Want to allow for multiple versions of your schema at once? Drop a schema version into a standard spot in every document’s metadata, and your DB layer can reason over the schema and what to do about it. This can result in, as an example, global rollouts of a distributed system where schema changes in production without cutover or outage.

This brings us to the second advantage of NoSQL: (better) supporting schema versioning. With RDBMS, to my knowledge, we are stuck with one schema at a time, per database. Nowhere else in our code are we so constrained.

And this brings us to one of the key advantages of NoSQL + Elixir: pattern matching. Avoiding imperative conditions, and using pattern matching, idiomatic Elixir is very nicely able to work with databases returning heterogenous schema versions. If this isn’t immediately obvious to you, see if using an intuitions about pattern against incoming an protocol and across versions. Same thing but from the other side. It’s great. This goes beyond what I’ve outlined here.

Next is that it is often helpful to have entities with differing metadata. Like we learned when we first learned OO that the animal class had the mating_display method, which meant modeling feathers for peacocks, jousting for elk, and makeup and credit cards for humans. A NoSQL vs. RDBMS discussion can, on the NoSQL side, talk about saving the entity type as we did with the schema version above, in this case with the entity metadata vs document metadata. Then in NoSQL you can do what we called at Xbox an “ABC” pattern. Where schema section A contains things true for all types, B contains segregated spaces for each entity to record their type-specific data, and C contains meta-data and other flags, tags, workflow state, etc - information orthogonal to entity type. This is one of those database leader nuggets of wisdom I was lucky to collect.

Bringing that back to Elixir, again we see pattern matching being useful. The database complexity above can get pretty hairy for languages that don’t have Elixir’s expressiveness. But it just fits with Elixir. In a way that RDBMS does, in my opinion, not.

Related to this, implicitly, is the advantage of representing data hierarchy in JSON vs normalizing across tables in RDBMS. I won’t go into this too much because it gets quite technical and is a supporting story to the versioning and typing of schema noted above.

Another nugget of wisdom about NoSQL is making “chunky” documents. People coming from RDBMS to Mongo sometimes design their Mongo collections to be similar to what they would do in an RDBMS. Normal, to be joined. In some situations, particularly at planetary scale, we try to minimize customer-time joins. Map-Reduce is an example of this. Caching user-centered queries is another. Eventual consistency is a consequence of this. This is a big topic, and I’m happy to delve into it in another post or elsewhere, but for the moment, accept that I believe this to be true. If one believes that to be true, then they are moving some of the capability that transactions were giving them to code which eventually makes a piece of data consistent (a misnomer, an entity might never be consistent, but some process is always scuttling around moving it towards consistency, and other processes are caching what data is consistent to a place for rapid retrieval). You know what is super duper helpful for this? Genservers. Bombproof systems that are always running (scuttling) based on patterns (not consistent) creating outputs (consistent data), well, they just fit. Maybe said another way, eventual consistency is well supported by a system that is distributed, reliable, and good at passing many messages around.

I’ve got to go help family get ready for dinner, but that’s a good if not exhaustive representation about some of the strong feelings I have for Elixir+Mongo. I’m just discovered this conversation and super happy to support the Elixir Mongo org. I’m going to try to go find the repo now and see what I can do.

Where Next?

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2976 91332 914
New
f0rest8
Hi everyone :waving_hand: Posting here to showcase and announce that Metamorphic is now officially live on a public-facing domain at htt...
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
AstonJ
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
zachdaniel
Introducing AshStorage! Attachment and file management that slots directly into your resources :smiling_face_with_sunglasses: I had hope...
New

We're in Beta

About us Mission Statement