12 min listen
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
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)
Season Two Wrap: Welcome to the last episode of Season 2 of the podcast! We are taking this opportunity to recap what we covered in the season and talk about what we liked and what we didn't like so much. We do not have a guest for today's show so it is just Eric and Justus doing some reflection. We do want to take this opportunity to thank all of our guests that have appeared on this season and shared their expertise with us, we definitely feel we learned a lot during this time! In Season 3 we will be focussing on functional programming, performance and teaching Elixir, so make sure to keep an eye out for when that drops in the future! by Elixir Wizards