5 ms·
He's not saying you have an obligation to document your code, he's saying if you're going to add it to a discussion, you need to give us a one-sentence descript
by jwhitlark 5y ago
He's not saying you have an obligation to document your code, he's saying if you're going to add it to a discussion, you need to give us a one-sentence description of what it is so we can see how it is relevant and decide if we want to spend an hour getting to know the code. Basically, tell us what the value proposition of your comment is, otherwise it's just a link in a vacuum.
- bullen 5y agoMost people have problems with persistence, it's a though subject until you realize most of the problem is fear caused by responsibility. Most databases (SQL) where designed before the internet, that is a major flaw in them and this instead uses HTTP from the start and JSON in regular files. So it's simpler. But it also has authentication, relational values, indexing and it's async. joint parallel distributed. So it's versatile and powerful without becoming complex and heavy! It allows you to have coherent data at many locations around the world without a big complex monster like described in the article. The only downside is disk space!
- ithkuil 5y agoCan you give a one like description of the technique you use to achieve coherence?
- bullen 5y agoIt's very simple, on every insert/update/delete the node that receives the command calls all the other nodes async. and waits until they have made the call before it makes it and then responds. The id's are secure random longs, so collisions are rare. You can see the code in Root.send(...) or see the live trace by going here and pressing the Make button: http://root.rupy.se/node?make&info http://root.rupy.se/node?make&info
- ithkuil 5y agoSo if one node fails (or the network fails), some nodes will have the new value, while other nodes won't have it. I'm confused about why you call this "coherence".
- bullen 5y agoThe system only works for writes when every node is online. It's a tradeoff that is well worth the simplicity. To have fault tolerance for writes never really works and it's very wasteful. Specially when the nodes can be very reliable and report downtime for you to fix the issue manually if a node goes down. In 5 years of operation my home hosted cluster has better uptime than all cloud providers: AWS, GCP etc. for writes and 100% uptime for reads. I have blogged about how to make a 100% write uptime database here: http://talk.binarytask.com/task?id=4662372011677848884 http://talk.binarytask.com/task?id=4662372011677848884 But my conclusion is that it's a waste of time.
- ithkuil 5y agoThis is a legit solution if your requirements allow it. I'd advise you to not be too bullish on the universality of this principle of yours. Unfortunately real life is often more complicated than the scenario you describe and I wouldn't describe the solutions smart people came up with (various consensus algorithms or convergent replicated data types) as a waste of time.
- taffer 5y agoThese "complex monsters" are there to give you guarantees: Transaction isolation, referential integrity, constraints, durability, atomicity. A RDBMS is complex so your application can be simple. It takes care of things so you don't have to. That's the whole point of it.
- bullen 5y agoYou call it a feature, I call it debt. What you don't understand; always hurts in the end. Also there is no perfect, those guarantees are lies.
- taffer 5y agoIf you don't trust abstractions to handle the inherent complexity of data processing, you won't get anywhere. If you ignore decades of database research, you'll just end up reinventing the wheel badly. What if you have a new requirement that goes against the grain of your data structures? Do you then have to refactor your entire application? How do you know if your algorithms are efficient, if they are using the right indexes? What happens in your platform if you have a software error during a write? Will you end up with incomplete data? What if two users try to change the same data at the same time, who will win, who will see what? What about hardware failures, power outages, or bit rot? Essentially, you need to ask yourself these questions every time you make a change to your application, keeping in mind how all the parts of your program interact and what failure modes these interactions can cause. If you ignore these questions and don't have abstractions to take care of them, you will drown in complexity.
- bullen 5y agoI have gotten very far and I have considered all the things you mention. Still my conclusion is to write everything from scratch and slowly but surely build something good. You need to own your future, that requires responsibility and respect, without that your life is just slavery. http://move.rupy.se/file/wheel.jpg http://move.rupy.se/file/wheel.jpg
- deleted 5y ago[deleted]