Beyond #noBackend

Privacy-first, decentralised frontend-only WebApps

(with SAFE)

Benjamin Kampmann   @gnunicornBen

Front-End Amsterdam, Dec 6th 2016

credits: https://codemestat.com/2014/09/21/one-week-in-hacker-paradise/

App without "the backend"

🏦

💻

UI

DB

SQL

🏧

🚦

🚫

Ruby, Node, Python, Java, ${LANG}

🚫

Fundamentally every application consist of two parts: the frontend and state machine.If yours has three, you have one too many.

noBackend

Welcome, to the wonderful world of noBackend,
where frontend developers build full stack apps,
without thinking about the backend.

 ­-- noBackend.org

Frontend-Driven API

  • Provide API rather than protocol
  • Tennant oriented
  • simple JSON-Oriented Data Format
  • Async with Promises

For Profile Management

// sign up
account.signUp('joe@example.com', 'secret');

// sign in
account.signIn('joe@example.com', 'secret');

// sign out
account.signOut();

// reset password
account.resetPassword('joe@example.com');
[...]

Data Storage

// add a new object
var type = 'note';
var attributes = {color: 'red'};
store.add(type, attributes)
  .done(function (newObject) {});
  .fail(function (error) {});

// update an existing object
var type = 'note';
var id = 'abc4567';
var update = {size: 2};
store.update(type, id, update)
  .done(function (updatedObject) {});

Data Retrieval

// find one object
var type = 'note';
var id = 'abc4567';
store.find(type, id)
  .done(function (object) {});

// Load all objects
store.findAll()
  .done(function (objects) {});

// Load all objects from one type
var type = 'note';
store.findAll(type)
  .done(function (objects) {});

// remove an existing object
var type = 'note';
var id = 'abc4567';
store.remove(type, id)
  .done(function (removedObject) {});

Document Database

"not backend"

Today

Firebase

Backendless

parse.com

Amazon

Auth
   Store
   Fetch

Services*

"serverless"

single function microservices

AWS Lambda

Azure Functions

Google Cloud Functions

.com

Concerns

  • Provider lock-in
  • still Single-Point of Failure
  • new (D)DoS angles
  • Data Ownership

Whoever stores the data, owns it

DEMO TIME

SAFE features

Questions?

Thanks!

Benjamin Kampmann   @gnunicornBen

safenetwork.org

safedev.org

 

maidsafe.net

maidsafe

github.com/

Bitcoin Wednesday

Tomorrow, 7pm @ RockstartBallroom

SAFEdev Meetup

Friday, 7pm @ Hackers & Founders Building