Hosted Dolt

5 min read

Yesterday we quietly rolled out a preview of hosted Dolt. You can visit any of your databases on DoltHub, and click a button to get a cloud instance running Dolt sql server. Don't have a database? You can create a new one, or fork an existing public database.

What is Hosted Dolt

Hosted Dolt is a product we are working on where we will deploy and manage your Dolt database instances. You'll receive Hosted Dolt databases that are monitored and backed by an SLA providing uptime guarantees, and tooling to allow you to see your server's usage, and its logs.

Why Would I use Dolt instead of X

Dolt is the only database of its kind providing a fully versioned SQL interface. Dolt is MySQL compliant, so connecting it with your existing tech stack is very straight forward, but it provides unique capabilities found in no other database. Dolt gives you Git style versioning for your data. You can branch, merge, and resolve conflicts all from within SQL.

What is in the Preview

The preview lets you try Dolt with the click of a button. Choose a database and get a cloud instance of Dolt running as a server, with the data from that database cloned to it for you to try. You can connect to it using any MySql compatible client which supports TLS. The server will stay online for an hour before being terminated. If you want to run a server for longer than that contact us.

Launching and Connecting

In order to launch a hosted instance, you'll need a DoltHub account. Once you have an account, you'll need a database. You can create a new one, or you can fork an existing one. In this example I'll fork the data from SHAQ (One of our current bounty's database).

Hosted Deploying

Now that I have a database, I will click on the "Deploy" tab, then click the "Create Deployment" button.

Hosted Dolt

Within a few minutes the deployments page will update with details on how to connect to your instance.

Hosted Ready

That's it! For the next 60 minutes you can connect to your server and try Dolt.

Connecting and Running Some SQL

I'm going to connect using the MySQL command line client, so I can just copy the command given to me by DoltHub and paste it into my terminal window. Since my MySQL client comes from MariaDB, I'll need to add the parameter --ssl.

~>mysql --version
mysql  Ver 15.1 Distrib 10.6.4-MariaDB, for osx10.16 (x86_64) using readline 5.1

~>mysql -h"bheni-SHAQ.hosted.dolthub.com" -u"kv2dvkln7n45qro5" -p"TJ2prxdgcDZvdeVYqC41LUjRfId5n5Sx" -D"SHAQ" --ssl
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.9-Vitess

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 MySQL [SHAQ]>SHOW tables;
+---------------------------+
| Table                     |
+---------------------------+
| league_seasons            |
| leagues                   |
| player_season_stat_totals |
| players                   |
| season_types              |
| team_seasons              |
| teams                     |
+---------------------------+
7 rows in set (0.045 sec)

Now I run a query that can only be done in Dolt. Below I query the commit log and find the commit hashes of the most recently merged pull requests. Then I query to find the number of rows changed in the player_season_stat_totals table when that PR was merged. I do this by querying the system table dolt_diff_player_season_stat_totals.

MySQL [SHAQ]> SELECT * 
   -> FROM dolt_log 
   -> LIMIT 5;
+----------------------------------+--------------------+-------------------------------+-------------------------+------------------------------------------------------------------------------------------+
| commit_hash                      | committer          | email                         | date                    | message                                                                                  |
+----------------------------------+--------------------+-------------------------------+-------------------------+------------------------------------------------------------------------------------------+
| uat29bnjag2bmtltq56vedk96qodl6au | Tim Sehn           | tim@dolthub.co              | 2021-11-10 23:19:38.613 | Dolthub user: xrendan; Accepted PR: 254                                                  |
| atjustf4jmhj0oebqflq8kd8k40q1tl8 | xrendan            | brendan@brendans.com        | 2021-11-10 22:30:28.759 | subtract 100,000 from pf to fix column                                                   |
| bqioohgmpu159k3glbuv0m1st497ta77 | Tim Sehn           | tim@dolthub.co              | 2021-11-10 19:34:09.975 | Dolthub user: xrendan; Accepted PR: 253                                                  |
| tkf7ds71ihtubhv844tek1kqn3jqsok7 | Tim Sehn           | tim@dolthub.co              | 2021-11-10 19:25:42.315 | Dolthub user: fedderw; Accepted PR: 250                                                  |
| 4ppnj2of2ftl9jc8mg9mlnic6bg0u0ur | Tim Sehn           | tim@dolthub.co              | 2021-11-10 18:30:18.833 | Dolthub user: xrendan; Accepted PR: 249                                                  |
+----------------------------------+--------------------+-------------------------------+-------------------------+------------------------------------------------------------------------------------------+
5 rows in set (0.123 sec)

MySQL [SHAQ]> SELECT count(*) 
   -> FROM dolt_diff_player_season_stat_totals 
   -> WHERE to_commit='uat29bnjag2bmtltq56vedk96qodl6au' AND from_commit='bqioohgmpu159k3glbuv0m1st497ta77';
+----------+
| count(*) |
+----------+
|    88259 |
+----------+
1 row in set (19.519 sec)

Having a fully versioned database allows for brand-new kinds of analysis, workflows, and collaboration. I have been working on Dolt for over 3 years now, and I am still finding new and amazing ways the product can be used. If you haven't tried Dolt it's never been easier. Deploy a hosted instance on DoltHub now, and check the documentation to learn about how to use Git like features in SQL.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.