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 (APIs as infrastructure: future-proofing Stripe with 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

CodeSync
Code Sync: Keynote: Gang of None? Design Patterns in Elixir - José Valim | ElixirConf EU 2024 Comments welcome! View the <span class="ha...
New
axelson
Let’s Talk Process Dictionary - @gregvaughn Well, the first rule of Fight Club, I mean: process dictionary is that we don’...
New
axelson
ElixirConf 2017 - HTTP 2 Plug to Phoenix Cowboy too - @Gazler In this talk, we will look at the changes in C...
New
axelson
ElixirConf 2017 - Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming - by @Version2beta ...
New
axelson
by @SophieDeBenedetto LiveView’s reliance on server-rendered HTML and leveraging of bi-directional communication over WebSockets means ...
New
axelson
ElixirConf US 2018 – Growing Applications and Taming Complexity – Aaron Renner (@aaronrenner) Growing an ap...
New
axelson
ElixirConf 2017 - Writing an Editor in Elixir - by @ijcd (Ian Duggan) Elixir for GUIs? Yes, it’s possible. I...
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
TwistingTwists
I am in middle of watching this. I have to stop every minute and think over what Chris just said. The amount of info he sends over that ...
New
axelson
ElixirConf 2017 - Elixir The Toyota Way - Powell Kinney Toyota has a century-long legacy of innovation in ma...
New

Other popular topics Top

WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
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
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement