Comments (2)
Thank you @j-berman for pointing out the stateful challenge and providing the detailed information. I'll review the area of code pointed to.
from userbase.
Thank you for your interest!
This would be challenging to implement because our design relies on the Userbase server to be stateful.
When a user signs in, their client establishes an authenticated WebSocket connection to the server. Every user-initiated write operation (or "transaction") is sent over this WebSocket. Once the transaction is successfully stored persistently in Dynamo DB, the Userbase server then pushes the transaction out to all connected clients that have that particular database open.
With this design in mind, the Userbase server is stateful for 2 main reasons:
- To keep track of which clients are supposed to receive new transactions in real-time.
- To ensure the server pushes transactions out to clients in the correct order.
This would be a good place to start to see how the server uses state stored in memory to achieve both goals above.
I'm not familiar with the API Gateway, but my initial reaction is that safely replicating the server's statefulness would be the most challenging thing to achieve. I would guess you would need to push that state out to a database, and I'm not sure if the cost/benefit of doing so is worth it (keeping in mind the performance hit from latency + writing to/reading from disk).
from userbase.
Related Issues (20)
- shareDatabase issues
- Feature request: metered trials as opposed to timed trials HOT 3
- forgotPassword with server-side-encryption HOT 1
- Feature Request: 2FA
- How to read a database with admin API? (Question) HOT 4
- How to remove a database? HOT 3
- [userbase-js] passwordHashAlgo is missing in types
- Automatic Tax Collection with Stripe HOT 4
- Close Userbase Node HOT 2
- Prevent registration, or limit app users to 1 HOT 2
- Error "Buffer2 is undefined" when using userbase-js with SvelteKit HOT 3
- Is this project still alive? HOT 1
- sessionLength not being respected, ending early HOT 10
- All users can view all other items created.
- Feature Request: Verify user during signup to avoid dump email ids.
- Service Unavailable for the last couple of days HOT 3
- Missing Data Stored HOT 2
- Third Party Cookie Issues with Stripe
- ServiceUnavailable: Service unavailable. HOT 2
- getItem database API? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from userbase.