Skip to content

Instantly share code, notes, and snippets.

@xkef xkef/architecture.txt
Last active May 4, 2019

Embed
What would you like to do?
backend architecture
+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| | |
| | caching / batching / hashing / pubsubbing of queries |
| | |
| | +-------------------------------------+ |
| | | | |
+-------------+ | | | | |
| | | | | | |
| | | | | v |
| web worker | <---------------+ | +------+ | +------------+---------------+ |
| | | | | | | | |
| | | | | | | redis | |
+-------------+ | | | | | +<-------+ |
| | +-+ | | [in-memory cache] | | |
+-------------+ | | +----------------------------+ | +---------------+-------------+ | | | +---------------------------------+ |
| | | | | | rev proxy | | | +----------+-------+---------+ | | | |
| | | | | NGINX | | | main | | ^ | | postgresql | |
| web worker | <-----------------------------------------+ +<---------------->+ | v | +---->+ | |
| | | | | [frontend web server] | | | [rocket.rs] | +----------+-------+---------+ | | [data model & rbac /rls auth] | |
| | | | | | +------+ | | | | | | | |
+-------------+ | | +----------------------------+ | +--------------+--------------+ | postgraphile | | +---------------------------------+ |
| | | | | +<-------+ |
+-------------+ | | | +-----------------------> | [nodejs gql] | |
| | | | | | | |
| | | | | query / mutate +----------------------------+ |
| web worker | <---------------+ | | |
| | | | |
| | | +--+ |
+-------------+ | | |
| | |
| | |
| | localhost |
| | |
+-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
FEATURES
------------------------
- main backend with rust (typesafe, fast, functional)
- postgraphile (psql to gql server, small mutations / queries)
- postgresql (main datamodel, most authorization, large queries)
- redis (mainly hash and cache large queries in memory, fast)
- nginx (payload to web workers, firewall, rev proxy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.