Hello,
Is there any way to store speckle model(3d) data into neo4j graph database using Javascript ?
Not directly, but this does get asked occasionally.
Speckle Data is not stored as straight tabular data and does include the normal BIM objects relations that you could remap into neo4j.
Hey @Sachin_Kannaujiya,
We do represent 3d data in a DAG. In that sense, there is no reason why you couldn’t store model data in a neo4j database.
However there are a few things to note:
- many of the object can become quite large in sheer size of the attributes required to represent the object (not to mention textures and other blob like items). Its been a while since i last used neo4j but if i remember correctly, its super good at storing a vast number of objects and their relationships, but its not so happy about storing big object in the nodes ( i might be wrong on this )
- our object models heavily uses the decompisition api, to yield good performance for sending, receiving and storing the objects. Our objects kit specifies how each object is processed and stored. This setup might or might not be compatible with a neo4j based storage layer.
- currently we do not have a javascript / typescript SDK that would implement kits, decomposition api, etc. The closest you can get is with the object loader, but that is still half the story at best.
I am interested, what is your usecase for storing the data in neo4j?
i just want to have all nodes relationship and other parameters (from revit given) so that we can query and find information, is there any api in speckle which can give this all records just entities name, category or other parameters
We do not have a direct API implementation for this usecase.
It should be possible to build it with one of our SKD-s, they provide object traversal methods to get started with.
Then What should I do to store data in neo4j.
As i mentioned, this is not something you can do out of the box, but we do allow using your own transport to send and receive data to and from a location.
So what you should do to make this happen, is to develop a neo4j transport and use it in a custom connector.
More info on what a transport is, can be found here Transports | Speckle Docs
If i were to do this, i’d start with a python implementation. We have the requirements of a transport outlined in an AbstractTransport
“interface” which you would have to implement: https://github.com/specklesystems/specklepy/blob/cca7b18119534894359b99df93884864a88d7d05/src/specklepy/transports/abstract_transport.py
Our operations functions will happly send and receive data to and from any transport target, that implements the mentioned interface.