Live data from Hacker News

How to build a graph visualization engine

memgraph.com

61–70 of 73 posts

Re: How to build a graph visualization engine

#61

Earlier quoted context omitted.

The code giving a "lot of thought to software design" must be pretty good, because this looks like Java Graybeard garbage to me. Yeah, that's a caustic statement. I'm not trying to say that people who made it didn't do a good job, but the display is just.... Not good enough. They need to find a team member to help them get out of 20 years ago with this stuff. If anyone that is working on this reads this. That's my th…

What would you expect from a display to be good enough? Just as a note, Orb is not there to compete with high volume graph visualizations like Cosmograph, Graphistry, Linkurious. It is more as a child from d3 and vis.js, which are great libraries, that uses d3 simulation and vis-like canvas rendering. We really liked what vis.js team did with the styling of the graph and how you can customize it - this is often a lim…

You are right. This is a fine rendering layer for datasets of the right size. The space I exist in and am interested in demands a bit more. I think it's just a difference in scale. I do think the article is wrong though. I think we need more graph vis engines of all scales. I think the marketplace for them is just starting to be cracked and there is plenty of room.

Re: How to build a graph visualization engine

#62
post #7

I was an early employee at the first round of graphistry.com. I'm really proud of Leo and that he took it from the brink and put it back on the market and is growing it. I think more people should build more graph visualization engines, but you're going to have a hard time competing with how slick pygraphistry is, but there is not enough alternatives that are worth a shit. Graphistry, when I left was able to do half…

Graphistry is really cool but the point here is not to compete on the visualization side, we needed a tool that scales for a few of our use-cases (mostly as a highly configurable graph visualizes) + a library that can easily be extended :D

Thanks for kind words all :)

Scale - backend: As we're rapids.ai-native (helped start early days of both Apache Arrow + Nvidia RAPIDS.ai), we work with customers doing billion-level nodes/edges in interactive time on GPU servers. Mostly for fast ingest, ETL, + graph neural nets / manifold learning, and we're slowly pushing that into the visual stack.

Scale - frontend: We normally recommend reducing down to about ~2M edges or less. For sensible visual experiences, add in auto algorithms that cut to more like 500K. We've planned a way we think we can do another 100X, just not (yet) an engineering priority. Fun fact: your browser's JS VM is limited to ~1GB of RAM, so we're already at that limit in practice.

RE:Scaling graph visuals as an engineering practice, it looks like memgraph is starting where neo4j reached a few years ago, and makes sense. That approach doesn't really work well for the use cases memgraph advertises for, because as soon as a bunch of user/customer/IT/etc events happen and get visualized, the browser crashes. Optimization approaches like wasm and workers are clever -- a v0 prototype of graphistry did that! -- but we found is too unreliable to be the path for good performance across users of most operational teams ("Works on my machine" syndrome). Do it, but that shouldn't be the main source of 100X performance, just a 2X boost. We end up connecting GPUs in the browser to GPUs in the datacenter not just for 100X'ing this kind of stuff, but for a predictable performance way that limits how often your user's browser crash on real datasets.

Also maybe not obvious, this article focuses on interactive rendering, but a lot of the challenge after they figure out how to solve it is interactive analytics too. Most layout algorithms have non-linear complexity, so O(500K) is actually a challenge. A lot of our GPU offloading work nowadays isn't just rendering but layout, ETL, ML/AI clustering, etc. This ends up overwhelming the browser (why we do distributed GPU), and OLTP graph DB's aren't good at that either -- Neo4j basically had to write a V2 DB-in-a-DB to make their Graph Data Science module perform.

And no worries: There's no competition because Graphistry isn't a graph database :) Most of our users will do something like databricks dashboard / jupyter notebook / powerbi / etc query graphistry visual. I bet pairing a great streaming db like memgraph with Graphistry would combine respective engineering strengths quite well!

Re: How to build a graph visualization engine

#63
post #2

Recently a new web-based fully gpu driven graph visualisation engine was released and it could handle quite some big graphs directly in the browser: https://twitter.com/hoogerwoord/status/1568188361503907840?s... Happy that people are building new graph visualisation engines and I think still a very open space for innovation in interactively exploring graph/network structures.

Is it open source? Or does it have a website? The tweet wasn't clear

Re: How to build a graph visualization engine

#64
post #41
post #2

Recently a new web-based fully gpu driven graph visualisation engine was released and it could handle quite some big graphs directly in the browser: https://twitter.com/hoogerwoord/status/1568188361503907840?s... Happy that people are building new graph visualisation engines and I think still a very open space for innovation in interactively exploring graph/network structures.

Cosmos really looks amazing when it comes to performace. Besides visual rendering on the GPU, they also do the graph layout simulation calculations on the GPU as well, which is a first. SigmaJS for example uses graphology for the calculations, and WebGL for rendering. Cosmos is a really new lib, so when we did our initial research it wasn't even out yet. You can read more about our research over here: https://memgrap…

I'm currently using vis-network [1] as the graph display for a Fraud analysis UI. Cosmos looked really good when I checked it but as you very well mention it wasn't able to style vertices with different images/icons and not sure if it was able to style edges color and width. All of this is heavily used in my use case. Hopefully it gets these features as it matures

[1] https://github.com/visjs/vis-network

Re: How to build a graph visualization engine

#65
post #64
post #41

Earlier quoted context omitted.

Cosmos really looks amazing when it comes to performace. Besides visual rendering on the GPU, they also do the graph layout simulation calculations on the GPU as well, which is a first. SigmaJS for example uses graphology for the calculations, and WebGL for rendering. Cosmos is a really new lib, so when we did our initial research it wasn't even out yet. You can read more about our research over here: https://memgrap…

I'm currently using vis-network [1] as the graph display for a Fraud analysis UI. Cosmos looked really good when I checked it but as you very well mention it wasn't able to style vertices with different images/icons and not sure if it was able to style edges color and width. All of this is heavily used in my use case. Hopefully it gets these features as it matures [1] https://github.com/visjs/vis-network

vis-network is a great library. We actually started with it because we liked the API, the styling capabilities, easy to use event handlers. But we experienced performance issues when we wanted to simulate and render larger graphs because it was done in the main thread, the whole UI was blocked by it. We tried to fix it in vis, but simulation was using DOM so it was super hard to split simulation and renderer.

Actually that was the main reason (along with the note that main authors are not contributing to visjs any more [1]) for a creation of the Orb where we fixed the blocking UI issue with graph simulation. Orb engine has two parts now:

* Simulator that doesn't depend on the DOM so we can move its heavy calculation to the web worker - we use d3-force for it [2]

* Renderer is pretty much influenced by vis-network, using similar style mechanism and canvas drawing capabilities (we credited vis-network in our code for those sections)

[1] https://github.com/almende/vis/issues/4259#issue-412107497

[2] https://github.com/d3/d3-force

Re: How to build a graph visualization engine

#66
Good discussion. It may help to separate the different threads.

Business models that support network visualization: mostly, not such a great story. Customers want to solve problems, not just look at pictures of networks. Inevitably this drives the work toward domain-specific capabilities in areas like computer security, fraud detection or bioinformatics. It's a slippery slope. If you stay focused on core algorithms, your audience is other tool builders i.e. cost centers.

Scaling up network visualization: fascinating technical problem, but a human can't actually see a million objects at once or form a mental map of their locations. So it's more like a clustering problem. Not a big surprise that Graphistry adopted uMAP. It's treating nodes more like points in big plot. We're not concerned with the same problems as illustration quality rendering of small readable graphs.

Building your own: an appeal of network visualization is that you can get going by just writing some kind of physical simulation, assign reasonable coordinates to nodes, drawing edges as lines, and poof you're done. If your goal is consistently making concrete diagrams that look like a human drew them (with nodes that have shapes and ports, various kinds of labels, constraints on edge routing, nesting, aspect ratio control, etc.) there are so many intricate subproblems that you could spend years on any of them. But what's the financial incentive?

The research frontier: no doubt machine learning will eventually transform this domain the way it has many others. The combinatorial objectives of network diagramming make it challenging for now. (Can an algorithm learn orthogonal planar layouts with port constraints? Maybe. Would like to see that.) Another frontier is to extend general methods for declarative 2D layouts. People don't want just pictures of networks, they want more elaborate diagrams: computer networks, metabolic pathways, business processes, cryptocurrency transactions. Network visualization is only a subproblem in information visualization. This ties in to the first point, people need to solve problems in a specific domain.

Re: How to build a graph visualization engine

#67
post #58

Earlier quoted context omitted.

Well it started after wordpress fucked up my formatting and replaced -- with — (em dash) one too many times. The whole PHP stack isn't exactly pleasant to manage in the best of days, and looming threat of WP having another bug and getting owned of no fault of my own was also a factor. I wanted something simple that was just markdown for actual content, no database or anything more fancy. I have considered static gen…

You are a Don Quixote after my own heart. If you ever need a job, get at me. I think we'd work well together. Heh. Not even joking.

It's just the way I prefer to learn stuff. Learning for learning sake without making anything out of it isn't for me, I learn best when getting knowledge in process of making something.

Re: How to build a graph visualization engine

#68

Earlier quoted context omitted.

haha well, while running a pig farm is also a difficult business, there are some interesting challenges you can tackle :D also you could write software to manage some aspects of your pig farm

Definitely. I have some giant robots and spend a lot of my time with computer vision. I'm gonna put them on tank treads and have them tend to the farm. I just like... fuckin do not want to ever be asked to and feel like I should care about anything related to javascript.... ever again... past 2024, but with just a tiny nudge, I could just live that life tomorrow.

Wow… did JavaScript hurt your children? Have you tried typescript? It’s not so bad.

Re: How to build a graph visualization engine

#69

Good discussion. It may help to separate the different threads. Business models that support network visualization: mostly, not such a great story. Customers want to solve problems, not just look at pictures of networks. Inevitably this drives the work toward domain-specific capabilities in areas like computer security, fraud detection or bioinformatics. It's a slippery slope. If you stay focused on core algorithms,…

"Can an algorithm learn orthogonal planar layouts with port constraints? Maybe. Would like to see that."

I think ELK can do that: https://www.eclipse.org/elk/

Post reply on HN