Jinaga 1.0.6-g3fd5de50a5

This is a prerelease version of Jinaga.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Jinaga --version 1.0.6-g3fd5de50a5                
NuGet\Install-Package Jinaga -Version 1.0.6-g3fd5de50a5                
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="Jinaga" Version="1.0.6-g3fd5de50a5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jinaga --version 1.0.6-g3fd5de50a5                
#r "nuget: Jinaga, 1.0.6-g3fd5de50a5"                
#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.
// Install Jinaga as a Cake Addin
#addin nuget:?package=Jinaga&version=1.0.6-g3fd5de50a5&prerelease

// Install Jinaga as a Cake Tool
#tool nuget:?package=Jinaga&version=1.0.6-g3fd5de50a5&prerelease                

Jinaga.NET

Resilient, reliable data transfer for .NET.

What it Does

In Jinaga, you define a data model in terms of immutable facts. A fact represents an entity, a change to an entity, or a decision that a user or service has made.

In Jinaga.NET, facts are C# records.:

[FactType("Corporate.Company")]
record Company(string identifier) {}

[FactType("Corporate.Employee")]
record Employee(Company company, int employeeNumber) {}

When a user or service makes a decision, you will add a fact to the system. This will store it in the local database. It will also update the local UI. And it will publish it so that others can learn about the decision.

var contoso = await j.Fact(new Company("Contoso"));
var jane = await j.Fact(new Employee(contoso, 1));
var bob = await j.Fact(new Employee(contoso, 2));

To query facts, write a specification. Start at a know fact and find all related facts that match that specification.

var employeesOfCompany = Given<Company>.Match((company, facts) =>
    from employee in facts.OfType<Employee>()
    where employee.company == company
    select employee
);

var contosoEmployees = await j.Query(contoso, employeesOfCompany);

A query returns results at a point in time. If you want to keep a user interface up-to-date, you will need to set up an event-based watch.

var observer = j.Watch(contoso, employeesOfCompany, employee =>
{
    var component = AddEmployeeComponent(employee);
    return () =>
    {
        RemoveEmployeeComponent(component);
    };
});

Finally, if you want to be notified in real time of new information, just change Watch to Subscribe.

var subscription = j.Subscribe(contoso, employeesOfCompany, employee =>
{
    var component = AddEmployeeComponent(employee);
    return () =>
    {
        RemoveEmployeeComponent(component);
    };
});

The client will open a persistent connection with the server. The server will notify the client the moment a new employee is hired. Because the client already set up a watch, the new employee will appear on the UI.

Running a Replicator

A Jinaga front end connects to a device called a Replicator. The Jinaga Replicator is a single machine in a network. It stores and shares facts. To get started, create a Replicator of your very own using Docker.

docker pull jinaga/jinaga-replicator
docker create --name my-replicator -p8080:8080 jinaga/jinaga-replicator
docker start my-replicator

This creates and starts a new container called my-replicator. The container is listening at port 8080 for commands. Configure Jinaga to use the replicator:

var j = JinagaClient.Create(options =>
{
    options.HttpEndpoint = new Uri("http://localhost:8080/jinaga");
});

Roadmap

Jinaga.NET is co-evolving with Jinaga.JS. Each of these projects has a front end and a back end. Either front end is intended to work with either back end. And the back ends are intended to interconnect to form a decision substrate.

Jinaga Roadmap

Storage

Jiaga.NET currently has support for SQLite and memory storage. The next storage solution to implement is PostgreSQL to support Docker deployment. After that, the MS SQL Server implementation will support enterprise solutions that need to keep the journal transactionally consistent with the projection.

Release

This repository uses Nerdbank.GitVersioning to manage version numbers. To release a new version of the Jinaga.NET library, create a new release in the format yyyymmdd.i. For example, 20240917.1. All of the packages will be versioned separately. Their version numbers will not be updated if they have not changed. The packages will be published to NuGet.

To accomplish this from the command line, use the following gh command.

gh release create 20240917.1 --generate-notes
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Jinaga:

Package Downloads
Jinaga.UnitTest

Support for unit testing Jinaga applications. Data management for web and mobile applications. Connect your client to a replicator to replace your hand-written API and database. Jinaga supports occasionally connected clients with local storage in SQLite.

Jinaga.Graphviz

Generates visualizations of Jinaga facts and types. For use wihtin .NET Interactive Notebooks. Data management for web and mobile applications. Connect your client to a replicator to replace your hand-written API and database. Jinaga supports occasionally connected clients with local storage in SQLite.

Jinaga.Store.SQLite

SQLite storage for Jinaga applications. Data management for web and mobile applications. Connect your client to a replicator to replace your hand-written API and database. Jinaga supports occasionally connected clients with local storage in SQLite.

Jinaga.Notebooks

Generates visualizations of Jinaga facts and types. For use wihtin .NET Interactive Notebooks. Data management for web and mobile applications. Connect your client to a replicator to replace your hand-written API and database. Jinaga supports occasionally connected clients with local storage in SQLite.

Jinaga.Maui

Data management for web and mobile applications. Connect your client to a replicator to replace your hand-written API and database. Jinaga supports occasionally connected clients with local storage in SQLite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.2 49 12/25/2024
1.0.34 97 11/28/2024
1.0.15 107 10/27/2024
1.0.6 150 9/17/2024
1.0.6-g3fd5de50a5 108 9/20/2024
1.0.0 224 7/16/2024
0.12.8 176 7/14/2024
0.12.7 157 7/14/2024
0.12.6 181 7/13/2024
0.12.5 225 7/7/2024
0.12.4 212 7/6/2024
0.12.3 202 7/3/2024
0.12.2 189 6/29/2024
0.12.1 156 6/9/2024
0.12.0 217 5/26/2024
0.11.18 196 5/18/2024
0.11.17 228 4/19/2024
0.11.16 193 4/14/2024
0.11.15 206 4/9/2024
0.11.14 172 4/7/2024
0.11.13 193 4/7/2024
0.11.12 185 4/7/2024
0.11.11 202 4/1/2024
0.11.10 210 3/31/2024
0.11.9 199 3/30/2024
0.11.8 188 3/30/2024
0.11.7 205 3/29/2024
0.11.6 193 3/24/2024
0.11.5 217 3/13/2024
0.11.4 270 3/6/2024
0.11.3 267 3/1/2024
0.11.2 220 2/29/2024
0.11.1 246 2/19/2024
0.11.0 214 2/16/2024
0.10.1 263 2/15/2024
0.10.0 278 2/11/2024
0.9.7 271 2/10/2024
0.9.6 257 2/8/2024
0.9.5 274 2/2/2024
0.9.4 237 2/1/2024
0.9.3 248 1/31/2024
0.9.2 261 1/24/2024
0.9.1 304 1/20/2024
0.9.0 281 1/19/2024
0.8.4 502 11/17/2023
0.8.3 385 11/11/2023
0.8.2 344 11/2/2023
0.8.1 359 11/1/2023
0.8.0 197 10/23/2023
0.7.2 347 10/19/2023
0.7.1 354 9/21/2023
0.7.0 374 9/12/2023
0.6.5 432 8/29/2023
0.6.4 418 8/26/2023
0.6.3 355 8/26/2023
0.6.2 422 8/19/2023
0.6.1 395 8/19/2023
0.6.0 366 8/17/2023
0.5.1 401 8/16/2023
0.5.0 398 8/12/2023
0.4.0 443 5/28/2023
0.3.0 600 2/12/2023
0.2.109 708 2/5/2023
0.2.108 932 10/18/2022
0.2.107 995 10/15/2022
0.2.106 1,035 10/12/2022
0.2.105 989 10/11/2022
0.2.104 1,010 9/25/2022
0.2.103 1,051 9/25/2022
0.2.98 1,047 9/25/2022
0.2.97 1,034 9/25/2022
0.2.24 719 11/30/2021
0.2.23 736 11/27/2021
0.2.22 2,414 11/27/2021
0.2.21 3,295 11/25/2021
0.2.20 838 11/12/2021
0.2.19 742 11/11/2021
0.2.15 768 11/9/2021
0.2.13 768 11/8/2021
0.2.3 834 11/4/2021
0.2.1 787 11/3/2021
0.2.0 815 11/1/2021
0.1.1 824 9/26/2021
0.1.0 875 9/26/2021