Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions frameworks/genhttp-ioxide/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:11.0.100-preview.7 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /src/app

# GenHTTP 11.0.0-preview.24 from nuget.org, the same preview the genhttp entry builds against. The
# ioxide engine branch (PR #887) that this entry used to clone is merged and ships in that preview.
# The preview.7 SDK provides .NET 11 plus the Roslyn GenHTTP's MemoryView source generator needs.
COPY genhttp.csproj ./
RUN dotnet restore

COPY . .
RUN dotnet publish genhttp.csproj -c Release --no-self-contained -o /app

FROM mcr.microsoft.com/dotnet/runtime:11.0.0-preview.7
FROM mcr.microsoft.com/dotnet/runtime:11.0
WORKDIR /app
COPY --from=build /app .

Expand Down
2 changes: 1 addition & 1 deletion frameworks/genhttp-ioxide/Infrastructure/Postgres.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Net.Sockets;
using System.Text;
using System.Text.Json;

using GenHTTP.Api.Ioxide;
using GenHTTP.Engine.Ioxide;

using ioxide;
Expand Down
20 changes: 8 additions & 12 deletions frameworks/genhttp-ioxide/Project.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using GenHTTP.Api.Content;

using GenHTTP.Modules.IO;
using GenHTTP.Modules.IoxideFiles;
using GenHTTP.Modules.Compression;
using GenHTTP.Modules.Files;
using GenHTTP.Modules.Layouting;
using GenHTTP.Modules.Layouting.Provider;
using GenHTTP.Modules.Webservices;
using GenHTTP.Modules.Websockets;

using genhttp.Infrastructure;
using GenHTTP.Modules.Compression.Algorithms;
using genhttp.Tests;

namespace genhttp;
Expand All @@ -23,7 +23,6 @@ public static IHandlerBuilder Create()
.AddService<Baseline>("baseline2")
.AddService<Echo>("echo")
.AddService<Json>("json")
// The async profile: /delay/{ms} holds the request without holding a thread.
.Add("delay", new DelayBuilder());

// async-db and crud require a configured Postgres (DATABASE_URL).
Expand All @@ -36,9 +35,8 @@ public static IHandlerBuilder Create()
.Add("crud", crud);
}

return app
.AddStaticFiles()
.AddWebsocket();
return app.AddStaticFiles()
.AddWebsocket();
}

private static LayoutBuilder AddStaticFiles(this LayoutBuilder app)
Expand All @@ -47,19 +45,17 @@ private static LayoutBuilder AddStaticFiles(this LayoutBuilder app)

if (Directory.Exists(staticDir))
{
// Bodies read positionally off the ring, with the descriptors kept in a per-reactor
// snapshot - the point of the engine, and the reason this entry exists.
app.Add("static", IoxideFiles.From(staticDir));
app.Add("static", Assets.From(staticDir).AllowPrecompressed(new BrotliAlgorithm()));
}

return app;
}

private static LayoutBuilder AddWebsocket(this LayoutBuilder app)
{
var websocket = Websocket.Imperative()
.DoNotAllocateFrameData()
.Handler(new EchoHandler());
.DoNotAllocateFrameData()
.Handler(new EchoHandler());

return app.Add("ws", websocket);
}
Expand Down
1 change: 1 addition & 0 deletions frameworks/genhttp-ioxide/Tests/Delay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using GenHTTP.Api.Content;
using GenHTTP.Api.Infrastructure;
using GenHTTP.Api.Ioxide;
using GenHTTP.Api.Protocol;

using GenHTTP.Engine.Ioxide;
Expand Down
18 changes: 9 additions & 9 deletions frameworks/genhttp-ioxide/genhttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
the same preview the genhttp entry builds against. Engine.Ioxide pins ioxide 0.13.218, which
is what ioxide.timer below is built for. -->
<ItemGroup>
<PackageReference Include="GenHTTP.Engine.Ioxide" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.IO" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Layouting" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Compression" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.IoxideFiles" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Engine.Ioxide" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.IO" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Files" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Layouting" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Compression" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="ioxide.pg" Version="0.0.17" />
<PackageReference Include="ioxide.pg" Version="0.13.225" />
<!-- Ring-native timeouts for /delay: the wait completes on the reactor, not the thread pool. -->
<PackageReference Include="ioxide.timer" Version="0.13.218" />
<PackageReference Include="ioxide.timer" Version="0.13.225" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="11.0.0-preview.5.26302.115" />
</ItemGroup>

Expand Down
5 changes: 3 additions & 2 deletions frameworks/genhttp-ioxide/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"display_name": "genhttp-ioxide",
"language": "C#",
"type": "emerging",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand All @@ -17,7 +17,8 @@
"baseline",
"async",
"latency-1m",
"latency-10k", "latency-500k-8cpu",
"latency-10k",
"latency-500k-8cpu",
"pipelined",
"limited-conn",
"json-comp",
Expand Down
4 changes: 2 additions & 2 deletions frameworks/genhttp-kestrel/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:11.0.100-preview.7 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /source

COPY genhttp.csproj ./
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
COPY . .
RUN dotnet publish -c Release --no-self-contained -o /app

FROM mcr.microsoft.com/dotnet/aspnet:11.0.0-preview.7
FROM mcr.microsoft.com/dotnet/aspnet:11.0

ADD https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb /packages-microsoft-prod.deb

Expand Down
2 changes: 0 additions & 2 deletions frameworks/genhttp-kestrel/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using GenHTTP.Modules.Files;
using GenHTTP.Modules.Layouting;
using GenHTTP.Modules.Layouting.Provider;
using GenHTTP.Modules.Reflection;
using GenHTTP.Modules.Webservices;
using GenHTTP.Modules.Websockets;

Expand All @@ -27,7 +26,6 @@ public static IHandlerBuilder Create()
.AddService<Baseline>("baseline2")
.AddService<Echo>("echo")
.AddService<Json>("json")
// The async profile: /delay/{ms} holds the request without holding a thread.
.AddService<Delay>("delay")
.AddService<AsyncDatabase>("async-db")
.Add("crud", crud)
Expand Down
12 changes: 6 additions & 6 deletions frameworks/genhttp-kestrel/genhttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<ItemGroup>

<PackageReference Include="GenHTTP.Core.Kestrel" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Files" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Core.Kestrel" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Files" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0" />

<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.12" />

<PackageReference Include="Npgsql" Version="10.0.3" />

Expand Down
2 changes: 1 addition & 1 deletion frameworks/genhttp-kestrel/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"display_name": "genhttp-kestrel",
"language": "C#",
"type": "emerging",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand Down
4 changes: 2 additions & 2 deletions frameworks/genhttp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:11.0.100-preview.7 AS build
FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build
WORKDIR /source

COPY genhttp.csproj ./
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
COPY . .
RUN dotnet publish -c Release --no-self-contained -o /app

FROM mcr.microsoft.com/dotnet/runtime:11.0.0-preview.7
FROM mcr.microsoft.com/dotnet/runtime:11.0
WORKDIR /app
COPY --from=build /app .

Expand Down
6 changes: 1 addition & 5 deletions frameworks/genhttp/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using GenHTTP.Modules.Files;
using GenHTTP.Modules.Layouting;
using GenHTTP.Modules.Layouting.Provider;
using GenHTTP.Modules.Reflection;
using GenHTTP.Modules.Webservices;
using GenHTTP.Modules.Websockets;

Expand All @@ -27,7 +26,6 @@ public static IHandlerBuilder Create()
.AddService<Baseline>("baseline2")
.AddService<Echo>("echo")
.AddService<Json>("json")
// The async profile: /delay/{ms} holds the request without holding a thread.
.AddService<Delay>("delay")
.AddService<AsyncDatabase>("async-db")
.Add("crud", crud)
Expand All @@ -41,9 +39,7 @@ private static LayoutBuilder AddStaticFiles(this LayoutBuilder app)
{
if (Directory.Exists("/data/static"))
{
var tree = ResourceTree.FromDirectory("/data/static");

var handler = Assets.From(tree)
var handler = Assets.From("/data/static")
.AllowPrecompressed(new BrotliAlgorithm());

app.Add("static", handler);
Expand Down
12 changes: 6 additions & 6 deletions frameworks/genhttp/genhttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

<ItemGroup>

<PackageReference Include="GenHTTP.Core" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Files" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0-preview.24" />
<PackageReference Include="GenHTTP.Core" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Files" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0" />

<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.12" />

<PackageReference Include="Npgsql" Version="10.0.3" />

Expand Down
2 changes: 1 addition & 1 deletion frameworks/genhttp/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"display_name": "genhttp",
"language": "C#",
"type": "emerging",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand Down
6 changes: 3 additions & 3 deletions site/data/frameworks.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
"repo": "https://github.com/Kaliumhexacyanoferrat/GenHTTP",
"type": "emerging",
"engine": "ioxide",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand All @@ -624,7 +624,7 @@
"repo": "https://github.com/Kaliumhexacyanoferrat/GenHTTP",
"type": "emerging",
"engine": "kestrel",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand All @@ -638,7 +638,7 @@
"repo": "https://github.com/Kaliumhexacyanoferrat/GenHTTP",
"type": "emerging",
"engine": "genhttp",
"mode": "tuned",
"mode": "standard",
"completeness": {
"routing": true,
"middleware": true,
Expand Down
Loading