Commit Graph

6 Commits

Author SHA1 Message Date
Ingvar Stepanyan 56f45a68e0 Add basic CI (#88) 2024-05-13 16:49:57 +01:00
Ingvar Stepanyan 82a7ebd9ce Fix conflict resolution shenanigans (#87) 2024-05-13 16:45:56 +01:00
Ingvar Stepanyan 596c4a5e5c Make logger a separate SDK setting from client instance (#79)
This allows to:

1. Have a preset logger that is already correctly matching the environment (console vs Unity).
2. Removes the need for explicit `SpacetimeDBClient.CreateInstance(...)` which is particularly awkward to use and easy to forget with singleton as it doesn't return a result as a factory method name could suggest. Instead, `SpacetimeDBClient.instance` is available on first use.
3. Slightly simplifies dependencies between classes, e.g. `ClientCache` doesn't need a circular dependency on `SpacetimeDBClient`, making future maintenance and changes a bit easier.
2024-04-24 17:51:53 +01:00
Phoebe Goldman 2d8b980a52 Remove the rowPk from the client API (#72)
Re: https://github.com/clockworklabs/SpacetimeDB/pull/840

This commit updates the C# SDK to no longer use the `row_pk` field
of the Protobuf client API,
as that field has been removed. (Will have been removed, as of merging.)

Where a table cache was previously keyed on `byte[] rowPk`,
it is now keyed on `byte[] rowBytes`,
where `rowBytes` is the BSATN-encoded bytes of the row.
This means we effectively store two copies of each row in the client cache:
the BSATN serialized format, and the decoded domain type.

An alternate implementation would be to make the table caches be sets of domain types,
discarding the BSATN bytes.
We find this undesirable for several reasons:
- Hashing and equality-comparing `byte[]` is almost certainly more efficient
  than doing the same for domain types.
- Even if hashing and equality-comparing domain types were efficient,
  we would still have to update codegen to emit hashing and equality methods
  for all types in the module_bindings.
  This implementation requires no changes to the module_bindings.
- We already have the BSATN bytes sitting around,
  as they're necessarily part of the message we recieve from the server.
  This change does no additional serialization or deserialization.

In essence, we're trading memory for time and simplicity.
Keeping the BSATN bytes live approximately doubles the table cache's memory usage,
but simplifies the implementation greatly,
and (we suspect) speeds up table cache insertions, deletions and lookups.
2024-02-28 13:56:38 -05:00
John Detter 5e4b3bf490 Release v0.7.0-beta (#56)
* One-off query support (#49)

* SpacetimeDBURI argument in place of host and ssl enabled bool (#52)

* SpacetimeDBURI argument in place of host and ssl enabled bool

* Small cleanup

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>

* Add support for client address; re-run `spacetime generate` for quickstart client (#54)

* README.md and License.txt updates (#53)

* Update README.md

* Add license.txt

* Rename

* Add LICENSE.txt with proper case

---------

Co-authored-by: Derek Brinkmann <dbrinkmann@clockworklabs.io>

* Add support for client address; re-run `spacetime generate` for quickstart client

Re: https://github.com/clockworklabs/SpacetimeDB/pull/299

---------

Co-authored-by: dbrinkmanncw <109690865+dbrinkmanncw@users.noreply.github.com>
Co-authored-by: Derek Brinkmann <dbrinkmann@clockworklabs.io>

* Making Quickstart Work Again (#57)

* Packaged nuget package, quickstart is now working again

* Reset DBNAME

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>

* OnUnhandledReducerError (#31)

Co-authored-by: Steve <steve@codefics.com>
Co-authored-by: Boppy <no-reply@boppygames.gg>

---------

Co-authored-by: james gilles <jameshgilles@gmail.com>
Co-authored-by: dbrinkmanncw <109690865+dbrinkmanncw@users.noreply.github.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Derek Brinkmann <dbrinkmann@clockworklabs.io>
Co-authored-by: SteveBoytsun <100594800+SteveBoytsun@users.noreply.github.com>
Co-authored-by: Steve <steve@codefics.com>
2023-10-12 11:54:57 -05:00
dbrinkmanncw af8df9513e Commit quickstart example (#44)
* Commit quickstart example

* GetHashCode fix for Identity.cs

* Remove SDK from quickstart project and add nuget package. Rename spacetime_types folder to module_bindings

---------

Co-authored-by: Derek Brinkmann <dbrinkmann@citadelstudios.net>
2023-08-08 13:50:00 -04:00