Skip to content

Commit

Permalink
[WIP] Serialization (#34)
Browse files Browse the repository at this point in the history
* fix session joining

Users can now join / leave drawing sessions correctly

* adding unit tests

* added Protobuf definition

* enable Protobuf compiler

* defined all `ToBinary` methods

* finished serializer implementation

* validated that we can serialize session state correctly

* fixed serialization for DrawingActivityUpdate
  • Loading branch information
Aaronontheweb authored May 7, 2024
1 parent 00c0eb0 commit 875df20
Show file tree
Hide file tree
Showing 13 changed files with 737 additions and 11 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageVersion Include="Akka.Persistence.Sql.Hosting" Version="1.5.13" />
<PackageVersion Include="Akka.Streams" Version="1.5.20" />
<PackageVersion Include="Akka.Streams.TestKit" Version="1.5.20" />
<PackageVersion Include="Grpc.Tools" Version="2.63.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
<PackageVersion Include="MudBlazor" Version="6.19.1" />
</ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions DrawTogether.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawTogether.Entities", "sr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawTogether.Actors", "src\DrawTogether.Actors\DrawTogether.Actors.csproj", "{5863DD74-00DE-4DE9-9F0A-FCBC32195E78}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawTogether.Tests", "src\DrawTogether.Tests\DrawTogether.Tests.csproj", "{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -109,6 +111,18 @@ Global
{5863DD74-00DE-4DE9-9F0A-FCBC32195E78}.Release|x64.Build.0 = Release|Any CPU
{5863DD74-00DE-4DE9-9F0A-FCBC32195E78}.Release|x86.ActiveCfg = Release|Any CPU
{5863DD74-00DE-4DE9-9F0A-FCBC32195E78}.Release|x86.Build.0 = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|x64.ActiveCfg = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|x64.Build.0 = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|x86.ActiveCfg = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Debug|x86.Build.0 = Debug|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|Any CPU.Build.0 = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|x64.ActiveCfg = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|x64.Build.0 = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|x86.ActiveCfg = Release|Any CPU
{78CAFA4F-0DBC-45F7-8794-48785FDFDD47}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 8 additions & 0 deletions src/DrawTogether.Actors/DrawTogether.Actors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@
<ItemGroup>
<PackageReference Include="Akka.Cluster.Hosting" />
<PackageReference Include="Akka.Streams" />
<PackageReference Include="Grpc.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DrawTogether.Entities\DrawTogether.Entities.csproj" />
</ItemGroup>

<ItemGroup>
<Protobuf Include="Serialization\Proto\DrawingProtocol.proto" GrpcServices="None" />
</ItemGroup>

</Project>
Loading

0 comments on commit 875df20

Please sign in to comment.