Live data from Hacker News

Perspective: Streaming pivot visualization via WebAssembly

github.com

71–80 of 141 posts

Re: Perspective: Streaming pivot visualization via WebAssembly

#71
post #2

I wrote the C++ part of this codebase, would be happy to answer any questions about it here.

Did you experiment with doing it JS-only prior to the C++ version? If so, what kind of performance increase did you see with WebAssembly?

This++

WebAssembly can be certainly faster than JS in certain situations, but well-structured, monomorphic JS with the kind of type-hints for numeric values that asm.js is based off of can be extremely fast as well.

It'd be great to check the assumption that WASM is actually faster in this case, and by how much, especially given the friction of sending anything other than numbers across the JS/WASM boundary.

Re: Perspective: Streaming pivot visualization via WebAssembly

#72
post #52

Earlier quoted context omitted.

Not the op, but there's more to frontend development than JS. You need to account for the API of browsers, the DOM, CSS and the myraid of frameworks and libraries built for the specific UI requirements of frontend development (e.g. React). So even if your favorite language of choice becomes compilable to WebAssembly, you'll still be learning an entirely different way of development that will be completely unfamiliar…

A paradigm shift could happen and what's cool is that it could be entirely something new. This reminds me of the early days of the WWW when the first programming paradigm was Perl/CGI, then Cold Fusion, then Legacy ASP, and then ActiveX, and so on. The possibility of some company creating, from scratch, a new web development paradigm, given everything we know today, is exciting.

Sure, and based on historical precedent, that's almost guaranteed to happen. But I doubt it will be whatever-my-favorite-backend-language-of-choice-is and more likely some-domain-specific-language-and-new-framework. In other words, we'll all be relearning everything again 5 years from now.

Re: Perspective: Streaming pivot visualization via WebAssembly

#74
post #37

If anyone finds this project exciting and is interested in learning more about working on Open Source at J.P.Morgan, feel free to send me a message - we are always looking to hire experienced, passionate talent!

Hey man, two thumbs up on this. Wall street as a contributor to open source. Who do I thank? Trump?

Re: Perspective: Streaming pivot visualization via WebAssembly

#75
post #11
post #8

Earlier quoted context omitted.

I see it's possible to embed it in jupyterlab, it seems to do a lot: * grid format * graph format * actual pivoting of data Is that right? It's using webassembly so in effect to do the pivot you must have created functions that exist in pandas? Has anyone ported pandas to webassembly? Is the grid editable? What are you using to create your output, html or canvas or something? I realise I could look this stuff up but…

I believe you'd need to port Python to WebAssembly to make much use of pandas - unaware of any projects attempting the former. The grid is just a plugin for the excellent [Hypergrid]( https://github.com/openfin/fin-hypergrid ), which is editable, but you'd need to manually push those edits back to the engine for now.

Nuitka can compile Python to LLVM IR, which can be compiled into WASM, I think.

Re: Perspective: Streaming pivot visualization via WebAssembly

#76
post #57

First, let me say this looks awesome! I’m curious if your considered React.js for the presentation layer (i.e. the js/html5 parts) - on the surface it seems like it would be a good fit - and if so, what you saw as the benefits or drawbacks of it vs the approach you went with.

We chose to go with a Web Components based interface for compatibility across frameworks, but alot of where we go in the future will be determined by the expertise of the developers we hire to work on it, and the community if there is interest there.

Re: Perspective: Streaming pivot visualization via WebAssembly

#78
post #37

If anyone finds this project exciting and is interested in learning more about working on Open Source at J.P.Morgan, feel free to send me a message - we are always looking to hire experienced, passionate talent!

Hey man, two thumbs up on this. Wall street as a contributor to open source. Who do I thank? Trump?

[deleted]

Re: Perspective: Streaming pivot visualization via WebAssembly

#80
post #70

Presumably, the point of using WASM and service workers is for performance, but I see no benchmarks. I also have trouble imagining that this actually improves performance, unless you’re doing all of your compute in the browser and it’s CPU bound (this seems like bad design). What is the performance of doing it this way vs. without WASM and workers? Until we see numbers, this smells like a recruiting play.

We use Web Workers principally to separate data CPU load from rendering load, as the datasets we deal with update very frequently and are quite large, and e.g. Highcharts can take on teh order of 100ms+ on detailed charts.

We have some light benchmarks we use for regression testing, but definitely need more work in this area

[benchmarks](https://jpmorganchase.github.io/perspective/examples/benchma...)

Post reply on HN