Compze.Teventive.MemoryImageStateStore.MemoryPack 0.1.0-alpha

This is a prerelease version of Compze.Teventive.MemoryImageStateStore.MemoryPack.
dotnet add package Compze.Teventive.MemoryImageStateStore.MemoryPack --version 0.1.0-alpha
                    
NuGet\Install-Package Compze.Teventive.MemoryImageStateStore.MemoryPack -Version 0.1.0-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Compze.Teventive.MemoryImageStateStore.MemoryPack" Version="0.1.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Compze.Teventive.MemoryImageStateStore.MemoryPack" Version="0.1.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Compze.Teventive.MemoryImageStateStore.MemoryPack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Compze.Teventive.MemoryImageStateStore.MemoryPack --version 0.1.0-alpha
                    
#r "nuget: Compze.Teventive.MemoryImageStateStore.MemoryPack, 0.1.0-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Compze.Teventive.MemoryImageStateStore.MemoryPack@0.1.0-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Compze.Teventive.MemoryImageStateStore.MemoryPack&version=0.1.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Compze.Teventive.MemoryImageStateStore.MemoryPack&version=0.1.0-alpha&prerelease
                    
Install as a Cake Tool

Compze.Teventive.MemoryImageStateStore.MemoryPack

A MemoryPack cache for the JSON files of Compze's memory image state store, so that a memory image state store kept in files starts fast.

What is Compze?

Compze is a .NET framework for building expressive domains through Teventive programming and Typermedia APIs. Learn more

What's in this package?

  • StartingFromAMemoryPackCache() — declared with a store's files, files.StartingFromAMemoryPackCache().FolderOf<VocabNote>("vocab"), it has the store start from a cache of the snapshots its files held at an earlier start. The store then reads only the files that are new, or whose length or last write time changed since, and drops those that are gone.
  • A cache for each class, kept in the store's own folder and written whole after a start that read any file or found one gone.
  • A changed snapshot type is caught: the cache records a fingerprint of the snapshot type's fields, and a cache written for another shape of the type is not used.

Each class's snapshot type must be one MemoryPack serializes, such as a [MemoryPackable] class.

Package Description
Compze.Teventive.MemoryImageStateStore The memory image state store, and its JSON files

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha 77 11/19/2026

- **A MemoryPack cache for a memory image state store kept in JSON files,** declared with `files.StartingFromAMemoryPackCache().FolderOf<TTaggregate>(folder)`, so the store starts without reading every file.
 - A cache file for each class, in the store's own folder, holds each file's path, length and last write time with the snapshot it held. At the next start, a file whose length and last write time are unchanged takes its snapshot from the cache. A new or changed file is read, and a gone one is dropped.
 - The cache is written after a start that read any file or found one gone, whole, under a temporary name and renamed. Commits don't write it: the files a commit wrote are read at the next start.
 - A cache written for another shape of a class's snapshot type isn't used: it records a fingerprint of the type's instance fields, and of the types reachable through them, and the start reads every file of the class and writes the cache anew. MemoryPack reads by position, so such a cache could otherwise read back wrong values without failing.
 - A cache that can't be read fails the start, naming it. Deleting it gives a start that reads every file.
 - Each class's snapshot type must be one MemoryPack serializes, such as a `[MemoryPackable]` class: asserted where the store is composed.