Sunday, March 20, 2016

Share a Public-Acess/Read-only Clone of your Graph Database

Problem

So, you want to show off the amazing tech you've been developing to your potential buyers using Graph Database technology. How do you do it safely?

Well, the safest way is not to and you can show off power-point presentations to your heart's content.

But the power-point presentation, no matter how slick, is nothing to what your graph database can do for your customers, and you know it, and I know it. Believe me, I've been involve in generating twenty power point presentations, and the customers just don't get it until you put the graph database in their hands and let them play with it (that's what I do, and that's how we got the sale, and then the follow-on contract).

Solution

So, back to sharing your graph database safely. How do you go about doing that?

We use grapheneDB.com as our DaaS over neo4j graph database, and they provide tools that makes sharing a copy of your database safely a cinch. Let's see how.

Let's say you have this graph database in your private access that you wish to share:


You're not going to share your database (you could, but we won't in this walkthrough), instead, we'll make a clone of that database. Here's how.  As you see, you have an [upgrade/clone] option for your database, select that.

Clone Database

By selecting [upgrade/clone] you have two options: clone from running database that involves downtime (that's why I'm doing this on a Sunday, see), or clone database from a backup. 


As you've been making daily backups (link) – right? – you can select the clone from a backup option. This is available at the professional editions. As I have a developer database here, I'll be cloning directly from this currently running database.

That's the top-half of the page, the second half is choosing what the cloned database will look like, which will be usually be the same configuration as your source database. The one field you need to supply is the new database name. Since this is a public access database, I'm prefixing the new name with 'PUBLIC': a little reminder-tag for me.


Once you have the configuration you desire for the new database select [Create database]. You get a nice little warning. Select [Continue].

Then you get the spinny-box as it creates the new database...

la-di-dah! Then you have your new database! YAY!


Configure New/Cloned Database to Read-Only Mode

But you're not done yet! We wish to provide public access to our database, but we don't want our adoring public to be creating THREE BILLION NODES on their own and drive you out of business.

Not that they would do that, ever, but still.

So, let's make this public-facing clone safe for access by making it read-only. Go to the Configure-tab on your new PUBLIC database. There you see that the read-only mode is "DISABLED":


Let's change that. Select [Edit configuration], and then select the "Enable"-link under Read only mode. Once you do that, select [Apply and restart].


You get a warning-dialog, so, again, select the red [Apply and restart] in this dialog:


You again get a 'restarting database'-spinny:


Then a confirmation at the top of your browser that your database has been restarted with the new configuration:


So that now, when you select the Overview-tab, you are reinforced with the confirmation that your database-clone is now in read-only mode:


Confirmed Read-Only

Let's confirm this by trying to create a node in the neo4j browser. Select [Launch] in your Overview-tab. Since this is the first time for this brand-new (cloned) database, you get the standard disclaimer-dialog:


Select [Launch browser], then, create some J-Random node named 'Foo' or whatevs. You, thankfully, get back the 'Could not create token'-message. You've verified your database is in read-only mode.


So, now you can share your database, as it's a clone of your original database (I leave data-masking for you to figure out), and it's in read-only mode.

Share Cloned Read-Only Database

But how do you share your database?

Go to the Connection-tab for your database and there it contains the connection information, including username and password as well as the connection URI or the REST URL for accessing your database.


BOOM-BAM, BABY! You now have provided a public-access read-only copy of your database! And, as it's provided by grapheneDB.com DaaS, either by AWS or Azure (your choice; grapheneDB allows either), it is demoable anywhere you have internet access.

You are in business! It's up to you how you wish to present the data (transformed, masked, or straight up) or to scale the data (a part of your database or all of it) as your public-access database.


Now: go to! Go to!

No comments:

Post a Comment