Earlier quoted context omitted.
That define is very clever: it always lands on it's feet! :)
Except there's already a 'true'. When I see this I know that whoever wrote is completely incompetent (as in "does not know programming", not "is stupid"). It's clever, yes. The bad kind of clever that's also misguided.
Baidu File System – A distributed file system for real-time applications
71–80 of 169 posts
Re: Baidu File System – A distributed file system for real-time applications
#72https://github.com/baidu/bfs/blob/master/src/client/bfs_clie... std::string pad; if (path[path.size() - 1] != '/') { pad = "/"; } Else?
Re: Baidu File System – A distributed file system for real-time applications
#73Earlier quoted context omitted.
It's not about initialization, it's more about specifying clearly what happens in all cases. Anyway the reason for which it would no pass review is that today you use one compiler, tomorrow you have to use another and then you have to review all these little details again. It's about saving money more than anything and you do that by not relying on compiler behavior.
Sure, I would have preferred a non-branching: std::string pad = descriptive_name_here(path); with the added bonus of being able to add "const" to that, for the benefit of the reader. This is not relying on compiler implementation! Can you name one language that has strings that initialise to anything but a valid object containing an empty string? This is not an obscure side-effect. This is like assuming "std::vector…
Re: Baidu File System – A distributed file system for real-time applications
#74Re: Baidu File System – A distributed file system for real-time applications
#75Can't speak much for the project, but have to admire them for sticking with Mandarin. India is atleast a 100-200 years away from something of this kind happening; or more likely never at all. Indeed, there is not a single research university worth its name that isn't also essentially an export hub of brains to the 5-eyes (& Singapore). English is crucial for India's system of feudal slavery to work.
Why would India use Mandarin? English is the most common script in India, why would we use anything else. Unless you are Hindian trying to impose your minority language on the rest of us.
- English is hardly the "most common script". Just because the retainers in Delhi impose the colonial apparatus on us, doesn't automagically give it "statistical power" as well.
- Every state has a (poor, uneducated, illiterate) captive linguistic population more than that of Korea; no reason they ought to use Hindi, nor even Nagari (script != language, in case your education didn't tell you that).
- Among the rich, yes, English is most common, and this is really what matters in the end, aint it ?
This is precisely why India will never be able to work in its own language, and also precisely why it is doomed to eternal poverty and continued illiteracy. Probably will remain a hub exporting little other than people, for the next couple centuries.
(See: https://youtu.be/SJx0KFtm9Rw?t=21m56s)
And this is why I admire China. It's not democratic, it has a paranoid regime, but at least they aren't run by hypocrites who'd use a "socialist democracy" as cover for continued colonization.
> trying to impose your minority language on the rest of us.
Your skills in generating irony amuse me.
Re: Baidu File System – A distributed file system for real-time applications
#76Based on the design[1], it has a leader / follower pattern (although you should have multiple leaders with Raft consensus to avoid having a single point of failure), where the leader is called "nameserver" and decides where to put each piece of data and metadata among a set of chunk servers and metadata servers. That design is very reminiscent of CephFS's cluster monitors, metadata servers, object storage devices. [1…
Re: Baidu File System – A distributed file system for real-time applications
#77Re: Baidu File System – A distributed file system for real-time applications
#78Looking through the code it supports fuse, but the documentation in ENG is sparse. It also looks to underpin Tera: the Baidu distributed DB. I think a low read/write latency dfs suitable for real time applications would be a game changer. I'm hoping they up the documentation from here and engage the English speaking community.
Thanks for your advice. We are working on translating all the documents :)
Re: Baidu File System – A distributed file system for real-time applications
#79Based on the design[1], it has a leader / follower pattern (although you should have multiple leaders with Raft consensus to avoid having a single point of failure), where the leader is called "nameserver" and decides where to put each piece of data and metadata among a set of chunk servers and metadata servers. That design is very reminiscent of CephFS's cluster monitors, metadata servers, object storage devices. [1…
what is the leader/follower pattern? Something like master/slave approach?
Sadly, in the past years, due to some political movements, the term "master/slave" has been declared problematic, and GitHub actively warns that projects using such language can and will be excluded from the service.
There have been previous discussions about this on HN.
Re: Baidu File System – A distributed file system for real-time applications
#80Earlier quoted context omitted.
Because is written by chinese developers for a chinese company?
They put that code in github, releasing it to non-chinese developers. Won't it be good if code has at least some documentation in English ? It's not that they don't want, they have some part in English.