Live data from Hacker News

Dqlite – High-Availability SQLite

dqlite.io

111–120 of 120 posts

Re: Dqlite – High-Availability SQLite

#111
post #84
post #78

Earlier quoted context omitted.

Aren't non-leader RAFT nodes already read-only?

I guess I meant observer nodes, with read-only DB access.

I just mean that RAFT nodes are already read-only for most of their lives — it’s not clear to me why you’d want nodes to be dedicated as read-only; it would only reduce consistency guarantees (and I believe you wouldn’t be avoiding the heartbeat and data consistency network chatter).. I think the leadership functionality comes cheap

Re: Dqlite – High-Availability SQLite

#112
post #59

Interesting nugget about golang from their FAQ: https://github.com/canonical/dqlite/blob/master/doc/faq.md Why C? The first prototype implementation of dqlite was in Go, leveraging the hashicorp/raft implementation of the Raft algorithm. The project was later rewritten entirely in C because of performance problems due to the way Go interoperates with C: Go considers a function call into C that lasts more than ~20 mic…

> since all major languages have provisions to create C bindings. Does WebAssembly or any of its runtimes provide a way to do this?

Genuine question here: if you’re already going to be shipping native code, why would you need WebAssembly in the mix, especially if you’re not targeting a browser?

Re: Dqlite – High-Availability SQLite

#113
post #111
post #84

Earlier quoted context omitted.

I guess I meant observer nodes, with read-only DB access.

I just mean that RAFT nodes are already read-only for most of their lives — it’s not clear to me why you’d want nodes to be dedicated as read-only; it would only reduce consistency guarantees (and I believe you wouldn’t be avoiding the heartbeat and data consistency network chatter).. I think the leadership functionality comes cheap

That makes sense. I need to read up on Raft again.

I know Zookeeper, for example, supports observer nodes: essentially a cheaper read-only cache. Chubby at Google had the same thing.

Re: Dqlite – High-Availability SQLite

#114

Earlier quoted context omitted.

> since all major languages have provisions to create C bindings. Does WebAssembly or any of its runtimes provide a way to do this?

Yes, emscripten/llvm builds C code into webassembly. I'd say a significant portion of webassembly is C/C++ sourced.

You can't use emscripten/llvm with, #include to provide a GUI per se, can you?

Re: Dqlite – High-Availability SQLite

#115
post #75

I really like the design of this website. It's simple, information-rich, fast, and doesn't contain a ridiculous number of images or dynamic components. It's a shame that I can only say this for a select few websites these days.

Yet it's still loaded with hundreds of KB of custom fonts, because the designers would rather I look at a blank page for a couple seconds than gaze upon their design with a typeface that isn't exactly the same one they have on their computer. My resolution, window size, color settings, text zoom, font rendering, etc, are almost certainly different, too, but at least they've made the page more than twice as slow by fo…

It's not so much the size as the way the font was defined and the trash latency/TTFB of whatever they are hosting it on.

Re: Dqlite – High-Availability SQLite

#116
post #104

Earlier quoted context omitted.

you can probably compile c to webassembly using clang/llvm

That's not what the parent was asking. They were asking if WASM has an FFI interface for runtimes that want to not execute the WASM code entirely sandboxed from the host, but rather want to allow you to dlload(2) code into the OS process hosting the WASM interpreter and call it through WASM ops. Presumably, https://github.com/CraneStation/wasmtime would benefit from such an FFI API being specified.

[deleted]

Re: Dqlite – High-Availability SQLite

#117
post #104

Earlier quoted context omitted.

you can probably compile c to webassembly using clang/llvm

That's not what the parent was asking. They were asking if WASM has an FFI interface for runtimes that want to not execute the WASM code entirely sandboxed from the host, but rather want to allow you to dlload(2) code into the OS process hosting the WASM interpreter and call it through WASM ops. Presumably, https://github.com/CraneStation/wasmtime would benefit from such an FFI API being specified.

That should be doable! (Disclaimer: I work at Wasmer https://github.com/wasmerio/wasmer )

Re: Dqlite – High-Availability SQLite

#118
post #104

Earlier quoted context omitted.

you can probably compile c to webassembly using clang/llvm

That's not what the parent was asking. They were asking if WASM has an FFI interface for runtimes that want to not execute the WASM code entirely sandboxed from the host, but rather want to allow you to dlload(2) code into the OS process hosting the WASM interpreter and call it through WASM ops. Presumably, https://github.com/CraneStation/wasmtime would benefit from such an FFI API being specified.

That sounds like ActiveX 2.0 at best, and an utter security nightmare at worst.

Re: Dqlite – High-Availability SQLite

#119

Earlier quoted context omitted.

Yes, emscripten/llvm builds C code into webassembly. I'd say a significant portion of webassembly is C/C++ sourced.

You can't use emscripten/llvm with, #include to provide a GUI per se, can you?

Nope. There are iirc specific bindings for that in a browser context. I think there's been a lot of work for other runtimes.

Re: Dqlite – High-Availability SQLite

#120

Earlier quoted context omitted.

> since all major languages have provisions to create C bindings. Does WebAssembly or any of its runtimes provide a way to do this?

Genuine question here: if you’re already going to be shipping native code, why would you need WebAssembly in the mix, especially if you’re not targeting a browser?

For example, if you want to execute "native" code in a restricted environment. WebAssembly is quite fast when (jit)compiled. Therefore, it's very tempting to use it to embed extension logic.
Post reply on HN