Hacker Newsnew | past | comments | ask | show | jobs | submit | tontinton's commentslogin

Very cool, have you taken a look into what TigerBeetle does with VSR (and why they chose it instead of raft)?


Yes I’ve read through TigerBeetle’s VSR design and their rationale for not using Raft.

VSR makes a lot of sense for their problem space: fixed schema, deterministic state machine, and a very tight control over replication + execution order.

Ayder has a different set of constraints: - append-only logs with streaming semantics - dynamic topics / partitions - external clients producing arbitrary payloads over HTTP

Raft here is a pragmatic choice: it’s well understood, easier to reason about for operators, and fits the “easy to try, easy to operate” goal of the system.

That said, I think VSR is a great example of what’s possible when you fully own the problem and can specialize aggressively. Definitely a project I’ve learned from.


Can I select multiple receivers concurrently, similar to a select in Linux?


Learn about the data structures & algorithms that make up modern log search engines like Elasticsearch.


You're right, I'll fix it in the post.

Thanks!


Yeah I might have been wrong, simply went with https://blog.stenmans.org/theBeamBook/#_reductions

Now that I reread that section, it also depends on whether you call a BIF or not, I'll think about how to phrase that better in the blog post.

Thanks!


Even some BIFs and NIFs (BIF are mostly just an built-in NIFs) can yield [1] and choose to reschedule themselves later. But inside the C code it is voluntary, of course. An example of this can be seen when running hash functions [2].

Another interesting idea is that a NIF which may not reschedule themselves with yield, can still signal the scheduler that they are consuming so many "reductions" if they did some lengthy work. So if, say, they run for 10 msec, they might want to bump the reduction counter a bit: enif_consume_timeslice. Otherwise a tight recursive loop calling the same NIF could still effectively block the VM.

[1] https://www.erlang.org/doc/man/erl_nif#enif_schedule_nif

[2] https://github.com/erlang/otp/blob/ab7b354c37dac92704faac455...

[3] https://www.erlang.org/doc/man/erl_nif#enif_consume_timeslic...


Thanks a lot! :)


I thought about it, I just wanted people to get hooked with some eye candy, and to want to continue reading ;)


Thanks! :)


Thanks for the feedback, I fixed most issues with the animations.


Oh that is a great example, I'll update the post tomorrow.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: