kin2kin is a social network designed for families. It’s simple enough for the older generation and a safe, secure place for children under the age of 13 to connect with their wider family.
I designed and built the entire distributed, sharded server architecture for kin2kin on AWS. The server provides a REST API to mobile and web clients which is fully redundant across multiple AZs. The architecture was originally built around CloudFormation but has recently moved to Docker containers with Kubernetes. A number of systems have been broken out into MicroServices.
Family Graph: Built to handle complex family trees that include divorce and blended families, the graph automatically links Grandparents, Aunts, Uncles, Cousins and broader family. Parents have complete control over who their children interact with as all connections are created to and from households, rather than individuals.
Sharding: The system had to scale beyond a single database. Based on an article by the Instagram team, I setup a globally unique resource id that included a database shard in every identifier. I then created database middleware on top of Sequelize that hid most of the sharding logic and allowed normal Sequelize queries to shard themselves automatically across multiple databases.
Photos and Videos: When photos and videos are uploaded worker jobs convert them to multiple resolutions and formats, optimised for mobile.
Analytics: We track a large number of user events and interactions and store them in a custom analytics datastore. I built the datastore based on Uber’s Schemaless database design article. We then use the Redash web frontend to query this and the ElasticSearch logs to build custom dashboards.
Automated Retention and Tutorial Emails: Using the analytics above I built a system that triggers specific retention and tutorial emails to users based on their activity in the system.
- Mini online store allows collaborative purchasing of gifts for family. The credit card processing is done via Stripe
- Bootstrap based Web Admin tools for viewing and editing users, their connections and processing orders
- Logging and diagnostics systems with ElasticSearch, Logstash and Kibana
- Container orchestration using Kubernetes on AWS via KOPS
- CircleCI pipeline that fully tests every commit and automatically rolls out to the test environment. Single command rolls out specific git revision to the production environment.
Helped with development of iOS, Android and AngularJS web app as needed