Live data from Hacker News

My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

motifanalytics.medium.com

21–30 of 37 posts

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#21
post #2

I’ve been toying with the idea of implementing a distributed analytics engine on top of Cloudflare workers and DuckDB. I’m not sure if this goes against the CloudFlare TOS tough (last time I checked they had some provisons against processing images).

They've already got one: https://developers.cloudflare.com/analytics/analytics-engine...

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#22

We use the WASM build of DuckDB quite extensively at Count ( https://count.co - 2-3m queries per month). There are a couple of bugs we've noticed, but given that it's pretty much maintained by a single person seems impressively reliable!

Looking at your insane pricing page I have to assume that you are sponsoring that single person?

I'm confused, nothing about their pricing looks that weird. Businesses don't typically have large BI teams so you can ride that $199/mo $2400/year for a long time which is so small most SMBs can probably expense it without approval.

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#23
post #22

Earlier quoted context omitted.

Looking at your insane pricing page I have to assume that you are sponsoring that single person?

I'm confused, nothing about their pricing looks that weird. Businesses don't typically have large BI teams so you can ride that $199/mo $2400/year for a long time which is so small most SMBs can probably expense it without approval.

You're focussing on the wrong part

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#25
post #2

I’ve been toying with the idea of implementing a distributed analytics engine on top of Cloudflare workers and DuckDB. I’m not sure if this goes against the CloudFlare TOS tough (last time I checked they had some provisons against processing images).

IMO that’s not really possible because of the size limits of Cloudflare Workers. Neither the WASM nor the Node version are small enough.

I‘m running it on AWS Lambda functions with some success.

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#26

Earlier quoted context omitted.

Pro tip for everybody: do not post any text as images Never should I receive a Java exception hundreds of lines long as a cut off JPEG file. Or a screenshot of a Google Sheet missing the information you’re talking to me about.

We made this to be used as a reply when pictures are misused where text would be better: https://fewer.pics/

It should have been animated.

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#27
> [wasm] is executed in a stack-based virtual machine rather than as a native library code.

Wasm's binary format is indeed a stack-based virtual machine, but that is not how it is executed. Optimizing VMs convert it to SSA form, basic blocks, and finally machine code, much the same as clang or gcc compile native library code.

It is true that wasm has some overhead, but that is due to portability and sandboxing, not the stack-based binary format.

> On top of the above, memory available to WASM is limited by the browser (in case of Chrome, the limit is currently set at 4GB per tab).

wasm64 solves this, by allowing 64-bit pointers and a lot more than 4GB of memory.

The feature is already supported in Chrome and Firefox, but not everywhere else yet.

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#28
post #6
post #5

Tip for all the blog authors, do NOT post code as image. Specially do not add fake editor UI and drop shadow to the image. In this case 25 lines of code is 50 kB of image binary. Also it cannot be searched via search engine. Nor can it be read with screen reader.

This guide can help if you still want the code to be pretty: https://www.taniarascia.com/adding-syntax-highlighting-to-co...

Or use vim to convert it to HTML https://vi.stackexchange.com/questions/792/how-to-convert-a-...

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#29
post #5

Tip for all the blog authors, do NOT post code as image. Specially do not add fake editor UI and drop shadow to the image. In this case 25 lines of code is 50 kB of image binary. Also it cannot be searched via search engine. Nor can it be read with screen reader.

It’s also terrible copy-pasting and CMD+F experience.

Re: My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers

#30
post #27

> [wasm] is executed in a stack-based virtual machine rather than as a native library code. Wasm's binary format is indeed a stack-based virtual machine, but that is not how it is executed. Optimizing VMs convert it to SSA form, basic blocks, and finally machine code, much the same as clang or gcc compile native library code. It is true that wasm has some overhead, but that is due to portability and sandboxing, not t…

The more I read about WASM the more it sounds like the JVM

I'm still not clear what at its core it's done differently (in a way that couldn't be bolted on to a subset of the JVM)

Post reply on HN