Live data from Hacker News

Ask HN: I'm trying to represent an entire building as a graph

news.ycombinator.com

11–20 of 30 posts

Re: Ask HN: I'm trying to represent an entire building as a graph

#15
post #6

I working with big graphs. Over 1 bln entities & 40 bln edges. Best open source graph database is ArrangoDB they have master to master cluster. Fastest and best technology for graphs have commercial TigerDB, but you must pay >300k annually. Networkx is great but loading full model - but for what you doing should be enough. :)

ArangoDB is open core. The best open source graph databases available now are Fuseki and JanusGraph.

Re: Ask HN: I'm trying to represent an entire building as a graph

#18
post #8

A thing to think about: often there are many different graphs you can create to represent the same thing. Each graph representation can focus on or hide different aspects of the real system. Why are you trying to model the building as a graph? What are the use cases? What operations do you want this data structure to be able to perform efficiently? It might turn out that a single graph (or any graph) is not the most…

> A thing to think about: often there are many different graphs you can create to represent the same thing. Each graph representation can focus on or hide different aspects of the real system.

This is usually the start of my argument in favour of representing data in a relational form. Any one graph is a projection of the domain. It privileges certain reads and writes over others. You inevitably find queries and updates that don't fit the graph's original shape and then suddenly it's a giant PITA to work with.

If I build a project management system, I might have a graph that runs [Project] -> [Workers] -> [Timesheets]. If I want to calculate the sum of time on a particular project that's fairly efficient. But if I want to get the sum of time for a particular worker, I will need to traverse every project looking for them.

In a relation form I'd have [Projects] n..n [Workers], [Workers] 1..n [Timesheets] and [Projects] 1..n [Timesheets]. When I need to sum in a project, I join on that. When I need to sum on a worker, I join on that. Neither is privileged over the other.

Re: Ask HN: I'm trying to represent an entire building as a graph

#19
Question with graphs is whether you want it to be a representation of a dataset, or persist the graph as the data itself.

For persistence, I use Neo4j to represent hundreds of dynamic graph ontologies, and I use the hosted version on graphenedb, which has worked just fine for my purposes.

For some views, I just use NetworkX to generate interactive d3.js pages from data I have queried from the graph, or python/flask with py2neo to generate json for d3 visualizations. Some others use cytoscape for visualization, but I find that a bit dramatic for most purposes.

Depending on how you would like to represent it, I can also recomment Webprotege and WebVOWL, since the graph you are creating is also in effect an ontology.

Post reply on HN