Skip to content

A twitter-inspired social media site, with a distributed, replicated backend. Built for Distributed Systems in Spring '18

Notifications You must be signed in to change notification settings

adamsanghera/blurber

Repository files navigation

Blurber

In the Wild

This app can also be found deployed on heroku, at https://dist-blurber.herokuapp.com/

The Front-End server (everything in the main.go hierarchy) is hosted on heroku, and is set up to continously build on the /release branch on our github repo.

The front-end server connects to a backend server hosted by Linode.com (it's cheap).

The three (3!) backend services are hosted on the Linode server, which the heroku app sends gRPC messages to.

Presentation here

Main features

  • Login/ register
  • Delete account
  • Write blurb
  • Subscribe to blurbers
  • Unsubscribe on feed
  • Simple profile page
  • Delete personal single blurbs
  • OPTIONAL: Feed option to show all blurbs ('Discover' page) vs. just subscription

Roadmap for detaching backend

  • Define protobufs for each backend service:

    • BlurbDB
    • UserDB
    • SubscriptionDB
  • Split off backends to be behind a GRPC call:

    • BlurbDB
    • UserDB
    • SubscriptionDB
  • Ensure that backends are safe to concurrent access from multiple frontends

    • BlurbDB
    • UserDB
    • SubscriptionDB

These will be managed in branches:

  1. protobufs
  2. split
    • split-blurb
    • split-user
    • split-subscription
  3. safe
    • safe-blurb
    • safe-user
    • safe-subscription

Roadmap for replication

  1. Repurpose code from Lab 2 to work in this project
    • Replace labrpc code with gRPC
      • protobuf spec
    • Add service/leader discovery to the protocol, instead of static configurations
    • Write unit tests demonstrating functional replication
    • Add a buffered channel for exporting newly committed commands, to be applied elsewhere
      • Integrate this feature with the recovery calls
  2. Graft replication daemon onto subscription database, so that it makes use of replication
    • Background thread for processing the buffered commit channel
    • No state changes outside of background thread
    • Unit tests proving it all works
  3. Node failure
    • Proving failover security at the daemon level, with unit tests proving efficacy
    • Proving failover security at the backend-tier level, with unit tests proving efficacy
    • Integrating leader failover security into the front-end, maintaining a peers list of backend services, to pivot between on lack of contact

How to run

  1. cd your way into ./ and exec ./spinBackend.sh to spin out all the non-frontend servers
  2. cd your way into ./ and exec .runLocal.sh, if your FE server is on your lapto. Otherwise, exec ./run.sh if the backend is on the linode server.
  3. Point your favorite browser @ http://localhost:4000 if the FE server is running locally, or http://172.104.24.141:4000 if the FE server is running on linode
  4. When you're done playing around, exec ./killBackend.sh

Team

  • Adam Sanghera (as8513)
  • Hieu Do (hsd258)

About

A twitter-inspired social media site, with a distributed, replicated backend. Built for Distributed Systems in Spring '18

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •