Live data from Hacker News

The ‘Backends for Frontends’ Pattern at SoundCloud

thoughtworks.com

1–10 of 26 posts

Re: The ‘Backends for Frontends’ Pattern at SoundCloud

#2
This pattern is essentially what technologies like GraphQL or Falcor make super easy. My GraphQL server talks to a bunch of microservices and presents a simple clean API for my web application, largely freeing the front-end from years worth of bloated APIs.

Re: The ‘Backends for Frontends’ Pattern at SoundCloud

#3
This is true at every interface though. Better to have the same people working on the backend for the backend for the frontend. Better to have the same people work on the database as the thing that queries it.

Ultimately you should separate teams by the functionality they're supporting, not by which part of the stack they're notionally in. One interesting approach is to pair-program at each step - designer and frontendey dev do the page, frontendy dev and backendy dev do the front half of the backend, backendy dev and DBAey dev do the data access layer.

Re: The ‘Backends for Frontends’ Pattern at SoundCloud

#8
I actually found the article from Sam Newman went into greater depth: http://samnewman.io/patterns/architectural/bff/

Interesting to see this creates new problems, such as blocking calls to dependant services downstream, and what services you declare as critical or not. Also duplicate code is unavoidable. So if you're attempting this pattern, keep those things in mind since you will have limited technology choices.

Sound Cloud is using Scala here. https://developers.soundcloud.com/blog/building-products-at-...

Edit: Found their mention of technology

Re: The ‘Backends for Frontends’ Pattern at SoundCloud

#10

This pattern is essentially what technologies like GraphQL or Falcor make super easy. My GraphQL server talks to a bunch of microservices and presents a simple clean API for my web application, largely freeing the front-end from years worth of bloated APIs.

This was my first thought also. They invented a name for the pattern but it is just a facade with the development responsibilities delegated to the front end team. Nothing ground breaking. This is probably more of a communication solution between front end and back end developers. The concept is very similar to GraphQL and Falcor. There isn't a benefit BFF gets with multiple end points over a single end point interface. I was trying to explain what Falcor was to a friend a couple weeks ago. It's a facade pattern and a correct use case for javascript and its asynchronous nature that has the added benefit of also being the language Facebook and Netflix frontend developers are using when they use React. Outside of the interface on the backend they are not using javascript but rather Python, Java, and in the case of Facebook, PHP, yuk. The point here is that even where the frontend interfaces with the backend it is still in the frontend's domain. The word, phrase, that came to mind, although I rarely use it, was clearing house. This pattern of managing transactions already exists in the business world -- the software used in clearing houses might already reflect this, that would be curious. It makes sense and there are similarities including error checking between a financial clearing house and these APIs. A clearing API might be an appropriate name.
Post reply on HN