HN user

sheharyarn

123 karma

[ my public key: https://keybase.io/sheharyar; my proof: https://keybase.io/sheharyar/sigs/PAl5t1g2hhLmKsut41MudcthQoPQvZLAoqTc27C-xEo ]

Posts25
Comments9
View on HN
slab.com 4y ago

Tracking content and changes with Delta in Elixir

sheharyarn
8pts1
slab.com 5y ago

Building secure Multi-tenant applications in Elixir

sheharyarn
6pts3
medium.com 5y ago

Opening the black box of vision AI algorithms

sheharyarn
1pts0
kfirlavi.herokuapp.com 6y ago

Defensive Bash Programming

sheharyarn
5pts0
hamad.blog 6y ago

Grayscale is buying 100% of mined Bitcoins since halving

sheharyarn
3pts0
www.haydenplanetarium.org 6y ago

Reflections on the color of my skin

sheharyarn
55pts42
medium.com 6y ago

Your Indie game dev team will fail

sheharyarn
14pts3
hariszulfiqar.com 6y ago

Why I'm Betting on Gutenberg

sheharyarn
4pts0
github.com 7y ago

Show HN: Que – Distributed Job Processing in Elixir with Mnesia

sheharyarn
12pts2
github.com 7y ago

Show HN: Memento – Real-Time Distributed Database (Mnesia) in Elixir

sheharyarn
2pts0
github.com 7y ago

Elixir 1.9.0-RC released

sheharyarn
4pts0
support.apple.com 7y ago

Apple makes zsh default shell on macOS

sheharyarn
100pts44
github.com 7y ago

Show HN: Memento – Mnesia Real-time Distributed Database in Elixir

sheharyarn
5pts0
slab.com 7y ago

Andy Grove Formed Modern Startup Culture

sheharyarn
5pts0
slab.com 7y ago

How Elon's writing style hurts Tesla

sheharyarn
3pts0
www.drdobbs.com 7y ago

Interview with Alan Kay (2012)

sheharyarn
5pts0
llewellynfalco.blogspot.com 7y ago

Don't use the greater-than sign in programming (2016)

sheharyarn
48pts94
www.youtube.com 7y ago

Erlang – The Movie (1990)

sheharyarn
2pts0
codepen.io 7y ago

The Mine: CSS Only Adventure Game (No Javascript!)

sheharyarn
4pts0
github.com 7y ago

Memento – Mnesia Distributed DB in Elixir

sheharyarn
3pts0
pjreddie.com 8y ago

YOLO v3 – Object Detection Model [pdf]

sheharyarn
2pts0
github.com 8y ago

DenseNet Image Segmentation in Tensorflow

sheharyarn
2pts0
stackoverflow.com 8y ago

Writing Custom CSS vs. Using Front End Frameworks

sheharyarn
5pts1
medium.com 8y ago

A quantitative socio-economic study of Tinder

sheharyarn
1pts0
github.com 9y ago

Mnesia-based Job Processing in Elixir

sheharyarn
3pts0

Here's a little context on Delta (https://github.com/slab/delta-elixir) and the linked blog post:

Delta is a format to describe documents' contents and how it changes over time. This is a core piece of technology at Slab, that powers our real-time collaboration engine, thanks to the built-in support for Operational Transform (think multiple users working together in Google docs).

Though we've been using it internally for almost 4 years now, we're finally open-sourcing it to the wider Elixir community.

Would love your feedback!

This obscure little feature in Ecto/Elixir is something we've been using at Slab.com for about a year. While the blog post only covers the feature itself, I wanted to give a better overview of *WHY* we're using it.

Slab is a multi-tenant Phoenix app where all tables in our database, including pivot tables, have an `org_id` foreign key that references the team the data belongs to. Using association defaults enforces that the correct `org_id` value is automatically set for all resources.

We combine this with an `OrgRepo` module that wraps around our default `Repo`, which can only write or read other resources with the same `org_id`, ensuring that data for one team has no possibility of accidentally leaking to another team (using `Repo` is forbidden in our codebase).

An added bonus is; when we eventually have to scale our databases via something like sharding and have to vertically partition the data based on `org_id`, we would already have this system in place to support us.

- Programming

- Programming Hackathons / Conferences

- Music (Alternative / Indie)

- TV Shows and Anime (I waste too much time on them)

- Yoga

- Cooking

- Learning other languages

- Non-Fiction Books