News for hackers. Stuff that matters.
Re:Scylla – Real-Time Big Data Database by throwaway81523 on Wednesday August 25, 2021 @04:59AM (#28299370)
Seastar is sort of a C++-ification of node.js. Now that C++20 has coroutines, I wonder if those could have been used instead of all that chained method stuff.
Re:Scylla – Real-Time Big Data Database by enedil on Wednesday August 25, 2021 @05:22AM (#28299480)
Seastar already uses coroutines, however coroutines without Seastar reactor (and all the utilities for IO) are useless by themselves. You still need a way to schedule what's being done when.
Re:Scylla – Real-Time Big Data Database by throwaway81523 on Wednesday August 25, 2021 @10:59PM (#28310112)
Hmm ok I haven't looked at Seastar in a while, but it used to depend on Node-like control inversion where you'd pass an explicit lambda to each action, telling the action what to do next. That meant unwinding the handler for a given event into a bunch of nested lambdas. Coroutine would let you write them in a more traditional sequential style, where you'd have a return to the scheduler whenever something could block. Yes you have to write a layer of async io under everything, but that's how any OS works, more or less.