Graph DB and Node.js:
Building Stackoverflow Clone

Sung
sung.io

Using SQL or NoSQL with node
is slowing you down

Plan

  1. Graph database
  2. Demo

Graph database

  • Nodes and edges
  • Edge traverals
  • Key-value lookups

Facebook Open Graph

open-graph

Google Knowlege Graph

knowldge-graph

Why?

  • Retrieve complex data fast
  • Store data in a natural way

Dgraph

Demo

GraphOverflow

  • Lifehacks Stack Exchange (550,000 edges)
  • CRUD questions, answers, comment, votes
  • Collaborative filtering
  • GitHub Oauth

Schema

What We Will See

  • Less complex app
  • Faster iteration
  • Free to experiment

[Demo]

Source code

Observation #1

Retrieve complicated result with one query.

Observation #2

Just Focus on UI

  • 80% (2803 LOC) client side
  • 20% (700 LOC) server side

Using node.js + Graph DB
is easy and fast

End