Skip to content

Releases: clockworklabs/SpacetimeDB

v1.0.0 Release Candidate 1

06 Nov 20:36
Compare
Choose a tag to compare

🚀 It's an extremely exciting day! 🚀

We are releasing the first release candidate of 1.0 SpacetimeDB!

In this version of SpacetimeDB, we do not expect to introduce any breaking changes to the user facing API. You can rest assured that if you build on this version it will be fully compatible or very nearly fully compatible with the final 1.0 release API.

While we reserve the right to add new APIs and make small changes before 1.0, this is more or less what 1.0 will look like!

NOTE! This is still a pre-release version. It is not the final 1.0 version of SpacetimeDB. As such we still suggest that developer exersize caution about using SpacetimeDB in production and be aware of the risks of pre-release software. Including the potential need to wipe their database instances or to manually migrate their data to the final 1.0 version.

SpacetimeDB identities are now OIDC compliant! This means that you'll have access to a huge host of existing tooling to create identities for your users and allow them to log in to your module through your own login flows and infrastructure.

CLI Improvements

  • Login Flow Updates: We've dramatically improved how Identitys work in SpacetimeDB, including allowing you to use the same Identity across multiple SpacetimeDB clusters by logging into the website. This includes introducing new CLI login flow, including login show and logout commands.
  • spacetime upgrade Update: Now uses --yes instead of the deprecated --force flag.
  • Help Text Enhancements: Added help text for --build-options.
  • Server Command Stabilization: Stabilized spacetime server subcommands and resolved issues with spacetime server edit.

Database Enhancements

  • Renaming: "Database instance" renamed to "replica" for clearer terminology.
  • Row-Level Security (RLS): Added a system table for RLS along with a new filter macro.
  • Optimized Querying: Added non-unique index join iterator and a physical query plan with executors for performance improvements.
  • Persistent Memory Metering: Enhanced energy metering for persistent memory and improved handling for large datasets.

Compression

  • New Compression Options: Introduced gzip and none compression options; SDK now selects optimal compression.

Code and Dependency Updates

  • C# Bindings: Bumped C# bindings to version 1.0.0, with improved codegen for managing DbConnection states.
  • Code Cleanup: Removed obsolete elements like BytesWrapper and improved commit log traversal efficiency.
  • Dependency Upgrades: Updated Wasmtime dependency; improved resilience of ARM64/AMD64 Docker builds.

Security and Identity Management

  • JWT Handling: Enhanced JWT token handling with OIDC providers.
  • Endpoint and Token Updates: Removed email recovery endpoints, deprecated SendGrid, and updated token formats for ID tokens.
  • Short-Lived Token Fixes: Corrected the endpoint used for short-lived tokens.

What's Changed

New Contributors

Full Changelog: v0.12.0-beta-hotfix3...v1.0.0-rc1-hotfix1

v0.12.0-beta

04 Oct 05:19
Compare
Choose a tag to compare

🌟 It's happening! 🌟

We've got a big one for you today! We've been burning the midnight oil to bring you the cream of the SpacetimeDB crop. We are updating and improving our APIs and interfaces across the board in an effort to stabilize and polish them up for a final release!

SpacetimeDB is getting closer and closer to a final 1.0 release and this is a huge milestone on that journey. These new APIs will allow us to implement some amazing new features and vastly improve the user experience of using SpacetimeDB across multiple languages and clients.

Module API

The module API has had it's most major overhaul since the announcement of SpacetimeDB. We're reducing the amount of globals and enforcing accessing the database via a ReducerContext.

Rust

#[reducer]
pub fn add(ctx: &ReducerContext, name: String) {
    println!("Inserting {}", name);
    ctx.db.person().insert(Person { name });
}

CHECK IT OUT! The #[spacetimedb(reducer)] macro has been simplified to just #[reducer]!

C#

[SpacetimeDB.Reducer]
public static void Add(ReducerContext ctx, string name)
{
    Log.Info($"Inserting {name}");
    ctx.Db.Person.Insert(new Person { Name = name });
}

SDK API

The SDKs now share almost exactly the same API as you use to access your data inside your module.

let ctx = DbConnection.builder()
    .with_url("https://testnet.spacetimedb.com")
    .with_module_name("bitcraft")
    .build();
...
for person in ctx.db.person().iter() {
   println!("Hey, {}", person.name);
}

C#

var conn = DbConnection.Builder()
    .WithUri("https://testnet.spacetimedb.com")
    .WithModuleName("bitcraft")
    .Build();
...
foreach (var person in ctx.Db.Person.Iter())
{
    Log.Info($"Hello, {person.Name}!");
}

Now you can write your client code with the same patterns as your server code!

Migration Guide

Check out our full migration guide to update your code for v0.12 available in the docs section of our website.

CLI updates 🖊️

We've updated a lot of the args to the CLI to be more clear and consistent. If something gives you an errors, check --help to see if it's changed.
Some of the important changes:

  • spacetime local clear (to delete all local server data) is now called spacetime server clear
  • spacetime build --skip_clippy/-S is now more explicitly --skip-println-checks
  • spacetime logs database 10 is now spacetime logs database -n 10
  • spacetime publish and spacetime generate now accept a --build-options param, e.g. spacetime publish --build-options="--debug --skip-println-checks"

Small clarity changes:

  • All --anon-identity parameters have been renamed to --anonymous
  • spacetime energy status is now spacetime energy balance for clarity
  • spacetime publish --clear-database has been renamed to spacetime publish --delete-data for clarity
  • spacetime subscribe -n now has a longform option --num-updates
  • spacetime publish|generate --wasm-file -> spacetime publish|generate --bin-path

What's Changed (It's... uhh a lot)

Read more

v0.11.1-beta

26 Aug 23:16
Compare
Choose a tag to compare

What's this? What's this? A release in the air!

This release just adds two small improvements to the timer table functionality from the last release:

  • Bugfix: Dedup schedueler queue (#1587)
  • Add volatile_nonatomic_schedule_immediate (#1612)

Don't be fooled by this tiny release, though - our next release will be a big one! Keep an eye out for the big API improvements and upcoming stability soon! Before you know it, we'll have our big 1.0 release!

Changelog

Full Changelog: v0.11.0-beta...v0.11.1-beta

v0.11.0-beta

09 Aug 18:48
Compare
Choose a tag to compare

We have a big release for you today 🎉 🎉 ! We're including some big performance improvements ⚡ and long-awaited bugfixes 🐞! Remember to stay tuned for our 0.12 release soon.

This release includes some major breaking changes, so you won't be able to use your old databases with this version. Run spacetime local clear to remove them.

Important changes

Major

  • ⚡ We removed our usage of protobuf, in favor of our own internal format (#1077) - this is a big performance improvement on the client and the server!
  • ⌛ We removed the server-side schedule! macro and its equivalents in favor of table-based timers (#1449). Please check our server module docs for more info on how to use the new system.

Here is some example code which uses the new timer tables:

// The `scheduled` attribute links this table to a reducer.
#[spacetimedb(table, scheduled(send_message))]
struct SendMessageTimer {
    text: String,
}

// Reducers linked to the scheduler table should have their first argument as `ReducerContext` 
// and the second as an instance of the table struct it is linked to.
#[spacetimedb(reducer)]
fn send_message(ctx: ReducerContext, arg: SendMessageTimer) -> Result<(), String> {
    // ...
}

// Scheduling reducers inside `init` reducer
fn init() {
    // Scheduling a reducer for a specific Timestamp
    SendMessageTimer::insert(SendMessageTimer {
        scheduled_id: 0,
        text:"bot sending a message".to_string(),
        //`spacetimedb::Timestamp` implements `From` trait to `ScheduleAt::Time`. 
        scheduled_at: ctx.timestamp.plus(Duration::from_secs(10)).into()
    });

    // Scheduling a reducer to be called at fixed interval of 100 milliseconds.
    SendMessageTimer::insert(SendMessageTimer {
        scheduled_id: 0,
        text:"bot sending a message".to_string(),
        //`std::time::Duration` implements `From` trait to `ScheduleAt::Duration`. 
        scheduled_at: duration!(100ms).into(),
    });
}

CLI changes

  • CLI subcommands consistently use --server and --identity args consistently instead of anonymous args (#1482)
  • We have a new subscribe subcommand! (#1343)
  • Bugfix: Update help text suggesting spacetime server fingerprint to have the correct -s param (#1457)
  • Bugfix: spacetime server add - Remove trailing /s from server URIs (#1552)

Web API

  • Recovery code APIs are now under /identity and using POST (#1492)
  • /identity GET returns an empty success if the email address is not found (#1491)

C#

  • Use latest C# in BSATN.Runtime (#1548)
  • Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI (#1461)
  • Include BSATN.Codegen in nuget pack (#1424)
  • Generate tagged enums in C# client code (#1421)
  • Restructure NuGet packaging (#1440)
  • Restructure C# SpacetimeDB runtime (#1455)
  • Implement the module rng proposal for C# (#1425)
  • Roslyn cacheability testing and fixes (#1420)

Using SpacetimeDB as a library

  • table: Make with_mut_schema clone-on-write (#1530)
  • Fix running 'cargo test' in crates/lib (#1478)
  • Move db module from spacetimedb_sats to spacetimedb_lib (#1479)
  • Move schemas to schema crate, rename Def to RawDefV8 (#1498)
  • core: Simplify custom bootstrap (#1404)
  • TableDef: clarify generated_* methods (#1419)
  • Make some commitlog helpers public (#1390)
  • perf(1351): Add a row count metric for subscriptions (#1435)

Bugfixes

  • ST sequences: respect allocated amount on restart (#1532)
  • Drain scheduler Actor channel before start (#1529)
  • Table::is_row_present: don't panic (#1526)
  • Ignore some sequence allocation mismatches when checking for compatible updates (#1524)
  • Fix inconsistent auth/identity creation (#735)
  • ColList: preserve list order on list.push(..) (#1474)
  • HACK: Tweak schema_updates to allow adding/removing non-unique indices (#1434)
  • Fix index removal and additions + add smoketest (#1444)
  • fix(1409): Counter metric names (#1411)
  • core: Downgrade host log verbosity (#1446)
  • Implement a temporary type check validation on sql compiling (#1456)
  • core: Replace host scheduler on update (#1453)

Changelog

Read more

v0.10.1-beta

28 Jun 16:18
Compare
Choose a tag to compare

This is just a tiny fix in our C# SDK. 🔧

Stay tuned for our upcoming 0.11 release soon! 👀

What's changed

  • Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI by @SteveBoytsun in #1461

Full Changelog: v0.10.0-beta...v0.10.1-beta

v0.10.0-beta

13 Jun 22:36
Compare
Choose a tag to compare

Yes, the rumors are true - it's release day! 🎉 🎉

We're gearing up for our big 1.0 release later this year, so this release has some great foundational API improvements, improves consistency across ours APIs, and adds some other fantastic foundational features!

Highlights

  • Bumped to Rust 1.78
  • We now regularly capture a snapshot of the database state, and restore from it when restarting the Database
  • Tables are now private by default, and must be explicitly marked as public via #[spacetimedb(table(public))] or [SpacetimeDB.Table(Public = true)]
  • Our SDKs now have consistent filter_by_* functions that return a collection of results, and find_by_* functions that return a single result
  • Implement a new rand api which fixes bugs in our previous random number generator
  • Bugfix: When the database is restarted, we properly treat all clients as disconnected

Big ones!

  • Module hotswapping - You can now update your server logic with a new module without disconnecting existing clients! Players will keep on playing and clients will keep on clienting without being any the wiser!
  • Recv-style ABI - We've improved the performance of passing data into your module from the host substantially by eliminating several allocations and copies.

CLI changes

  • spacetime build uses the --project-path param instead of an anonymous param
  • spacetime publish -c requires confirmation (can be overridden with --force)
  • spacetime logs -f does not start from the very beginning

What's Changed

Read more

v0.9.2-beta

28 May 20:49
Compare
Choose a tag to compare

Yes, we just released 0.9.1 🎉, but we just love releasing the latest and greatest things to the community!

And in this case, the latest and greatest thing is an 🔒 important security patchfix! Private tables are now properly protected.

Thank you to 📣 @Chippy in our Discord server for pointing this out so we were able to fix it quickly!

Changelog

22dd786 Apply open PR #1224: Bump version to 0.9.2
e4f1021 Apply open PR #1274: execution_set.check_auth(...) on initial subscription

Full Changelog: v0.9.1-beta...v0.9.2-beta

v0.9.1-beta

22 May 22:34
Compare
Choose a tag to compare

v0.9.1

Today's a good day - we have a new release for you! It's not the fanciest, shiniest release - but it includes some nice cleanups and important fixes.

As a reminder you can upgrade from the previous release with the spacetime upgrade command.
If you are on macOS and you've installed through brew we recommend using brew install clockworklabs/tap/spacetime to upgrade.

Highlights

🗑️ Removed repeating reducers

⚠️ We have removed repeating reducers (#[spacetimedb(reducer, repeat = _)]) in favor of just using schedule!.

There are a lot of nuances to what exactly "repeating" means. It's easier for everyone to understand code that schedules what it wants, when it wants.

💻 CLI updates

⚠️ The default server is now testnet instead of local!

The meaning of -s and -S are more consistent between CLI commands (-s is for --server, -S is for --skip_clippy). spacetime build, spacetime identity, and spacetime server have been tweaked.

🛠️ Bugfixes

  • Fix select * from *
  • Atomically downgrade lock when committing tx to prevent deadlock
  • fix(1170): Use scope guard to decrement reducer queue length
  • fix(1173): Record wait time for all reducers

Changelog

New Contributors

Full Changelog: v0.9.0-beta...v0.9.1-beta

v0.9.0-beta

03 May 15:10
Compare
Choose a tag to compare

v0.9 🚀🚀🚀

We have got a big one for you! Today we are releasing version 0.9 of SpacetimeDB. It's been a while since our last official release and we have got a huge number changes and performance improvements.

Most notably performance has improved by 10x - 100x or more for certain parts of the database! Subscription evaluation in particular has gotten almost 100 times faster! This makes an enormous difference for people shipping production games. 🏃🏃🏃

Version 0.9 is the same version that we ran the Closed Alpha for the MMOPRG BitCraft, which had 700 players playing concurrently in a single database! We are battle testing SpacetimeDB with our production game!

We're so excited to see what people build with this new version!

As a reminder you can upgrade from the previous release with the spacetime upgrade command. If you are on macOS and you've installed through brew we recommend using brew install clockworklabs/tap/spacetime to upgrade.

Highlights

  • Vastly improved metrics gathering performance overhead
  • Stabilized new transaction log format for a 2-3x reduction in transaction log size and much faster reply times
  • Reduced unnecessary copying and cloning in core database paths
  • Improved threading model for optimal performance
  • Fixed a critical issue for misbehaving clients or clients with very poor latency
  • Multi-column index selection for the query! macro
  • Huge number of critical performance and bug fixes!

What's Changed

Read more

v0.8.2-beta

15 Feb 20:48
Compare
Choose a tag to compare

Our release 0.8.2 is available now! It includes tons of performance improvements and some great bugfixes!

As a reminder you can upgrade from the previous release with the spacetime upgrade command. If you are on macOS and you've installed through brew we recommend using brew install clockworklabs/tap/spacetime to upgrade.

Highlights

  • Memory architecture refactor: we're working on rearchitecting the way we store and retrieve data from the database. This is our first batch of improvements which reduces the amount of overhead when reading values from the database. This affects both subscription query performance and module performance.
  • Tons of performance improvements
    • Incremental subscription queries are now evaluated in parallel
    • Join evaluation performance improvements
    • Lookups on an indexed column are faster
  • Fixed spacetime generate --delete-files works properly without using --force
  • Bug fixes
    • Fixed correctness issues with subscription queries
    • Fixed some issues related to unwrapping on None

What's Changed

Full Changelog: v0.8.1-beta...v0.8.2-beta-hotfix7