![]() ![]() There's no need to mock a server and risk deviation from reality: the client is authoritative, therefore its tests are authoritative. On the bright side, because your business logic is all in the client, unit and integration tests become super powerful. It doesn't need to be a bad actor: you could simply add a bug to your code without realizing it, push it to prod, and now you've got viral data corruption. If you don't have defensive data validation and stellar error handling, one peer can poison the others with bad data. Sure you can migrate things on the server (if you're not building a P2P app), but you have to remember the server is now just a more authoritative peer you can't guarantee your user will ever even talk to the server again. IMO, biggest challenge areas are data migrations, version management, data validation, and authorization. ![]() You could also consider the server another peer.) These challenges are exacerbated with multi-user use cases (though even a single-user experience is still multiplayer: one person using multiple tabs or devices is essentially multiple users in the eyes of most CRDT-based app architectures. You're now dealing with multi-master replication. Everything you build now works offline by default, and collaboratively if you so choose.Ĭollaboration is where things get a little spicy. ![]() The changes to those structures are simply merged with the server/peers and you don't worry about manually syncing stuff anymore. Rather than making API endpoints for every new feature, you're implementing everything in the language of shared types like arrays and maps. To start with the good, building features in your app becomes super easy because your network layer is completely agnostic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |