Discover this podcast and so much more

Podcasts are free to enjoy without a subscription. We also offer ebooks, audiobooks, and so much more for just $11.99/month.

Jay Ashe from Cava - Elixir in Production

Jay Ashe from Cava - Elixir in Production

FromElixir Wizards


Jay Ashe from Cava - Elixir in Production

FromElixir Wizards

ratings:
Length:
17 minutes
Released:
Apr 4, 2019
Format:
Podcast episode

Description

We talk with Jay Ashe from Cava about their current and past Elixir projects and how they are deployed.
Jay Ashe - Cava (https://cava.com/)
Find Jay elsewhere online:
https://twitter.com/jgashe
0:40 - Give us a quick overview of the Elixir projects you have in production.
CAVA is a fast-casual mediterranean restaurant chain with 75 stores across the US. Elixir and phoenix power CAVA’s online ordering platform (order.cava.com and the CAVA app). We’ve got a REST (and websockets) api sitting behind react and our mobile apps, and we use phoenix templates for some of our back of house systems.
1:11 - Why are you using Elixir in production?
We have from the start! The application was originally implemented by Chris Bell and his team at madebymany. Chris, by the way, has a fantastic talk from ElixirConf 2016 that goes into our architecture and how we use elixir and OTP constructs to model our business logic. Chris will occasionally talk about the CAVA project on his Elixir podcast, ElixirTalk.
Chris’ Talk - https://www.youtube.com/watch?v=fkDhU-2NWJ8 (https://www.youtube.com/watch?v=fkDhU-2NWJ8)
1:58 - What are some of the high level advantages / disadvantages of Elixir, from your perspective?
Advantages: Elixir and Phoenix gives you rails-esque productivity/developer experience that scales. I think phoenix channels are a great example of this. Build a channel with complex real-time functionality and let it scale effortlessly.
Disadvantages:
Hiring and onboarding, depending on your mindset, can be difficult. If you’re used to hiring for experience in  your stack, its just going to be more difficult. Lately we’ve started doing one-hour weekly knowledge shares that cover elixir basics and are closely tied to our usage of them. So, here’s a test case, and here are all of the test helpers that we have set up that will help you write that test. We also just sent a new Elixir dev to lonestar elixir
3:59 - What do you use to host your Elixir app?
Heroku
How do you deploy your application?
Heroku-buildpack-elixir https://github.com/HashNuke/heroku-buildpack-elixir (https://github.com/HashNuke/heroku-buildpack-elixir)
4:44 - Are you able to get zero downtime deploys?
- As close as possible! We get that out of the box with heroku. When we deploy, heroku won’t point traffic to the new dyno until the app is healthy. We make extensive use of Phoenix channels over websockets, and our clients will reconnect automatically and transparently.
5:10 - Do you cluster the application?
Nope.
5:52 - How does your Elixir App perform compared to others in your environment?
I can’t really talk about numbers here, but Elixir is not at all our bottleneck. We don’t have other production applications
6:25 - How are you solving background task processing?
Quantum for cron jobs, genservers for everything else. We’re running a single elixir application that handles all synchronous and async processing
7:07 - What libraries are you using?
Phoenix
Phoenix_swagger for API documentation that integrates with controller tests https://github.com/xerions/phoenix_swagger (https://github.com/xerions/phoenix_swagger)
Ex_rated for rate limiting calls to our integrations https://github.com/grempe/ex_rated (https://github.com/grempe/ex_rated)
Timex and calendar for datetime support with timezones https://github.com/bitwalker/timex (https://github.com/bitwalker/timex)
A combination of httpotion and httpoison for HTTP clients, but im interested in trying Mint https://github.com/ericmj/mint (https://github.com/ericmj/mint)https://github.com/appcues/mojito (https://github.com/appcues/mojito)
Bamboo for transactional emails, like order confirmations etc https://github.com/thoughtbot/bamboo (https://github.com/thoughtbot/bamboo)
8:59 - 3rd Party Services (i.e. Email, Payment Processing, etc)
Sendgrid for email, Google for geocoding, slack for some internal alerting of application health, LevelUp for payments. https://www.thelevelup.com/ (https://www.thelevelup.com/)
10:07 - Do you have
Released:
Apr 4, 2019
Format:
Podcast episode

Titles in the series (100)

Elixir Wizards is an interview-style podcast for anyone interested in functional programming and the Elixir Programming Language. Hosted by SmartLogic engineers Sundi Myint, Owen Bickford, Bilal Hankins, and Dan Ivovich, this show features in-depth discussions with some of the brightest minds in the industry, discussing training and documentation in Phoenix LiveView, the evolution of programming languages, Erlang VM, and more. In the current season, we're celebrating a decade of Elixir and exploring what the next ten years hold for this powerful language. With expert insights from guests including José Valim, Hugo Baraúna, and Saša Juric, we discuss emerging trends in cyber security, cloud infrastructure, web transports, machine learning, static vs dynamic types, and what the future might hold for Elixir developers. Learn more about how SmartLogic uses Phoenix and Elixir. (https://smartlogic.io/phoenix-and-elixir?utm_source=podcast)