Recently our team has been transitioning to a more microservice ecosystem. To maintain our data integrity, we decided to assign UUIDs as primary keys for the resources we’re creating in our newest application, so that other apps can have a static reference point for the data they’re receiving from us.
No fluff in this post, we’re going to get right to how you can set this up yourself!
You can absolutely write these options on every schema you want them used in, but in our project we’re using them for most of our models. So we made this:
In From Ruby with Love, we visualized processes in Elixir as individual spies completing missions. We ended with an open question: what happens when a process fails? Thankfully, we can again find our analog in the spy world.
First, let’s look at two more aspects of Erlang and Elixir: Linking and Monitoring.
Let’s return to our spies. Say they’re working on something super top secret, a formula that they each have partial ingredients for.
When you’re coming from OO to Elixir, you hear about “parallelism” and “fault tolerance” and how great they are. You learn that these things are made possible through functional programming and OTP. And so when you start coding in it, you parrot these things back to people who ask you why Elixir is so cool. But after months of deftly dodging the question “Wait, what is the BEAM?”, you need a new tactic.
What helped me was understanding the common goals of OO and functional programming and recognizing their shared ancestry, because understanding a premise can often help us arrive…
We recently replaced a hand-rolled test controller with Mox for testing in our umbrella app (how and why are detailed in “Elixir Test Mocking with Mox”). Other than the numerous times we swore Mox wasn’t connected (but it was actually just our broken tests), there was one place in particular that stumped us: testing processes that involved GenServers.
In our app, we’re using GenServers to manage the transactional process of creating organizations and repositories on GitHub. They initiate separate processes for a number of these requests and clean up individual pieces if one of them fails.
When we run the…
Flatiron School’s Learn.co platform has some amazing features for students as they progress through our web dev and data science curriculums. We have the in-browser IDE, instant indicators for passing/failing tests, and interactive Jupyter notebooks. Understandably, these are features attractive to many other types of curriculum. Our current challenge is how to expose them to partners within their own learning environments — how to provide a seamless experience for students taking classes outside of the Learn.co platform.
Let’s say, for example, a computer science class supported by the education tech provider 2U wanted to use our in-browser IDE. …
If we want to use the popular messaging system Kafka with our Elixir projects, we have a few wrappers we can choose from. This blog post covers integrating one of them, Kaffe, which proved difficult to troubleshoot because of results like this:
I recently made a 2-line update in Flatiron School’s Learn.co stylesheets to give us glorious scrolling menus. Previously, if you wanted a list item that fell below the viewport height, you had to get creative with your zoom in the view. This wasn’t so much a problem for most users, but as developers we have access to the full admin menu, which has gotten pretty lengthy.
Note: we should see “Rollouts” as the last item on this menu.