5 ms·
We didn’t want to build something complicated, so we implemented our own raft consensus layer. Have you considered just using Redis?
by nephy 2y ago
We didn’t want to build something complicated, so we implemented our own raft consensus layer. Have you considered just using Redis?
- tdrhq 2y agoHaha, I totally hear you. But but, we didn't really build the raft consensus layer from scratch. We used an existing robust library for that: https://github.com/baidu/braft https://github.com/baidu/braft
- ramon156 2y agoYou completely skipped the question though
- tdrhq 2y agoAh, sure: I did not consider Redis at all. My goal in the Explore phase was to keep the data in the same process as my code, and replacing MySQL with any other database doesn't really help here. This was a developer-productivity goal, not a performance goal.
- deleted 2y ago[deleted]
- ActorNightly 2y agoTo throw the question back at you: have you considered that this isn't complicated?
- nephy 2y agoNo I haven’t because it’s quite complicated. Databases are very much a solved problem. Unfortunately, this architecture is going to be nigh impossible to hire for and when it goes absolutely sideways recovery will be difficult.
- ahoka 2y agoThat’s the best part, you don’t realize when things go sideways.
- echoangle 2y agoCompared to installing, configuring and maintaining an installation of Redis, this absolutely is complicated. Do you think this is less complicated than using Redis?
- ActorNightly 2y agoSetting up Redis or setting this up with a certain library is deterministic P hard. Both are equally "easy", including bugs and optimization. The difference is that Redis costs extra in infrastructure.
- echoangle 2y agoIn what way is setting up redis or writing a program yourself P hard? What’s the input that leads to polynomial time? And what kind of metric is that? If setting up redis takes me one day or I can write a software myself in a month, does it matter if both are P hard? And if you have an hourly wage over $1, I am very sure that redis is cheaper at the end of the day than programming your own software and using that.
- ActorNightly 2y agoPolynomial time means that both are deterministic. The diffreence between the two only comes down to how much has to type and copy and paste, provided that the person is well aware and experienced to do both. And the total time for either is negligible, while Raft saves you more money long termin infra costs. The argument that im fighting agaist is that when someone says its more complex, what they mean is that they dont have experience in doing that. From a business perspective, this is something to consider when hiring from.an average pool, since you point about salary is correct, but the assumption that every single engineer fits this criteria is not correct.
- 1oooqooq 2y agoredis and mongo are the type of things i will yak shave to no ends so i don't have to deploy them in production
- nephy 2y agoI’m honestly not sure what you are talking about. In my experience, Redis is super easy to run and manage in production.
- gunapologist99 2y agoRedis is best as an in-memory cache, not a database. Having used it in production for roughly a decade, I don't trust it's on-disk capabilities (AOF/RDB etc) as either solid or reliable (or even performant) in an emergency scenario, especially with DR or DB migration in mind.
- rkeene2 2y agoFWIW, how I read the article it was just an implementation of the original Redis, but with some other language (and this types) than Tcl. Redis is/was basically just Tcl-typed which are persisted to disk using snapshots (Tcl commands) and append-only Tcl commands, that had a network protocol for non-Tcl applications to talk to