All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
BeamScheduler
can deserialize jobs without asource
field.AssumeNewUser
does not allowuserId
that is not a positive value- Content downloads from Microservice no longer have SSL validation issues
async void
methods are not allowed in Microservices, and will cause the Microservice to fail. Instead, consider using methods withasync Task
, orasync Promise
.
- Mock
Unity.Addressable
reference included in Microservice builds
AssumeNewUser
replacedAssumeUser
, and offers memory usage improvements and extended configurability.Beamable.UnityEngine.Addressables
exists and contains mock addressable types that used to exist inBeamable.UnityEngine
, allowing Standalone Microservice projects to properly reference Addressable types in Unity.
AssumeUser
is obsolete, andAssumeNewUser
should be used instead.
[Callable]
methods no longer produceAccountNotFoundError
errors when emitting Beamable API calls with valid playerIds.- Microservices have improved thread-safety when sending messages to Beamable.
no changes
- Microservices with
.dll
references will match based on filename, instead of first matching suffix. This fixes a commonNewtonsoft.Json
collision between Unity.Plastic and Unity.Newtonsoft.
admin/metadata
route will return sdk version and other metadata about a running service.
no changes
no changes
StorageObjectConnectionProvider
will removeIMongoDatabase
from cache whenGetDatabase()
throws an exception, ensuring the service does not cache transient errors.- Autogenerated code that touches user-scoped API endpoints (those with requireUser=true) will include correct playerId now.
ServiceProvider
accessor is available insideMicroservice
, and will use existingProvider
accessor. This is to facilitate similarity between client code and server code.
- Fix issue that was causing error while publishing microservice in apple silicon cpu architectures.
- Deserializing string field containing json in microservices compatibility improvements.
no changes
no changes
no changes
no changes
no changes
- Deserializing string field containing json in microservices to remove extra quotes.
no changes
no changes
- Ensure that Storage is enabled based on the status of its dependent services.
- Added
MicroserviceBootstrapper.Prepare<BeamService>()
method - MongoDbExtensions class that supports mongo indexes creation
ICollectionElement
interface andMongoIndexAttribute
to support automatic index creation during microservice startup
IUsageApi
is available
- Change Unity client code to serialize messages as an object instead of payload string array
- Microservice docker logs no longer put quotes around every log parameter
- Microservice "sending request" debug log messages is easier to read
- Supporting deleted and updated items in
IFederatedLogin
Context
now has a propertyIsAdmin
- Standalone Microservices that implement
IFederatedLogin<>
orIFederatedInventory<>
now appear as federation options in linked Unity projects. GetTournamentInfo
is now obsolete, should useGetRunningTournamentInfo
that returns the actual running cycle tournament info.
Context.CheckAdmin()
is now obsolete, should useContext.AssertAdmin()
.- The
InitializeServicesAttribute
methods should be able to return aPromise
instead of only aPromise<Unit>
.
[Callable]
methods can accept and returndecimal
primitives- Beamable.Common nuget package is available for netstandard2.0
CancelJob
function inBeamScheduler
Context
now has a propertyIsAdmin
Create
method inMongoCRUDExtensions
has been made awaitable- Error message,
"Cannot schedule work, because the scheduler has been stopped."
, for Docker commands that finish processing during domain reloads. - Hide invalid log elements from Microservices Window.
StorageDocument.Id
is nowpublic
and can be written to manually.- Cron expressions given to
BeamScheduler
are validated usingCronValidation.TryValidate
utility. ICronBuilder.ToString()
results in a cron expression instead of the default C#ToString()
class name.Context.CheckAdmin()
is now obsolete, should useContext.AssertAdmin()
.
Quaternion
method implementations no longer work in Microservices using netstandard2.0
StorageDocument
types can useId
in Mongo Filter Expressions.
- Set of CRUD methods for
IMongoCollection
andIStorageObjectConnectionProvider
Services.Scheduler
SDK available for scheduling jobs for later execution.
- Rare concurrent modification to collection error regarding
IDependencyProvider
when used in a Microservice.
- Generated OpenAPI document for Microservices includes qualified naming extensions.
- If Docker is not installed, calling Microservices from Editor still work.
- Unity 2021 no longer imports assets during Microservice publish process.
- Unity clients will direct Microservice traffic to local standalone Microservices.
- Authorization will be retried if failures occur.
- Authorization failures during service registration have a 2 minute timeout instead of 10 seconds, allowing for several retry events.
- ClassPool uses thread locking to prevent memory violations during multithreaded access.
- If Docker is not installed, Microservice Manager skips code watch.
- Microservices can be started with an alias in the CID environment variable.
- Runtime log level switching. In RealmConfig, use a key for
service_logs|serviceName=logLevel
.
- New Microservice publish window.
- Microservices with
IFederated
interfaces will include federation details in service manifest. - Running game will direct Microservice traffic to local standalone Microservices.
- GET requests from autogenerated code are supported in Microservices code
KeyNotFound
error in RealmConfig.Beamable.Microservice.Runtime
nuget package correctly includesUnity.Beamable.Runtime.Common
IMicroserviceBuildContext.AddDirectory
method allows to copy an entire directory of files into a build context.IMicroserviceNotificationsApi
supports notifying entire player base withNotifyGame
method.IMicroserviceNotificationsApi
supports notifying servers withNotifyServer
method.- Microservices has
Push
service
- Microservice calls to
GetCloudDataContent
no longer throw 500 errors.
- Standalone Microservices don't use structured JSON logs
- Improved
MicroserviceWindow
performance by optimizing Docker checks
Beamable.Common
andUnityEngineStubs
now published as separate packages on Nuget.CustomAutoGeneratedClientPath
option onMicroserviceAttribute
controls where the autogenerated client file is saved to.IMicroserviceBuildHook<T>
interface enables custom build actions for Microservice builds, including copying files into the container.
- Microservice Manager window shows error if there are missing
imageId
fields in the latest Microservice deployment - Microservices installed in the /Packages directory will not use Hot Module Reload or generate clients if the package is only available in the PackageCache.
InventoryView
is serializable.
- Microservices with
IFederatedLogin<T>
will generate client callable methods. - New
Publish Window
UI styling inMicroservice Manager
- Microservices with
IFederatedInventory<T>
will generate client callable methods.
- Empty dictionary of supported subtypes no longer break request serialization.
- Check for missing dependencies before microservices deploy
GetManifestWithID
method works for manifest ids other than"global"
.- Microservice path names are case insensitive
- Memory leak no longer occurs while handling requests.
IDependencyProvider
disposal frees memory.
- Microservices can now deploy in realms with no deployed Content manifest.
no changes
[InitializeService]
exposesIDependencyProvider
asProvider
, and[ConfigureServices]
exposesIDependencyBuilder
asBuilder
- Internal dependency-injection system uses
IDependencyBuilder
andIDependencyProvider
. - Websocket connection recovery log level changed from Error to Debug.
- Microservices can override their health check port with the
HEALTH_PORT
env variable.
- Custom
[InitializeService]
and[ConfigureServices]
callbacks no longer run for each connection. - Singletons registered during
[ConfigureServices]
won't be re-instantiated on each request.
- Downloading content allocates less memory due to avoid async/await
Task
allocation.
Context.ThrowIfCancelled()
method to force end a client-callable request if it has timed out.
- Internal container health checks no longer cause fatal exception.
IContentApi
is accessible via the Microservice dependency injection scope.
EnableEagerContentLoading
configuration setting onMicroserviceAttribute
is enabled by default.
- Content is downloaded and cached on the Microservice before it is declared healthy and available to accept traffic.
- Published Microservices open 10 websocket connections instead of 30.
- Content downloads no longer cause HTTP timeouts or CPU spikes.
- Domain Reload times are reduced by roughly 30% when working with Microservices
- Rare authorization locking bug that could cause extend authorization times.
- Exposed methods for access to public player stats:
GetPublicPlayerStat
GetPublicPlayerStats
GetAllPublicPlayerStats
- Microservice request context body and header properties are lazily deserialized.
- Deployed Microservices run multiple local instances to improve reliability and performance.
- Microservices no longer represent inbound messages with an intermediate
string
. Instead, messages byte arrays are parsed directly toJsonDocument
- Microservice message log size limit.
- Inbound requests are rate limited to avoid out of memory failures.
- Microservice log messages no longer include message hash,
"__i"
field. - Microservices no longer emit log body and headers on every log statement.
- Microservices no longer emit log messages for receiving and responding to
[ClientCallable]
methods.
- The
Publish Window
is now centered on show relative to the editor
- There can only be one instance of the
Publish Window
in theMicroservice Manager
- no changes
- Displaying log pagination if message contains more that 5000 chars
- Quick action buttons for opening C# code and local documentation for service cards
- Copy button to copy full log message
- New
Microservice Manager
UI styling - Play-all button request microservice selection
- New service icons in
Publish Window
- Various
DockerNotInstalledException
events when MicroserviceManager window isn't open, but Docker ins't running. Microservice Manager
no longer freezes when log has more than 65535 vertices
- Checkboxes and local status icon on microservice cards
curl error 52
while publishing Microservices and performing health-checks.- Task Cancellation exceptions while publishing Microservice.
- Various
DockerNotInstalledException
events when MicroserviceManager window isn't open, but Docker ins't running.
EnablePrePublishHealthCheck
option in Project Settings/Beamable/Microservices can be used to disable Microservice health checks when publishing. Disabling this is dangerous and may lead to unhealthy servers being deployed to production.PrePublishHealthCheckTimeout
option in Project Settings/Beamable/Microservices can optionally override the amount of seconds before a health check is considered to timeout. The default value is 10 seconds.
SequenceContainsNoElements
error when building Microservices.
- Added
long
PlayerId version ofInviteToParty
,PromoteToLeader
andKickPlayer
methods of theIPartyApi
interface. - Utility APIs for setting expiration on
MailUpdate
andMailSend
requests
- ActionBarVisualElement buttons behaviour is fixed when Docker is not running.
- Fixed issue with MS rebuild/stop on entering to Playmode.
- Fixed Microservices stop at Unity Exit.
- DependencyResolver allows possibility to remove asmdef reference by user.
- Allow disabling
System.Runtime.CompilerServices.Unsafe.dll
inclusion by usingBEAMABLE_DISABLE_SYSTEM_COMPILERSERVICES
define symbol
no changes
no changes
- Changed service name validation in
Microservice Manager
to keep names unique
- Added
Services.Payments
which allows receipt verification. - Added
DeleteProtectedPlayerStats
andDeleteStats
methods toIMicroserviceStatsApi
.
- Manually adding a
StorageObject
Assembly Definition as a dependency of aMicroservice
's Assembly Definition now correctly sets up all the necessary Mongo DLLs for theStorageObject
to be usable inside the Microservice. You can disable this behaviour by settingMicroserviceConfiguration.EnsureMongoAssemblyDependencies = false
. The recommended way to do set service dependencies is still to use the Dependency button of the Microservice Manager Window.
BeamableRequestError
toRequestException
base type that can be used to catch exception from Microservice requests to Beamable.- A leaderboard can now be frozen using
Services.Leaderboards.FreezeLeaderboard
method to prevent additional scores to be submitted. - Microservice can include a
CsProjFragment.xml
file as a.csproj
<ItemGroup>
property block of nuget references that the microservice will use to resolve. - Added
GetAccountId
method toIMicroserviceAuthApi
that returns the requesting user's AccountId as opposed to their GamerTag.
- Publish doesn't fail if there is an unused StorageObject entry in the MicroserviceConfiguration
- Microservices reload route table after hot module reload code change.
- Microservices can accept
InventoryUpdateBuilder
and other types that include subclasses ofSerializableStringTo<T>
- Microservices stop stale containers before rebuilding.
- Microservices recognize build failure vs success correctly during local development.
- Deployed Microservices will restart if they fail to re-authenticate with Beamable
- Reference
dll
file no longer copies parent directory
- Microservices use the docker
-v
flag to specify bind mounts instead of--mount
. - Microservices may not be published as ARM images. Microservices will be forced to "linux/amd64" architecture.
- User can specify Microservices build and deploy CPU architecture.
RemovePlayerEntry
for leaderboards API which allows to remove given player from the leaderboard- Microservices have their initialization validated before publishing.
- Microservice archive/unarchive feature.
- Basic Chat SDK functions to Microservice
- The base docker image used for Microservices and Microstorages will be automatically pulled at startup.
- Client Generator logs go to the Microservice Window
- Send Microservice CPU architecture to Beamable Cloud
- Headers are available on the service
Context
for application version, unity version, game version, and Beamable sdk version
- local microservice logs will appear for dotnet watch command
- Microservices use a Nuget cache for faster development builds
- Microservices cache their
dotnet restore
output in the Docker cache for faster development builds - Microservices share a realm secret request for faster development builds
- Local microservices no longer output emoji characters from their
dotnet watch
command - Microservices only receive events for content updates
- Disabled Microservices no longer get built and published.
- Microservice related actions can run while Unity is a background process.
- Microservice clients created by using the default constructor will now keep working after the default
BeamContext
has been reset. - Local Microservices no longer say "could not find servicename:latest"
- Publish flow locks Asset Database so that no re-imports may happen.
- Publish screen loading bar should always be full when publish is complete.
- Fixed problems with unexited OS processes and high memory consumption for Docker during switch between EditMode and PlayMode.
- The "Play Selected" button in the Microservice window doesn't get stuck in a service is already running.
- Microservice selection is saved between domain reloads.
- Microservice paths can now contain spaces.
- Compile errors are reported as error logs
- Unused legacy code around "Auto Run Local Microservices" menu item
DisableAllBeamableEvents
option for theMicroserviceAttribute
. When enabled, prevents the Microservice from receiving any Beamable events, including content cache invalidations.
- Potential microservice issue that caused C#MSs to hang during initialization.
no changes
no changes
RemovePlayerEntry
for leaderboards API which allows to remove given player from the leaderboard
- Microservices may be built from either ARM or x86 based computers and uploaded to Beamable.
- Failed promises no longer log exception info after an exception handler is registered on the same execution cycle.
- "Connection is closed" log exception no longer prints incorrectly.
- Requests no longer attempt to send while authorization process is happening.
- Microservices now support private declarations of
Callable
methods. - Added log notifying users that Microservices don't currently support overloaded
Callable
.
- Microservices now properly log exceptions that happen during its initialization
- Microservice process commands now use the
BeamableDispatcher
instead of theEditorApplication.delayCall
. This allows you to background Unity during long running microservice actions. - Issue in Microservices re-auth flow that caused high CPU utilization unnecessarily
UnityEngine.Debug.LogFormat
now supported when used inside C#MS methods
- Socket re-authorization flow uses a spinlock mechanism instead of a mutex
- Socket re-connection waits for the socket to reconnect before yielding the task scheduler
- Fixed microservices build issue on Mac with ARM CPU architecture
- Microservices now correctly caches connection strings when
GetDatabase
is called on theIStorageObjectConnectionProvider
service. - Possible duplicate authorization requests.
- Messages sent during a re-connection event will be re-attempted 10 times before failing.
- Support for GUID based assembly references.
CallableAttribute
for exposing C#MS methods that are meant to be publicly accessible (without authentication required).ListLeaderboards
method toIMicroserviceLeaderboardsApi
will return lists of leaderboard ids.GetPlayerLeaderboards
method toIMicroserviceLeaderboardsApi
will return leaderboards for a given player.lbId
field to theLeaderboardView
response class.DisableDockerBuildkit
property to the MicroserviceConfiguration. By default, Docker buildkit will now be enabled.
- Client code can handle receiving a
ContentObject
response from aClientCallable
. - Removed Microstorage related null reference errors on Unity startup.
IMicroserviceNotificationsApi
can now send strings with spaces in them for messages.IMicroserviceLeaderboardsApi
will now respectHasValue
flag ofOptional<T>
derived types in all cases.- Fixed issue with Publish flow that caused an invalid Manifest data to exist when publishing any services along a service whose source code was no longer in the project
- Fixed issue that made it possible to start a remote service without its dependencies up and running (only happened in cases where the service was only remote --- ie: the source code for it was not present in the project)
- Building microservices will always pull the latest version of dependent alpine linux Docker base images.
ClientCallableAttribute
is now only accessible to authenticated users. For a fully public endpoint, useCallableAttribute
instead.- Microservices will be built specifically for linux/amd64 architecture. For developers with ARM based CPU architectures, enable to the
DockerBuildkit
setting in the Microservice Configuration to publish microservices. - Building a microservice will always stop the microservice and its source generator if they are running. After the build, the source generator will be reset.
EnableDockerBuildkit
property from the MicroserviceConfiguration. By default, Docker buildkit will now be enabled. Disable it again with the newDisableDockerBuildkit
field.
- Thrown
MicroserviceExceptions
from[ClientCallable]
methods will result in an appropriate error response.
no changes
- boolean types are now supported in swagger documentation
- Realm switch now triggers
Microservice Manager
to stop all active services. Guarantees the correct service version association with realm.
BeamServicesCodeWatcher
detects any change that makes it necessary to rebuild C#MS images as well as cleaning up Auto-Generated files whenever a C#MS AsmDef is deleted. This makes the easiest way to delete a C#MS's code from your project simply to delete it's folder.- Beam hint that warn users entering play-mode that there are stale services that must be rebuilt. Avoids wasting time when making quick changes to microservices and forgetting to regenerate the local image during development.
EnableAutoPrune
configuration setting that will remove old unused docker image layers. This should limit the disk space requirements of Beamable Microservices on developer machines.EnableHotModuleReload
configuration setting that will enable dotnet 6 hot module reloading for all Microservices.- Added
IMicroserviceNotificationApi
to list of services accessible fromClientCallable
andAdminOnlyCallable
methods of Microservices. These can be used for server-to-client communication. RiderDebugTools
configuration setting to preload Rider debugging tools onto Microservice development images
- When exiting Unity, all related Microservices and Microstorage containers are closed
- Microservice client code is generated in a dockerized dotnet runtime instead of Unity
- Added docstrings to
StatsService.SearchStats
to clarify correct usage of theCriteria
parameter. AssumeUser
takes an optional boolean parameter to disable the Admin access token check- Service name must be a valid C# class without culture-specific characters
- Updated Microservice Publish window UI/UX
- Fixed issue that caused the
ReflectionCache
to run an extra unnecessary time when a.cs
or.asmdef
file were changed. - Fixed issue on Re-Import All with
BeamableAssistantWindow
opened that required reopening the window for it to work. - Fixed issue that caused
StatsService.SearchStats
to fail whenever a match occurred. - Cannot create invalid service name before validation occurs
- Progress bar in publish window now correctly displays the progress of services publication
- Client code can handle receiving a
null
response from aClientCallable
no changes
This is a broken package. It includes changes from the 1.1.0 release. Please do not use this version.
no changes
no changes
no changes
no changes
- Windows Microservices first time build issue regarding empty build directories
StorageDocument
types are assigned ID values during replace operations- UI glitches in the Microservice Manager window
StorageDocument
base class for storage data classes that automatically handle document ID assignment.- Automatic Mongo serialization for basic Unity structs like
Vector2
,Color
, andQuaternion
- Automatically generate a client-server shared asmdef, and new Microservices automatically reference it
- Upgraded Microservices to dotnet 6.0 instead of 5.0
- Microstorage is out of Preview. Storage Objects can now be published and used in a remote environment.
- Microstroage
GetCollection
method must now take subclass ofStorageDocument
- Return values from
ClientCallable
methods are serialized using Unity style serialization - Microservice Publish window has improved performance and User Experience
- Swagger docs handle generic types instead of failing to load
- C#MS Log View stay attached to the bottom of the scroller
- Typless
Promise
inClientCallable
methods - Autogenerated client code errors for generic class and arrays.
- Support for returning
Promise
fromClientCallable
method
- Autogenerated client code null reference exception and list errors.
ApiContent
classes and execution methods allow you to invoke microservices with dataInitializeServicesAttribute
can now be used over static methods to declare initialization hooks in microservices. Supported signatures are async/regularTask(IServiceInitializer)
, async/regularPromise<Unit>(IServiceInitializer)
and synchronousvoid(IServiceInitializer)
.void
methods must be fully synchronous --- it is not possible to guarantee that any promises started within avoid
initialization method will have completed by the time the microservice is receiving traffic.- Exposed
CreateLeaderboard
methods inIMicroserviceLeaderboardsApi
to enable the dynamic creation of leaderboards in microservices (can take aLeaderboardRef
as a template or explicit parameters). - Folding/Unfolding services cards in
Microservice Manager
- Added clearer unsupported message for microservice's implementation of
IAuthService.GetUser(TokenResponse)
- Added support for
Dictionary
serialization inClientCallable
methods usingSmallerJSON
- Renamed
build and run
toplay
buttons inMicroservice Manager
to be more intuitive - Can have multiple
ConfigureServicesAttribute
andInitializeServicesAttribute
explicitly ordered viaExecutionOrder
property of the attributes.
- Publish loading bars
- Add
IMicroserviceStatsApi.GetAllProtectedPlayerStats
method without filtering stats
- Filters now work for
IMicroserviceStatsApi.GetProtectedPlayerStats
- Store Microservice window height between reloads
- Serialization support for
Vetor2Int
andVector3Int
as input parameters toClientCallable
methods - Serialization support for raw JSON strings as input parameters to
ClientCallable
methods
- no changes
- Local Mongo Storage Preview
- Ability to use Promises as a return type for
ClientCallable
methods - RemoteOnly Microservices visible in Miscroservice window
- Deployed Microservice instances will be automatically re-run if they become unhealthy
- Microservice clients can now deserialize Json lists
- Microservice log view stays focused on bottom of log feed
- Generated services no longer include the class name in the namespace
- New Microservices Manager window
- Local microservice health checks are accessible on container port 6565
- Snyk testing for microservices
- Ability to categorize
[ClientCallable]
methods in documentation with[SwaggerCategory]
- Beamable Platform errors all extend from
RequesterException
in Unity Client and microservice code
- Visual Studio Code debug configuration source maps are now correct
AssumeUser()
no longer throws null reference
- Commerce Service AccelerateListingCooldown support to reduce the cooldown on a listing
- JSON Serialization error in Stats API
AssumeUser()
no longer throws null reference
- Namespace declarations starting with Editor, and removed un-used class PopupBtn
- no changes
- Dependency Injection system
- ISerializationCallbackReceiver for request and response objects used in
[ClientCallable]
methods - Custom routing prefix setting in
MicroserviceConfiguration
- Added a difference check at Microservice Deployment time, so that microservices that have not changed are not reuploaded.
- Added a RealmConfig service to available Services. This can be used to read protected realm settings.
- Changed response serialization from Microservice. Use UseLegacySerialization to maintain old behaviour.
- Added a cache for content fetches.
- Added Doc Url to package.json.
- Added Open API 3.0 auto-generative documentation.
- Added AdminOnlyCallable version of ClientCallable that requires caller to have full scopes.
- Added requiredScopes field to ClientCallable that requires caller to have required scopes.
- Fixes leaderboard and stat fetching cache errors.
- Fixes null reference bug when passing null to [ClientCallable] arrays.