thingortwo
Joined 1 year ago
Joined 1 year ago
The actual things that I now swear by and actually help is consistent sleep of whatever hours that doesn't make you feel sleepy in the day/night (depending on shift) since actual consistency matters more then timing and also in case of workouts really balancing the fatigue to intensity ratio. I understood this late and thought one should always push hard but there needs to be a balance. It's kind of like how cheetah can run really fast but only for 20-30 seconds and then it needs a 30 minute reset period or something. So if you go to failure or always at very high intensity it affects later sets and increases recovery period and in a way driving down overall weekly sets/volume which is main hypertrophy factor.
My own app uses something like this and I have yet to encounter any issue whereas I did initially look into using electricsql , zero sync , instantdb , triplit but the amount of lock-in or DSL was not my cup of tea and most of these are now doing "AI Agents" marketing instead of their core original problem which further erodes any trust.
I would use these DSL if they provide 10x improvement but it seems to me like a downgrade in every way I will need to rely on you to keep this thing running 10 years down the road and hope you are still in business. Whereas raw SQL will probably work as is since past performance is usually indicator of future and sqlite/postgres are 25 years old and if I recall correctly you already had this similar project that is now no longer maintained: https://replicache.dev/ so this by default makes me trust this project less since it will touch critical parts of my app.
Also, imo the custom sync engine path is usually better because most of this turns into logical replication unless you are syncing simple notes and then teams already know what they need and a last-write-wins + row_id,table => changes_log tables isn't that hard the issue is usually that the client and server will need to duplicate functionality and I will be a lot more comfortable duplicating those using raw sql queries since you write those ones and use on both sides. Any half-sync or other optimizations usually just end up causing a lot of headaches in a relational db with foreign keys on.
So, I would use something like this only if it is a sidecar process like litestream seamlessly doing it's thing vs becoming a main concern in my app core. But that again is the issue logical replication vs physical replication and how can a sidecar know the intent.
```
const markAllAsRead = defineMutator( z.object({ userId: z.string() }), async ({tx, args: {userId}}) => { // shared stuff ...
if (tx.location === 'server') {
// `tx` is now narrowed to `ServerTransaction`.
// Do special server-only stuff with raw SQL.
await tx.dbTransaction.query(
`
UPDATE notification
SET read = true
WHERE user_id = $1
`,
[userId]
)
}
}
)```
And if you want always direct edit access and do it often why not then a simple plain text since either way you will be dependent on the software if you like the additional features it offers which aren't inside .md like linking and other
Their "PWA" marketing holds them back in addition to financial incentives of Apple and Google. Most people aren't familiar with term "PWA" also why is "installing" a feature who wants to manage these things through their OS which a lot of normies already find confusing. People want plug and play the whole benefit of pwa (seperate window etc) could basically be exposed as per origin setting inside the browser itself and if user want they can pin it to their desktop. Since in my own testing there isn't much difference it terms of API's exposed only lack thereof like no proper user controlled storage retention settings for apis like OPFS and also lack of syncing directly to a user specified folder across all browsers. If they improve these files workflows you will see a lot more robust web apps.
Also you don't even need a server atleast for now in chrome webrtc transfer can work over a file:// in firefox it doesn't. For signaling you could even use free peerjs tunnel or other when user is connected to internet and otherwise fallback to this QR or offer code sharing. This will become so useful if browsers eliminate those bottlenecks.
also even in localsend speeds are limited usually to my internet speed for some reason.
https://ladybird.org/#:~:text=What%20does%20%22No%20code%20f...
The market for these new breed of frameworks is not huge companies with crazy scaling needs but freelancers and your very early stage startups who haven't even found a product market fit since they are starting new they don't have anything to loose with newer stuff and chances are that newer stuff also helps them do more quickly like I haven't used convex but on it's marketing page it does mention a lot and same for other frameworks like pocketbase or SvelteKit combined with a db etc. Like always there is no silver bullet and every stack can seem "random"