Compze.DbPool.ServiceClient 0.18.0-alpha

Prefix Reserved
This is a prerelease version of Compze.DbPool.ServiceClient.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Compze.DbPool.ServiceClient --version 0.18.0-alpha
                    
NuGet\Install-Package Compze.DbPool.ServiceClient -Version 0.18.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.DbPool.ServiceClient" Version="0.18.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Compze.DbPool.ServiceClient" Version="0.18.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Compze.DbPool.ServiceClient" />
                    
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.DbPool.ServiceClient --version 0.18.0-alpha
                    
#r "nuget: Compze.DbPool.ServiceClient, 0.18.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.DbPool.ServiceClient@0.18.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.DbPool.ServiceClient&version=0.18.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Compze.DbPool.ServiceClient&version=0.18.0-alpha&prerelease
                    
Install as a Cake Tool

Compze.DbPool.ServiceClient

How the PostgreSQL, MySQL and SQL Server providers of Compze.DbPool reserve their databases from a DbPool service. Take a dependency on the provider of your engine, such as Compze.DbPool.PostgreSql, rather than on this package: its one public type is the exception below.

Where the service is

A test project names the machine its service runs on, and the port the service listens at, in the build property CompzeDbPoolService: in its project file, or in a Directory.Build.props for every project of a repository.

<PropertyGroup>
  <CompzeDbPoolService>192.168.0.11:7531</CompzeDbPoolService>
</PropertyGroup>

This package's build file puts the setting in the project's runtimeconfig.json, so it goes wherever the test assembly goes, and a test project that references the package through a provider gets it too. Without it, the tests look for a service on their own machine, at port 7531. A setting that isn't host:port fails the pool's creation, naming where it came from.

A setting committed to a repository applies on every machine that builds it, CI's too. Where CI runs a service of its own, set it only outside CI, such as with Condition="'$(GITHUB_ACTIONS)' != 'true'" on the property, or in a file each developer keeps out of git, imported from Directory.Build.props.

When no service is found on the test's own machine and one is installed there, as the Windows service or the scheduled task Compze.DbPool.Service, the message says how to start it.

When there is no service

The first time a process looks for the service, a reservation that finds none fails within a few seconds with DbPoolServiceNotFoundException: at once when the machine's name doesn't resolve, nothing listens at the address, or what answers there is no DbPool service of this version, and after 5 seconds when nothing answers the connect. The message says which, and how to start a service. Catch it to tell your own users how to start the service you use. Once the process has found the service, it waits 30 seconds for one that restarts.

The protocol

A pool and its service talk over TCP: a connection for each request, which carries the request and the service's answer, each a JSON message after its length. Each request names its protocol version, and a client and a service of different versions refuse each other, saying so: upgrade this package and the service together. The synchronous reservation, as a test's first ConnectionStringFor, needs no thread-pool thread at all: it connects, writes and reads with blocking sockets, whose own timeouts end a wait for a service that stops answering.

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 (3)

Showing the top 3 NuGet packages that depend on Compze.DbPool.ServiceClient:

Package Downloads
Compze.DbPool.MicrosoftSql

Empty SQL Server databases on demand for integration testing etc.

Compze.DbPool.MySql

Empty MySQL databases on demand for integration testing etc.

Compze.DbPool.PostgreSql

PostgreSQL database pool support for Compze integration testing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.19.0-alpha 0 12/5/2026
0.18.1-alpha 0 12/5/2026
0.18.0-alpha 0 12/5/2026
0.17.1-alpha 0 12/5/2026
0.17.0-alpha 0 12/5/2026
0.16.0-alpha 0 12/5/2026
0.15.1-alpha 0 12/5/2026
0.15.0-alpha 0 12/5/2026
0.14.0-alpha 0 12/5/2026
0.7.2-alpha 7 12/5/2026
0.7.1-alpha 38 12/5/2026
0.7.0-alpha 89 12/5/2026
0.6.0-alpha 61 12/5/2026
0.5.1-alpha 59 12/5/2026
0.5.0-alpha 56 12/4/2026
0.4.0-alpha 51 12/4/2026
0.3.2-alpha 73 12/4/2026
0.3.1-alpha 83 12/4/2026
0.3.0-alpha 53 12/4/2026
0.2.3-alpha 56 12/4/2026
Loading failed