cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Configuring neo4j database backend

dstark
1-Newbie

Configuring neo4j database backend

Hello,

I am trying to find documentation about how to configure Thingworx to use neo4j on the backend. I am trying to dockerize my Thingworx deploy and use a remote neo4j database. I found a very small bit about platform-settings.json that seems to have postgresql configuration parameters but very little about neo4j.

Appendix B shows sample platform-settings.json for postgres - does it work for setting a remote neo4j?

Setting THINGWORX_PLATFORM_SETTINGS env variable to specify where platform-settings.json lives

Ideally, I'd like to have neo4j as a standalone database (preferably with high availability with one writer and multiple readers).  At a mimum I'd like one remote database.  Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:dstark)

Dan, you don't need to configure Neo4j's connectivity because its an embedded database, i.e. its instantiated with the Thingworx.war file deployment, you can configure some part of how it's utilized by the ThingWorx platform in the platform-settings.json for e.g.

"NeoPersistenceProviderPackage": { "StreamProcessorSettings": { "maximumBlockSize": 2500, "maximumQueueSize": 250000, "maximumWaitTime": 10000, "scanRate": 5, "sizeThreshold": 1000 }, "ValueStreamProcessorSettings": { "maximumBlockSize": 2500, "maximumQueueSize": 500000, "maximumWaitTime": 10000, "scanRate": 5, "sizeThreshold": 1000 } },

Generally speaking Neo4j and H2 for that matter are "hardcoded" within the ThingWorx. Though you can still view the database files if you'd to navigate to \\ThingworxStorage\database\data , ThingworxStorage\database\ (for H2) Also you can check what sort of PersistenceProvider ThingWorx is using if you'd navigate to PersistenceProviders under the Data Storage, something like this :

just in case if you don't see this listed, enable the visibility of system objects by :

And if you'd click on the icon you should see which DB is used as persistence provider :

To finish my long reply, I would reiterate what Polina mentioned above you should be using H2 as Neo4j is end of support

Hope this would clarify to some extent.

View solution in original post

6 REPLIES 6
posipova
20-Turquoise
(To:dstark)

Hi, Neo4j has reached end of sale/support. Currently, h2, hana, postgresql, and DSE integration is available.

Thanks for your feedback, Polina! I will be exploring other backends in the future. Could you still point me to how neo4j (or any database) is configured within the ThingWorx application? I explode the .war, but cannot find the database connection settings.

supandey
19-Tanzanite
(To:dstark)

Hi Dan, if running a DB as persistence provider remotely is your key concern you can always go for PostgreSQL, SAP Hana or DataSatax Apache Cassandra.

If you are just looking for a external data store, (or if you are looking forward to connect your existing RDBMS to ThingWorx) you can choose to configure JDBC connection using the Relational Databases Connectors from the ThingWorx Marketplace. Do note that this won't act as a persistence provider for ThingWorx itself.

Let me know if you'd need more information on this.

This is my question: how does the persistence for ThingWorx itself work? (Sorry if this is obvious but I'm new to ThingWorx).

Looking in /ThingworxStorage/database/data/messages.log it's clear I am using Neo4j on the host.  I'm not sure where in the webapp this database backend is configured. For example, typical web applications will have a configuration file and you set database connection settings. I don't know where this is configured (either in the webapp or on the filesystem).

Thank you.

supandey
19-Tanzanite
(To:dstark)

Dan, you don't need to configure Neo4j's connectivity because its an embedded database, i.e. its instantiated with the Thingworx.war file deployment, you can configure some part of how it's utilized by the ThingWorx platform in the platform-settings.json for e.g.

"NeoPersistenceProviderPackage": { "StreamProcessorSettings": { "maximumBlockSize": 2500, "maximumQueueSize": 250000, "maximumWaitTime": 10000, "scanRate": 5, "sizeThreshold": 1000 }, "ValueStreamProcessorSettings": { "maximumBlockSize": 2500, "maximumQueueSize": 500000, "maximumWaitTime": 10000, "scanRate": 5, "sizeThreshold": 1000 } },

Generally speaking Neo4j and H2 for that matter are "hardcoded" within the ThingWorx. Though you can still view the database files if you'd to navigate to \\ThingworxStorage\database\data , ThingworxStorage\database\ (for H2) Also you can check what sort of PersistenceProvider ThingWorx is using if you'd navigate to PersistenceProviders under the Data Storage, something like this :

just in case if you don't see this listed, enable the visibility of system objects by :

And if you'd click on the icon you should see which DB is used as persistence provider :

To finish my long reply, I would reiterate what Polina mentioned above you should be using H2 as Neo4j is end of support

Hope this would clarify to some extent.

This is extremely helpful. Thank you and thanks all who responded!

Top Tags