Sign in

Sujay Jayakar

@sujayakar.bsky.social
923 followers 786 following 59 posts

cofounder @ convex.dev. easily nerd sniped and okay with it.

PostsRepliesMedia
Sujay Jayakar @sujayakar.bsky.social · 04/03/2025
check out stack.convex.dev/convex-mcp-s... for instructions for setting it up. it's still in beta, so let us know if you have any feedback.
stack.convex.dev
Convex MCP Server
Convex now supports a powerful MCP server that lets you introspect your deployment's state, run functions, and read and write data.
020
Sujay Jayakar @sujayakar.bsky.social · 04/03/2025
@convex.dev now has an MCP server! the cursor AI agent can now list project's schema and API, read data from tables, and call functions. it's insane how good it is at gluing tool calls together. here's an example of it building a histogram of a message lengths in a chat app.
151
Sujay Jayakar @sujayakar.bsky.social · 13/12/2024
we did this back at dropbox for its sync engine -- see isaac's dropbox.tech/infrastructu... for more
dropbox.tech
Testing sync at Dropbox
130
Sujay Jayakar @sujayakar.bsky.social · 13/12/2024
inputs from the user, network, persistence -> core sync engine state machine -> output messages. we then wire up these inputs and outputs to a real websocket, indexeddb, etc. in a client. but since we have this separation, it's trivial to reproduce any bug in a test.
120
Sujay Jayakar @sujayakar.bsky.social · 13/12/2024
been working on the @convex.dev object sync engine, and, unsurprisingly, we've been structuring it to use deterministic simulation testing. i'm still blown away every time how *simple* writing systems as deterministic state machines makes testing complicated race conditions
161
Sujay Jayakar @sujayakar.bsky.social · 04/12/2024
agreed, but i am curious how they'll evolve their transaction size / row size limits over time. they're in a great, FoundationDB shaped, niche right now, but that niche isn't a good fit for a lot of workloads. so if they stay here, I don't see it being a fully drop in replacement for rds/aurora.
000
Sujay Jayakar @sujayakar.bsky.social · 03/12/2024
that's 100% it: we started with the database, built efficient reactivity, and are now working our way out to the clients. excited to have it in all of your hands soon!
030
Sujay Jayakar @sujayakar.bsky.social · 03/12/2024
we had a great conversation with @schickling.dev about local-first and how it's incredibly relevant to database folks. it doesn't matter how fast our databases are if this performance doesn't extend to the user experience. www.youtube.com/watch?v=n6Mx...
youtube.com
Building better, faster apps with Local-First (w/Johannes Schickling)
YouTube video by Convex
041
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
at runtime, it can check to see if there's a path between a user and an object by intersecting these two sets. this operation can be made efficient using the same compressed integer set data structures used in text search indexing, something google is already very good at :)
010
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
with this assumption, their indexing system precomputes the set of highlighted nodes reachable from each user. then, for each object, it also precomputes the set of all highlighted nodes that are one step away.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
intuitively, each user is a member of a group, which may be nested in another group, which may then own a project. projects may have many documents, but the set of all projects visible to a user should be relatively small.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
I've highlighted the nodes *one step back* from each final object. zanzibar assumes that this set has relatively low cardinality.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
I've drawn a representative access control graph, where we start with user A and traverse the graph to all of the objects reachable from A.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
zanzibar addresses this with their "leopard indexing" system. the core idea here is *to make assumptions about the structure of the access control graph*, and not have to solve the general graph reachability problem.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
checking path reachability is difficult: users may have access to millions+ of objects, and doing a naive depth-first search in the object graph on every access would be really expensive.
100
Sujay Jayakar @sujayakar.bsky.social · 26/11/2024
we looked at zanzibar yesterday, where a user A has access to an object B if there's a path between them in the access graph. let's walk through how they make this graph reachability problem efficient.
120
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
this approach is also flexible: it's easy to express nested hierarchies and ACL inheritance without explicit denormalization (i'm looking at you, NTFS). the cost? implementing reachability checks efficiently is *hard*. more on that later.
000
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
this is *robust*: if user A gets kicked out of group A, they'll automatically lose access to the document. it's impossible to write a bug where we forget to remove the user from the document's ACL.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
with all of that set up, we can check if user A is a reader of document A by seeing if there's a path in this graph!
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
the second type of edges are *derived edges* that are implicitly filled in across different objects. every admin of a group is also a member, and every owner of a document is a writer of that document, etc.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
the first type of edges are *base edges* that are added explicitly into the system. user A is an admin of group A and a writer of document B, so we put heavy arrows between those nodes.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
then, each (object, relationship) pair gets a node too. let's say we have one group and two documents. groups have admins and members, and documents have owners, writers, commenters, and readers. I've drawn a dotted line connecting these nodes to their shared document for clarity.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
we start by filling in a red node for our user. each user gets one of these nodes in the graph.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
the notation in the paper is a little confusing, so I made this diagram in my notes to keep things straight. in our example, we'll have a single user (user A) that's a member of a group (group A). group A owns document A. there's another document (document B), and user A is a writer for document B.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
google's zanzibar paper (2019) provides a single, flexible model that's based on *graph traversal*. we can model if a user has access to an object by checking if there's a path in a access control graph.
100
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
authorization comes up a lot, and it's easy to get lost in the soup of different ways to express who can access what (ACLs, RBAC, ABAC, ...)
120
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
somehow this seems to be true for every system i've ever been oncall for! we go oncall so y'all don't have to.
010
Sujay Jayakar @sujayakar.bsky.social · 25/11/2024
"convex is a machine for turning my sleep schedule into your app's reliability" - Alfréd Rényi :)
120
Sujay Jayakar @sujayakar.bsky.social · 22/11/2024
this is a little unrelated, but I always loved how SQLite on a filesystem can be faster than just using the filesystem. www.sqlite.org/fasterthanfs...
sqlite.org
35% Faster Than The Filesystem
030
Sujay Jayakar @sujayakar.bsky.social · 22/11/2024
super interesting, and that makes a ton of sense. is this implemented at the VFS layer under the hood? i.e. it loads all data pages into memory at startup and then syncs the WAL from the filesystem thread to the app thread?
100
Sujay Jayakar @sujayakar.bsky.social · 21/11/2024
we've been working on @convex.dev for almost four years now, and it's an incredible feeling to see the first *book* on using convex out there 🤯
010
Reposted by Sujay Jayakar
Johannes Schickling @schickling.dev · 21/11/2024
LiveStore is the data layer I wish I had when working on mobile apps: Reactive, fast and fun to use! After many months of close collaboration with the folks at @expo.dev, I'm very excited to take a big step towards launching @livestore.dev.
35615
Sujay Jayakar @sujayakar.bsky.social · 18/11/2024
@convex.dev is an "unstructured" system, since it currently doesn't understand what's happening when you access data in JavaScript. we're working on extensions to let developers opt-in to the "structured + low temporal locality + internally consistent" branch.
020
Sujay Jayakar @sujayakar.bsky.social · 18/11/2024
post: www.scattered-thoughts.net/writing/an-o...
scattered-thoughts.net
An opinionated map of incremental and streaming systems
100
Sujay Jayakar @sujayakar.bsky.social · 18/11/2024
reactive UIs, build systems, and materialized views in databases are all flavors of incremental computation. jamie brandon has an excellent analysis of incremental systems across three dimensions: structure, temporal locaity, and consistency.
110
Sujay Jayakar @sujayakar.bsky.social · 18/11/2024
how easy it it to clean the steam wand? i'm too scared to even directly steam chocolate milk for a mocha...
110
Sujay Jayakar @sujayakar.bsky.social · 16/11/2024
demo: labs.convex.dev/automerge repo: github.com/ianmacartney...
github.com
GitHub - ianmacartney/automerge-convex-quickstart
Contribute to ianmacartney/automerge-convex-quickstart development by creating an account on GitHub.
000
Sujay Jayakar @sujayakar.bsky.social · 16/11/2024
amazing work from @convex.dev engineer ian maccartney wiring up automerge to convex!
141
Sujay Jayakar @sujayakar.bsky.social · 14/11/2024
in general, I think inverted indexes should be more prominently featured in databases (like postgres's GIN). they can be the basis for many features (lexical text search, trigram regex text search, geospatial, JSON search, graph reachability, ...) and compose well.
030
Sujay Jayakar @sujayakar.bsky.social · 14/11/2024
this approach feels similar to range trees (L3 from courses.csail.mit.edu/6.851/spring...) and wavelet matrices (users.dcc.uchile.cl/~gnavarro/ps...), so I'm curious how they all compare in practice.
120
Sujay Jayakar @sujayakar.bsky.social · 14/11/2024
range queries (e.g. `age > 20 AND age < 35`) have a cool indexing strategy in apache pinot. each row gets assigned to `log(n)` bitsets based on the binary representation of `age`. range queries then turn into unions and intersections of these sets. richardstartin.github.io/posts/range-...
richardstartin.github.io
RangeBitmap - How range indexes work in Apache Pinot
Suppose you have an unsorted array of numeric values and need to find the set of indexes of all the values which are within a range. The range predicate will be evaluated many times, so any time spent...
152
Sujay Jayakar @sujayakar.bsky.social · 13/11/2024
with this release, convex will be a great batteries-included option for building local-first apps.
020
Sujay Jayakar @sujayakar.bsky.social · 13/11/2024
we believe there's a sweet spot for building local-first web apps, and it's telling that linear, figma, and asana have all built sync engines for managing their application state.
110
Sujay Jayakar @sujayakar.bsky.social · 13/11/2024
we're building a local-first sync engine at convex, and it's finally time to start sharing some details! stack.convex.dev/object-sync-...
stack.convex.dev
An Object Sync Engine for Local-first Apps
Object sync engines manage a rich object graph across multiple clients and a centralized server and are a great fit for building local-first apps.
291
Sujay Jayakar @sujayakar.bsky.social · 12/11/2024
while we're at it: vimeo.com/groups/music...
vimeo.com
WoodSwimmer (Bedtimes Music Video)
A music video made entirely from wood for a song by http://bedtimes.co/music/, WoodSwimmer is based on a concept I developed while designing a new stop-motion universe…
010
Sujay Jayakar @sujayakar.bsky.social · 12/11/2024
these digital marbling fluid simulations are the coolest thing i've seen in a while: blog.amandaghassaei.com/2022/10/25/d...
blog.amandaghassaei.com
Digital Marbling
I’ve been working on a physics-based marbling simulation to explore the ways that the traditional craft of paper marbling can be augmented digitally. Paper marbling is a centuries-old craft that uses ...
000
Sujay Jayakar @sujayakar.bsky.social · 11/11/2024
reminds me of PDO grading for balsamic vinegar
010
Sujay Jayakar @sujayakar.bsky.social · 08/11/2024
if you've ever used google photos and wondered how it syncs millions of photos with buttery smooth scrolling, wonder no longer!
020
Sujay Jayakar @sujayakar.bsky.social · 08/11/2024
the no trailing commas and no comments is so hostile
100
Sujay Jayakar @sujayakar.bsky.social · 08/11/2024
qualia is everyone's responsibility
120