Skip to content

Very early stage of a bespoke backend that I conceived

Notifications You must be signed in to change notification settings

mbuechse/news-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

news-backend

Very early stage of a bespoke backend that I conceived

Proof of concept. Definitely sketchy, in the spirit of Stop future proofing software

Features:

  • ultra-simple NoSQL storage in RDBMS (in this case, sqlite)
    • probably not unlike a typical IndexedDB implementation
    • single table for all objects plus "projections" for member fields needed in queries
    • modular schema (see db.go)
  • (unidirectional, on demand) sync of JSON object graphs from server to client via "REST" API
  • common queries (corresponding to views in the frontend) are materialized (because writes are super rare compared to reads)
  • materialized views are augmented by a "prefetch" attribute (a list of all objects reachable from the query result) that reduces the number of roundtrips to at most two (fetch query result, fetch missing references)
  • job queue with (currently) five workers (simple thanks to goroutines and channels)
  • intermediate representation of JSON objects similar to e-mail (header + body)
  • privilege-based object transformation (not everyone can see everything)
  • authentication via JSON Web Token

About

Very early stage of a bespoke backend that I conceived

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages