You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facebook defined a computed prop that downloads the image and meta data.
Someone clicks on the like button of the image:
Database saves event "User Y likes image".
Facebook defined a computed prop "total amount of likes" (the computed prop is just a JavaScript function that runs Math.sum() over the array of "User like" events) => the databse automatically re-runs the computed prop function => the computed prop is automatically updated.
Row-level permissions:
// Readexportasyncfunctionread({ row, context }){if(context.user.role==='admin'){returntrue}if(row.rolesAllowed.includes('public')){returntrue}// Forbiddenreturnfalse}// Mutationsexportasyncfunctionwrite({ row, rowBefore, context }){if(row.authorId===context.user.id){returntrue}// `rowBefore` is `null` if mutation is `INSERT`if(rowBefore===null){returntrue}returnfalse}
The database has a built-in ORM with deep UI framework (React, Vue, ...) integrations.
import{useDb}from'@new-kind-of-database/react'functionImage({ id }){// `useDb.findOne()` is a React Hook (=> works with Suspense parent loader component)const{ src, totalLikes }=useDb.findOne(id,select: {src: true,// We mark `totalLikes` as reactive => when `totalLikes` changes, the ORM// automaticallly updates the component (using React's hook system)totalLikes: 'reactive'})return<><imgsrc="{src}"/><p>
Number of likes: {totalLikes}</p></>}
Everything is done automaticallly, e.g. the database automaticallly creates a socket connection to the server in order to listen to the corresponding database updates.
This leads to many drastic DX improvement, especially for user-centric highly-reactive apps such as Twitter or Facebook.
Solid business model: offer a SaaS with all bell and whistles (automatic scale, automatic backup, etc.). That said it's of paramount importance to fully support self-hosted, and open sourcing the entire source code (include of the SaaS). We are not afraid of AWS doing a SaaS clone; users will prefer the original over the AWS copy-cat.
If you feel drawn to work on this, let me know. Also, I'm ok with you being the CEO and me only being the "master mind" behind the whole thing.
The text was updated successfully, but these errors were encountered:
Someone shares an image on Facebook:
event
"User X shared image https://example.org/image.jpg".computed
prop that downloads the image and meta data.Someone clicks on the like button of the image:
event
"User Y likes image".computed
prop "total amount of likes" (the computed prop is just a JavaScript function that runsMath.sum()
over the array of "User like" events) => the databse automatically re-runs the computed prop function => the computed prop is automatically updated.This leads to many drastic DX improvement, especially for user-centric highly-reactive apps such as Twitter or Facebook.
Solid business model: offer a SaaS with all bell and whistles (automatic scale, automatic backup, etc.). That said it's of paramount importance to fully support self-hosted, and open sourcing the entire source code (include of the SaaS). We are not afraid of AWS doing a SaaS clone; users will prefer the original over the AWS copy-cat.
If you feel drawn to work on this, let me know. Also, I'm ok with you being the CEO and me only being the "master mind" behind the whole thing.
The text was updated successfully, but these errors were encountered: