v0.7.0-beta

clockworklabs/SpacetimeDBv0.7.0-betaOct 12, 2023by jdetter

AI Summary

A major release introducing multi-column indexes, SQL improvements, and better CLI tooling.

Key Highlights

  • Multi-column indexes!
  • Implemented `on_connect` and `on_disconnect` callbacks.
  • Added positional arguments to the CLI for reducer calls.
  • Introduced `Address` concept to disambiguate clients.
  • Subscribe to all tables functionality (`SELECT * FROM *`).

New Features

  • Multi-column indexes
  • Connect/disconnect callbacks
  • CLI positional arguments
  • Address concept

Full Release Notes

We've been hard at work stabilizing and improving SpacetimeDB since our announcement of the product two months ago! And we sure have a mondo update for you all! In just two months we've done hundreds of bug fixes and performance improvements. We've even gotten some contributions from the community!

We've got some highlighted features below, but the complete PR listing in the "What's Changed" section was too long so I've cut it down some!

## Highlights

* Multi-column indexes!
* Much better CLI version tracking so we can identify the exact binary someone is using if they run into an issue
* Implemented a more intelligent and performant system for disk `fsync`s for 2x faster transactions
* Greatly improved error and database event reporting in module logs
```rust
 INFO: spacetimedb: Creating table `ResourcesLog`
 INFO: spacetimedb: Creating table `Tool`
 INFO: spacetimedb: Creating table `Food`
 INFO: spacetimedb: Invoking `init` reducer
 INFO: src/lib.rs:69: Initialized bitcraft spacetimedb.
 INFO: spacetimedb: Database initialized
 ```

* Implemented `on_connect` and `on_disconnect` callbacks in the Rust SDK
* Multiple `spacetime server` configs for connecting to different servers 👍 
```rust
 DEFAULT  HOSTNAME                 PROTOCOL  NICKNAME
          testnet.spacetimedb.com  https     testnet
     ***  localhost:3000           http      local
 ```

* Completely reworked the multithreading model to reduce memory usage with a large amount of modules on a single node
* Subscribe to all tables functionality!
```sql
SELECT * FROM *
```

* Initializing and updating a database is now done in a single transaction, eliminating a whole class of issues
* Added non-subscription based type safe querying support!
* Implemented index scans for the SQL execution engine for greatly improved query performance
* Bootstrapped the Control DB into a SpacetimeDB database in SpacetimeDB Cloud!
* Positional arguments on the CLI! No more messing around with JSON for simple reducer calls!
```bash
$ spacetime call my_database my_reducer "Foo" "Bar" 27
```

* Added the concept of SpacetimeDB `Address`es which are now passed in with every reducer call. These allow you to disambiguate between clients with the same `Identity` but running on different devices.


## What's Changed
* Separate the global location of files per OS & create a configuration trait to read them by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/171
* Add SPACETIMEDB_TRACY var to dev environment by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/200
* Fix ABI check for module with split data by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/197
* Better Version Logging by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/206
* Add `identity/:id/verify` route to verify identity/token pairs by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/155
* Fix `SpacetimeType` for `Address` by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/209
* Remove the bitrotted trace replay functionality by @kulakowski in https://github.com/clockworklabs/SpacetimeDB/pull/219
* Provide serialization for `Result` by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/210
* Fix Windows Build by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/227
* Cloud related fixes by @drogus in https://github.com/clockworklabs/SpacetimeDB/pull/218
* Ensure legacy `DomainName` can be deserialized from JSON by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/208
* [rust-sdk]: gracefully close websocket by @coolreader18 in https://github.com/clockworklabs/SpacetimeDB/pull/228
* Remove unused RelationalDB::table_exist by @kulakowski in https://github.com/clockworklabs/SpacetimeDB/pull/236
* Fix logspam by @coolreader18 in https://github.com/clockworklabs/SpacetimeDB/pull/229
* Make ColumnIndexAttribute bitflags in the ABI by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/212
* Update wasmer by @kulakowski in https://github.com/clockworklabs/SpacetimeDB/pull/220
* chore: add more tracing to vm by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/246
* Fix reopening of db in test, keep the binary data on files stable by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/190
* Create st_constraints system table by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/225
* Add `/identity/public-key` route to get ECDSA public key by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/165
* Fix recovery of sequences after restart by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/158
* test: Only update active toolchain by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/223
* perf: compute DataKey only when necessary by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/268
* Add debug logs with load progress by @aasoni in https://github.com/clockworklabs/SpacetimeDB/pull/143
* Fixed json serializer getting progressively slower by @SteveBoytsun in https://github.com/clockworklabs/SpacetimeDB/pull/226
* SDK test suites by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/258
* perf: read DataKey instead of recomputing it in subscriptions by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/276
* Update indexes when updating a database by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/257
* perf: remove table headers from rows in query engine by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/271
* Refactor with `#[derive(derive_more::From)]` by @Centril in https://github.com/clockworklabs/SpacetimeDB/pull/281
* Add C# integration test by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/291
* Refactor Option<Vec<_>> in Config by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/292
* Avoid relying on global CLI in tests by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/294
* feat(296): index range iterator by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/303
* feat(311): Make right hand side of join generic by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/312
* [SDK] Separate client cache from connection to avoid a deadlock in cloud-next by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/248
* feat(297): generate index scans for range predicates by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/306
* perf(308): Push index scans below join by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/313
* fix(320): Incremental evaluation of index scan plans by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/321
* feat(318): Push selections below joins in the general case by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/319
* feat(298): Index nested loop semijoin by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/316
* Add SDK test that verifies connect/disconnect callbacks happen by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/326
* Add smoke test for private tables by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/331
* Fix Describe Reducer + Table by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/323
* Store the current module hash in a system table by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/290
* feat(332): Support incremental evaluation for index joins by @joshua-spacetime in https://github.com/clockworklabs/SpacetimeDB/pull/336
* Return the formatted error from `log_and_500`, so the CLI can report it by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/338
* [SDK] generate `struct Module` to hold dispatch functions by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/239
* connect/disconnect reducers called when executing reducer from from CLI by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/334
* Fix bootstrapping of ST_MODULE by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/342
* Wrangle benchmarks by @kazimuth in https://github.com/clockworklabs/SpacetimeDB/pull/289
* Benchmarks: report tx/s as elements/s by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/345
* Fix the printing of ascii codes on tracy and improve some tracing by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/341
* Added Git Commit Hash to Version Command by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/340
* Fix derive(Deserialize) on void enum by @coolreader18 in https://github.com/clockworklabs/SpacetimeDB/pull/330
* Add simple READMEs for SDK test clients by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/350
* Preliminary module-side interface for timing execution by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/351
* Commit test clients' module_bindings by @gefjon in https://github.com/clockworklabs/SpacetimeDB/pull/346
* Print the elapsed time & # of returned rows in the interactive repl by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/344
* Fix typo in README.md by @eltociear in https://github.com/clockworklabs/SpacetimeDB/pull/193
* Bindings: improve docs precision by @Centril in https://github.com/clockworklabs/SpacetimeDB/pull/146
* New Upgrade Version Util by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/354
* core: Provide read access to commit/message log and odb by @kim in https://github.com/clockworklabs/SpacetimeDB/pull/265
* Version Upgrade to 0.7.0 by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/355
* Move connection events to reducers by @RReverser in https://github.com/clockworklabs/SpacetimeDB/pull/309
* Fix arm64 builds on Linux by @kurtismullins in https://github.com/clockworklabs/SpacetimeDB/pull/361
* Fix AMD64 dependency error in CLI Docker Build by @kurtismullins in https://github.com/clockworklabs/SpacetimeDB/pull/362
* C# SDK - Fix Genererated FilterByX for Option Columns by @jdetter in https://github.com/clockworklabs/SpacetimeDB/pull/367
* Fix deadlock by @coolreader18 in https://github.com/clockworklabs/SpacetimeDB/pull/369
* Bench for SQL scan / where by @mamcx in https://github.com/clockworklabs/SpacetimeDB/pull/370

## New Contributors
* @coolreader18 made their first contribution in https://github.com/clockworklabs/SpacetimeDB/pull/228
* @kurtismullins made their first contribution in https://github.com/clockworklabs/SpacetimeDB/pull/361

**Full Changelog**: https://github.com/clockworklabs/SpacetimeDB/compare/v0.6.1-beta...v0.7.0-beta