axelson

axelson

Scenic Core Team

10) Lonestar ElixirConf 2018 - User-centered API Versioning - Niall Burkley

User-centered API Versioning - @nburkley

API versioning is hard. Upgrading versions usually involves pain, for a public-facing API, that pain is usually borne by the customer depending on our API. Instead we’re trying to take the pain out of versioning an API, at least for the user.

Inspired by Stripe’s API (https://stripe.com/blog/api-versioning), we’ve been working on implementing rolling, ‘point-in-time’ versioning for our API. It allows new features and changes to be made to the API regularly, instead of having to wait for a major version upgrade. But more importantly, it keeps the whole process simple for users. Users only need to think about versioning if they want to. They can build an integration when they sign up, and know it will continue to work without needing changes. If they want new features they can upgrade to newer versions on their own timeline.

Implementing multiple versions of an API sounds like a terrible idea. Just the thought of branching business logic in multiple places based on what version you’re serving makes me shudder. Instead of implementing multiple versions, we can implement just one version, the latest version, and layer the older versions on top of this.

Functional languages are great for transforming data, and if you’re using Elixir for Plug-based web applications this pattern works very nicely. Phoenix is a perfect example of this - it’s basically a collection of plugs that transform a connection as it makes it’s way through the application.

With this in mind, using elixir and transformation modules, we can step through versions by transforming our requests and responses. We’ve been using this to keep our API customers happy and our codebase clean and I’d love to talk more about it.

Audience: Beginner, Intermediate

All Talks Link: 0) Lonestar ElixirConf 2018 Talks

Where Next?

Popular in Talks Top

axelson
ElixirConf US 2018 – Building Video Chat with Elixir & Phoenix – Anil Wadghule (@anildigital) In this talk, I will s...
New
zporter
ElixirConf US 2018 – Breaking Down the User Monolith – Zach Porter Coming from Ruby on Rails, the convention is to have a...
New
CodeSync
Code Sync: Vaxine, the Rich CRDT Database for ElixirPhoenix Apps | James Arthur | Code BEAM America 2022 Comments welcome! View the #cod...
New
axelson
ElixirConf US 2018 – Making a GraphQL Server with Absinthe & Dataloader – Aaron Votre (@shamshirz) The GraphQL query...
New
axelson
Hey folks, beginning to post today’s round of ElixirConf videos! ElixirConf US 2018 – Elixir at a Walking Pace – Lance Halvorsen (@lance...
New
axelson
ElixirConf US 2018 – Meet Virtuoso: The Chatbot Orchestration Framework Built with Elixir – Justus Eapen (@justuseapen) ...
New
axelson
ElixirConf US 2018 – Docker and OTP: Friends or Foes? – Daniel Azuma (@dazuma) Docker is the hot deployment technology a...
New
axelson
Hey everyone! I hope everyone enjoyed ElixirConf! I know that I did. In order to facilitate and continue the discussion (especially since...
New
rodrigues
Day 1 Keynote about Lumen - An alternative BEAM implementation, designed for WebAssembly by @bcardarella @KronicDeth @bitw...
New
axelson
ElixirConf 2017 - Keep an Eye on the Sky with Nerves and Phoenix - @electricshaman As part of the next gener...
New

Other popular topics Top

sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement