-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] More details on offline first? #1351
Comments
What does this mean?
If you are trying to use data you have not written to the database, no, it won't be there. How would Watermelon see data you have not put into the database?
Highly unlikely. Very highly unlikely, but the platform will notify the user that they're running low on disk space in general. |
It can cache data in memory and provide to components, before writing to db. And pls lets post here if you fully understand the question and watermelon architecture. |
It's a client side DB and you can always use tables before any data is inserted and it will be updated when data is inserted if you use the observables functions. For more in depth stuff please read through the docs like https://nozbe.github.io/WatermelonDB/ch04-00-deeper.html |
@KrisLau you don't understand the question. |
@gen1lee Then elaborate lol cause me and @SaltedBlowfish both don't understand what exactly you're asking. |
@gen1lee I think he did understand the question, but you're not asking the right question. Your original questions are very difficult to find reasoning for to begin with.
It's a database. Not first, not last, not in any order. It's a database. An offline database. Not connected to the internet.
Yes. Data comes from database but can be observed with RXJS. The database must have the data in order for the components using the data to update. Watermelon will not memory-write and emulate a database write, but you can use observable functions to watch for the database changes.
Not sure but like I said, the phone will let you know if you're running low on disk space. To my knowledge, no one has tested this so please write a test and let us know how it goes. |
@SaltedBlowfish ok lets ask differently:
|
No, why do you need a memcache for writing, which is a huge problem.
Of course after, if before, that is optimistic update, and you do know the problems it introduces aye? And with a local db, why do you want to use the fragile optimistic update to shoot yourself in the foot? And what kind of performance will you gain? Have you benchmarked it? Or just imagining in your head?
Then an error will thrown and the message won't be persisted, how come the db can persist the data if there is no space.....
It sounds like you are describing optimistic updates which is completely irrelevant to watermelon db since its local db nature, go use a client side query library with a cache. |
Actually I've investigated it myself and have a conclusion that I can't imagine any app that will work better using this db instead of some kind of redux-persist approach or custom faster version of it with sqilte. |
I'm sorry you think that WatermelonDB has fatal performance flaws and is unsuited to your application. Looking forward to your PR to fix these issues. |
I went through the research and found there is actually no good alternative for watermelon db which can provide the same performance and features. definitely has pros and cons, but not the one you were mentioned.... Considering the fact that you are constantly thinking about non-existing problems or misunderstood different layers in architecture even for a client-side app...... You might want to learn some basic knowledge then deving.... I think either learning some fundamental engineering stuff or just try building your own version of watermelon db is the best way for you to learn. |
before giving such advices you better learn how to build high performance client apps first, or just study some client app architecture basics at least. And I would never write something like watermelonDB - don't wanna waste my time. |
@gen1lee then stop wasting everyone else's time |
So is it database first?
Does user need to wait until data is written to db before components can render it?
If yes, what will happen if there is not enough space on disk?
The text was updated successfully, but these errors were encountered: