Best Practices and Challenges with Dynamic Repos in Elixir's Ecto

211
clicks
Best Practices and Challenges with Dynamic Repos in Elixir's Ecto

Source: youtube.com

Type: Video

Sam McDavid shares his experience of using Ecto.Repo.put_dynamic_repo/1 in Elixir to create separate databases with unique encryption keys for different customers. This approach was taken to adhere to contractual requirements for data segregation and security. The journey of the implementation is covered, beginning from initial requirements, infrastructure adjustments, to the adaptation of their code development processes. Sam emphasizes the importance of discussing the obstacles encountered during the adoption of dynamic repositories and the strategies employed to overcome them. Sam McDavid underscores the significance of diving into development, understanding that no plan is as valuable as working software, and creating something that can be used and refined. He also touches on infrastructure management in AWS and local environment setups using Docker, and highlights the necessity of building custom mix tasks for database schema handling in the absence of out-of-the-box support for multiple databases. Testing complexities due to Ecto's sandbox mode during transactions are also mentioned, along with the decision to keep the solution simple and avoid overthinking. The journey concludes with the realization of the importance of team alignment for the success of engineering projects in Elixir.

© HashMerge 2024