Coder Social home page Coder Social logo

sqlstreamstore.docker's Introduction

SQL Stream Store CI release license code size docs status

โš ๏ธ These libraries are no longer actively maintained.

A stream store library for .NET that specifically targets SQL based implementations. Primarily used to implement Event Sourced applications.

Package Install
SqlStreamStore (includes in-memory version for behaviour testing) NuGet
MS SQL Server / Azure SQL Database NuGet
PostgreSQL / AWS Aurora NuGet
MySQL / AWS Aurora NuGet
Sqlite up for grabs
HTTP Wrapper API On CI Feed
Schema Creation Script Tool NuGet

CI Packages available on Feedz.

Design considerations:

  • Designed to only ever support RDMBS/SQL implementations.
  • Subscriptions are eventually consistent.
  • API is influenced by (but not compatible with) EventStore.
  • Async only.
  • JSON only event and metadata payloads (usually just a string / varchar / etc).
  • No support for System.Transaction, enforcing the concept of the stream as the consistency and transaction boundary.

Building

Building requires Docker. Solution and tests are run on a linux container with .NET Core leveraging SQL Server, Postgres and MySQL as sibling containers.

  • Windows, run .\build.cmd
  • Linux, run ./build.sh

Note: build does not work via WSL.

Help & Support

Ask questions in the #sql-stream-store channel in the ddd-cqrs-es slack workspace. (Join here).

Licences

Licenced under MIT.

sqlstreamstore.docker's People

Contributors

adamralph avatar damianh avatar dependabot-support avatar martijnburgers avatar mat-mcloughlin avatar michael-freidgeim-webjet avatar mjmcloug avatar thefringeninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sqlstreamstore.docker's Issues

Cannot build when following the development instructions

  • ./build.sh or ./build.cmd to run the complete dockerized build.

This fails:

output
C:\code\.downstream\SQLStreamStore.HAL>docker build .
Sending build context to Docker daemon   1.37MB
Step 1/26 : FROM microsoft/dotnet:2.1.500-sdk-alpine3.7 AS build
 ---> 4d4ac1c1c5f3
Step 2/26 : ARG MYGET_API_KEY
 ---> Running in 7a8b3af2c97c
Removing intermediate container 7a8b3af2c97c
 ---> 178bccc0f5e2
Step 3/26 : WORKDIR /app
 ---> Running in 7c50e1ba317c
Removing intermediate container 7c50e1ba317c
 ---> b630582e1f0b
Step 4/26 : COPY .git ./
 ---> a1c5a8c8705e
Step 5/26 : RUN apk add --no-cache   nodejs   yarn   libcurl &&   dotnet tool install -g minver-cli --version 1.0.0-alpha.15 &&   /root/.dotnet/tools/minver > .version
 ---> Running in b966f3b292a4
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/8) Installing libssh2 (1.8.0-r2)
(2/8) Installing libcurl (7.61.1-r1)
(3/8) Installing nodejs-npm (8.9.3-r1)
(4/8) Installing c-ares (1.13.0-r0)
(5/8) Installing http-parser (2.7.1-r1)
(6/8) Installing libuv (1.17.0-r0)
(7/8) Installing nodejs (8.9.3-r1)
(8/8) Installing yarn (1.3.2-r0)
Executing busybox-1.27.2-r11.trigger
OK: 101 MiB in 36 packages
Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/root/.dotnet/tools"
EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/root/.dotnet/tools"

You can invoke the tool using the following command: minver
Tool 'minver-cli' (version '1.0.0-alpha.15') was successfully installed.
MinVer: Using { Commit: b59e533, Tag: '1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 12 }.
Removing intermediate container b966f3b292a4
 ---> f15030cb02ac
Step 6/26 : WORKDIR /app/src
 ---> Running in 0e77f54f9fc3
Removing intermediate container 0e77f54f9fc3
 ---> cd044f20df66
Step 7/26 : COPY ./src/*.sln ./
 ---> 0b0bf2b240ef
Step 8/26 : COPY ./src/*/*.csproj ./
 ---> 64e89d273473
Step 9/26 : RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done
 ---> Running in ed0b8a596039
Removing intermediate container ed0b8a596039
 ---> 571c8f649110
Step 10/26 : COPY ./NuGet.Config ./
 ---> 2525110e6f97
Step 11/26 : RUN dotnet restore --runtime=alpine.3.7-x64
 ---> Running in 9e222fb70f1c
  Restoring packages for /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj...
  Restoring packages for /app/src/LittleHalHost.Example/LittleHalHost.Example.csproj...
  Installing System.Runtime.CompilerServices.Unsafe 4.4.0.
  Installing Microsoft.AspNetCore.Http.Features 2.0.0.
  Installing System.Text.Encodings.Web 4.4.0.
  Installing Microsoft.Extensions.Primitives 2.0.0.
  Installing Microsoft.AspNetCore.Connections.Abstractions 2.1.3.
  Installing System.Collections.NonGeneric 4.0.1.
  Installing Microsoft.AspNetCore.Hosting.Server.Abstractions 2.0.0.
  Installing Microsoft.AspNetCore.Http.Abstractions 2.0.0.
  Installing Microsoft.Extensions.Configuration.Abstractions 2.0.0.
  Installing Microsoft.Extensions.FileProviders.Abstractions 2.0.0.
  Installing Microsoft.Extensions.Hosting.Abstractions 2.0.0.
  Installing Microsoft.Extensions.Options 2.0.0.
  Installing Microsoft.Extensions.Logging.Abstractions 2.0.0.
  Installing Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0.
  Installing Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions 2.1.3.
  Installing Tavis.UriTemplates 1.1.0.
  Installing System.IO.Pipelines 4.5.1.
  Installing Microsoft.AspNetCore.Server.Kestrel 2.1.3.
  Installing Serilog.Sinks.Console 3.1.1.
  Installing Serilog.AspNetCore 2.1.1.
  Installing Halcyon 2.5.1.
  Installing SqlStreamStore 1.2.0-beta.1.3.
  Installing Microsoft.AspNetCore.Server.Kestrel.Https 2.1.3.
  Installing Microsoft.AspNetCore.Server.Kestrel.Core 2.1.3.
  Installing Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets 2.1.3.
  Installing Serilog.Extensions.Logging 2.0.0.
  Installing Microsoft.Extensions.DependencyInjection 2.0.0.
  Installing Microsoft.Extensions.Logging 2.0.0.
  Installing Microsoft.AspNetCore.Hosting.Abstractions 2.0.0.
  Installing Serilog 2.5.0.
  Installing Microsoft.NETCore.DotNetAppHost 2.1.6.
  Installing System.Threading.Tasks.Extensions 4.5.0.
  Installing Microsoft.NETCore.DotNetHostResolver 2.1.6.
  Installing Npgsql 4.0.2.
  Installing Microsoft.NETCore.DotNetHostPolicy 2.1.6.
  Installing Microsoft.NETCore.Targets 2.0.0.
  Installing Microsoft.NETCore.App 2.1.6.
  Installing SqlStreamStore.MsSql 1.2.0-build00255.
  Installing Microsoft.NETCore.Platforms 2.1.2.
  Installing SqlStreamStore.Postgres 1.2.0-build00255.
  Installing ILLink.Tasks 0.1.5-preview-1841731.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost 2.1.0.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver 2.1.0.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy 2.1.0.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.App 2.1.0.
  Generating MSBuild file /app/src/LittleHalHost.Example/obj/LittleHalHost.Example.csproj.nuget.g.props.
  Generating MSBuild file /app/src/LittleHalHost.Example/obj/LittleHalHost.Example.csproj.nuget.g.targets.
  Restore completed in 7.09 sec for /app/src/LittleHalHost.Example/LittleHalHost.Example.csproj.
  Restoring packages for /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj...
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost 2.1.6.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver 2.1.6.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy 2.1.6.
  Installing runtime.linux-musl-x64.Microsoft.NETCore.App 2.1.6.
/app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102: Unable to find package SqlStreamStore with version (>= 1.2.0-build00255) [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102:   - Found 26 version(s) in nuget.org [ Nearest version: 1.1.3 ] [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102:   - Found 3 version(s) in sql-stream-store [ Nearest version: 1.2.0-beta.1.3 ] [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj : error NU1102:   - Found 0 version(s) in dotnet-core [/app/src/SqlStreamStore.HAL.sln]
  Generating MSBuild file /app/src/SqlStreamStore.HAL.ApplicationServer/obj/SqlStreamStore.HAL.ApplicationServer.csproj.nuget.g.props.
  Generating MSBuild file /app/src/SqlStreamStore.HAL.ApplicationServer/obj/SqlStreamStore.HAL.ApplicationServer.csproj.nuget.g.targets.
  Restore failed in 13.98 sec for /app/src/SqlStreamStore.HAL.ApplicationServer/SqlStreamStore.HAL.ApplicationServer.csproj.
  Restoring packages for /app/src/SqlStreamStore.HAL.Tests/SqlStreamStore.HAL.Tests.csproj...
/app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102: Unable to find package SqlStreamStore with version (>= 1.2.0-build00255) [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102:   - Found 26 version(s) in nuget.org [ Nearest version: 1.1.3 ] [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102:   - Found 3 version(s) in sql-stream-store [ Nearest version: 1.2.0-beta.1.3 ] [/app/src/SqlStreamStore.HAL.sln]
/app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj : error NU1102:   - Found 0 version(s) in dotnet-core [/app/src/SqlStreamStore.HAL.sln]
  Generating MSBuild file /app/src/SqlStreamStore.HAL.DevServer/obj/SqlStreamStore.HAL.DevServer.csproj.nuget.g.props.
  Generating MSBuild file /app/src/SqlStreamStore.HAL.DevServer/obj/SqlStreamStore.HAL.DevServer.csproj.nuget.g.targets.
  Restore failed in 11.23 sec for /app/src/SqlStreamStore.HAL.DevServer/SqlStreamStore.HAL.DevServer.csproj.
  Restoring packages for /app/src/SqlStreamStore.HAL/SqlStreamStore.HAL.csproj...
  Installing System.Buffers 4.4.0.
  Installing System.Numerics.Vectors 4.4.0.
  Installing Microsoft.CSharp 4.4.0.
  Installing LibLog 5.0.2.
  Generating MSBuild file /app/src/SqlStreamStore.HAL/obj/SqlStreamStore.HAL.csproj.nuget.g.props.
  Generating MSBuild file /app/src/SqlStreamStore.HAL/obj/SqlStreamStore.HAL.csproj.nuget.g.targets.
  Restore completed in 1.69 sec for /app/src/SqlStreamStore.HAL/SqlStreamStore.HAL.csproj.
  Installing Microsoft.Win32.Registry 4.0.0.
  Installing System.Threading.ThreadPool 4.0.10.
  Installing System.Collections.Immutable 1.2.0.
  Installing System.ComponentModel.Primitives 4.1.0.
  Installing System.ComponentModel 4.0.1.
  Installing System.Collections.Specialized 4.0.1.
  Installing System.Xml.XPath 4.0.1.
  Installing System.Diagnostics.Process 4.1.0.
  Installing System.Reflection.Metadata 1.3.0.
  Installing System.Diagnostics.TraceSource 4.0.0.
  Installing System.ComponentModel.TypeConverter 4.1.0.
  Installing System.Threading.Thread 4.0.0.
  Installing System.Diagnostics.TextWriterTraceListener 4.0.0.
  Installing System.Runtime.Loader 4.0.0.
  Installing System.Xml.XPath.XmlDocument 4.0.1.
  Installing System.ComponentModel.EventBasedAsync 4.0.11.
  Installing xunit.runner.visualstudio 2.4.0.
  Installing Microsoft.DotNet.PlatformAbstractions 1.0.3.
  Installing Microsoft.AspNetCore.TestHost 2.1.1.
  Installing Shouldly 3.0.0.
  Installing xunit 2.4.0.
  Installing Microsoft.NET.Test.Sdk 15.8.0.
  Installing xunit.abstractions 2.0.2.
  Installing xunit.analyzers 0.10.0.
  Installing xunit.assert 2.4.0.
  Installing xunit.core 2.4.0.
  Installing Microsoft.CodeCoverage 15.8.0.
  Installing Microsoft.TestPlatform.TestHost 15.8.0.
  Installing xunit.extensibility.execution 2.4.0.
  Installing xunit.extensibility.core 2.4.0.
  Installing Microsoft.Extensions.DependencyModel 1.0.3.
  Installing Microsoft.TestPlatform.ObjectModel 15.8.0.
  Generating MSBuild file /app/src/SqlStreamStore.HAL.Tests/obj/SqlStreamStore.HAL.Tests.csproj.nuget.g.props.
  Generating MSBuild file /app/src/SqlStreamStore.HAL.Tests/obj/SqlStreamStore.HAL.Tests.csproj.nuget.g.targets.
  Restore completed in 17.31 sec for /app/src/SqlStreamStore.HAL.Tests/SqlStreamStore.HAL.Tests.csproj.
The command '/bin/sh -c dotnet restore --runtime=alpine.3.7-x64' returned a non-zero code: 1

  • dotnet run --project build/build.csproj to build without using docker.

This also fails, but I guess it's just a case of stating the prerequisites somewhere:

output
Bullseye: Starting... (default) (parallel)
Bullseye/Clean: Starting...
Bullseye/Init: Starting...
Bullseye/Clean: Succeeded. (7.53 ms)
Working directory: ./docs
cmd /c yarn
'yarn' is not recognized as an internal or external command,
operable program or batch file.
Bullseye/Init: Failed! The process exited with code 1. (28.5 ms)
Bullseye: Failed! (default) (parallel) (54.5 ms)

Unhandled Exception: System.Exception: The process exited with code 1.
   at SimpleExec.ProcessExtensions.Throw(Process process) in C:\projects\simple-exec\SimpleExec\ProcessExtensions.cs:line 36
   at SimpleExec.Command.Run(String name, String args, String workingDirectory, Boolean noEcho) in C:\projects\simple-exec\SimpleExec\Command.cs:line 17
   at Program.Yarn(String workingDirectory, String args) in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 132
   at Program.<>c.<.cctor>b__14_0() in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 73
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at Bullseye.Internal.ActionTarget.RunAsync(Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\ActionTarget.cs:line 25
   at Bullseye.Internal.ActionTarget.RunAsync(Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\ActionTarget.cs:line 31
   at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 83
   at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70
   at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70
   at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70
   at Bullseye.Internal.TargetCollection.RunAsync(String name, List`1 explicitTargets, Boolean skipDependencies, Boolean dryRun, Boolean parallel, ConcurrentDictionary`2 targetsRan, Logger log, Stack`1 targets) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 70
   at Bullseye.Internal.TargetCollection.RunAsync(List`1 names, Boolean skipDependencies, Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 34
   at Bullseye.Internal.TargetCollection.RunAsync(List`1 names, Boolean skipDependencies, Boolean dryRun, Boolean parallel, Logger log) in C:\projects\bullseye\Bullseye\Internal\TargetCollection.cs:line 47
   at Bullseye.Internal.TargetCollectionExtensions.RunAsync(TargetCollection targets, List`1 args, IConsole console) in C:\projects\bullseye\Bullseye\Internal\TargetCollectionExtensions.cs:line 171
   at Bullseye.Targets.RunTargets(IEnumerable`1 args) in C:\projects\bullseye\Bullseye\Targets.Sync.cs:line 26
   at Program.Main(String[] args) in C:\code\.downstream\SQLStreamStore.HAL\build\Program.cs:line 70

Implement List Streams

See SQLStreamStore/SQLStreamStore#141

{
  "href": "stream/browser?{prefix}",
  "rel": "streamStore:feed-list",
  "templated": true
}
GET /stream/browser?prefix=stream HTTP/1.1
accept: application/hal+json
HTTP/1.1 200 OK
content-type: application/hal+json

{
  "_embedded": {
    "streamStore:feed": [{
      "_links": {
        "self": { "href": "../../stream/stream-123" },
        "streamStore:feed": { "href": "../../stream/stream-123" },
      }  
    }, {
      "_links": {
        "self": { "href": "../../stream/stream-456" },
        "streamStore:feed": { "href": "../../stream/stream-456" },
      }  
    }]
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.