Digests » 140
this week's favorite
In the sample problem that follows, we’ve set up a simple Elixir toy app to demonstrate how we can set up a GraphQL endpoint for registering users, and storing user and other relevant information to a database. Our goal is to persist only data that is valid, or return a helpful error otherwise. We’ll leverage Ecto.Multi and Ecto.Repo.transaction to write a clean user registration flow and handle errors elegantly.
Mnemonics are generated by hashing, appending, and chunking up a random series of bytes into a list of numbers that can be evenly mapped onto a given word list. Creating these mnemonic word sequences seems like the perfect opportunity to flex our Elixir muscles.
In the previous article, we have implemented authentication solution. But we still have some spots to cover. Our users still can access every page even though they are not logged in. Today we will introduce some improvements in our authentication solution and do it by using the Plugs. Let’s get started.
Bugsnag popped up and complained about an Elixir.DBConnection.ConnectionError - I took a look immediately to find out what made our wonderful application crash. It turned out it was a timeout error! Ecto (elixir database tool) defaults to a timeout of 15 seconds and we had a query that took longer than this? Yikes! What happened? This is the story of what happened, where we went wrong and how we made sure we fixed it.
Modern web technology stacks are constantly trying to get faster, trying to meet the never-ending requirements of the community and cater to the ever-growing user base. It is hard to choose a technology that strikes a good balance between developer productivity and also is able to provide a good throughput, latency, uptime, extendability etc.