Closed alalonde closed 1 year ago
Will we be able to move the profile data out of Hasura and solely host it in ComposeDB?
That would probably help with the issue where people reload before the cache has time to repopulate.
It seems like all we would need to do is put the XP info into Ceramic.
I'd love to see it done in such a way that different organizations could store their own cred tokens, and get a leaderboard for that token.
With all the issues we've seen with 3Box labs alpha software, I have very little confidence (in the short term anyway) of this new network being sufficiently robust to be our only source of truth for that data.
The most robust solution IMO would be to write to both ComposeDB AND our own Hasura from the frontend, and read from only Hasura still acting as a cache.
This would avoid the issue we saw for many weeks (months?) where, when the Ceramic node wasn't responding properly, the profile data would appear to save, but on reload, didn't at all. Very frustrating.
If we're writing to Hasura we run the risk of hiding the fact that Ceramic failed to update more thoroughly because it'll look right on reload.
Only if we're still regularly checking the cache would problems be evident.
Also, there's the local app state to keep in mind unless you'd like to update Hasura & do a page load on submission.
I'm hopeful, honestly, that it'll be solid enough to support the absolutely paltry amount of traffic we're getting (< 200 hits per day).
I'd rather put in a cache when it's needed rather than building it in from the start.
Horare's Dictum: "Premature optimization is the root of all evil."
Horare's Dictum: "Premature optimization is the root of all evil."
This is not about optimization, but resiliency. If ceramic goes down, profile updating and reading would still work fine.
You bring up good points though; I am going to proceed with just using ComposeDB as our data source (at least initially) with the hopes of ripping out all the caching code.
useSaveProfileToComposeDB
hook, and haveEditProfileModal
use itupdateSingle
cache to pull from ComposeDB instead