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
3 changes: 2 additions & 1 deletion frameworks/actix-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/actix/actix-web",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
3 changes: 2 additions & 1 deletion frameworks/aspnet-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/dotnet/aspnetcore",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
3 changes: 2 additions & 1 deletion frameworks/bun-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/oven-sh/bun",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
3 changes: 2 additions & 1 deletion frameworks/deno-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/denoland/deno",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
12 changes: 9 additions & 3 deletions frameworks/dogrider/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Build (managed / JIT — no AOT toolchain needed).
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source

COPY riderdog.csproj ./
RUN dotnet restore

COPY . .
RUN dotnet publish -c Release --no-self-contained -o /app
RUN dotnet publish -c Release --no-self-contained \
-p:GarbageCollectionAdaptationMode=1 \
-o /app/out

# Runtime (glibc, includes the .NET runtime).
# liburing2 is required by the bundled liburingshim.so for io_uring syscalls.
FROM mcr.microsoft.com/dotnet/runtime:10.0
RUN apt-get update && apt-get install -y --no-install-recommends liburing2 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app .

COPY --from=build /app/out ./
EXPOSE 8080
ENTRYPOINT ["dotnet", "riderdog.dll"]
29 changes: 8 additions & 21 deletions frameworks/dogrider/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ private static async Task Main()
{
Ip = "0.0.0.0",
Port = 8080,
Backlog = 65535,
ReactorCount = 16,
Backlog = 16384,
ReactorCount = 64,
AcceptorConfig = new AcceptorConfig(
RingFlags: 0,
SqCpuThread: -1,
Expand All @@ -24,29 +24,21 @@ private static async Task Main()
CqTimeout: 100_000_000,
IPVersion: IPVersion.IPv4Only
),
ReactorConfigs = Enumerable.Range(0, 16).Select(_ => new ReactorConfig(
ReactorConfigs = Enumerable.Range(0, 64).Select(_ => new ReactorConfig(
RingFlags: (1u << 12) | (1u << 13), // SINGLE_ISSUER | DEFER_TASKRUN
SqCpuThread: -1,
SqThreadIdleMs: 100,
RingEntries: 1 * 1024,
RingEntries: 16 * 1024,
RecvBufferSize: 1 * 1024,
BufferRingEntries: 16 * 1024,
BatchCqes: 4096,
MaxConnectionsPerReactor: 1 * 384,
MaxConnectionsPerReactor: 1 * 512,
CqTimeout: 1_000_000,
ConnectionBufferRingEntries: 32,
ConnectionBufferRingEntries: 128,
IncrementalBufferConsumption: false
)).ToArray()
},
handler: new EchoHandlerPipelined());

/*
await using var server = new Dogrider(
ip: "0.0.0.0",
port: 8080,
reactorCount: Math.Max(1, 16),
handler: new EchoHandler());
*/

server.Start();

Expand All @@ -67,9 +59,6 @@ private static async Task Main()

internal sealed class EchoHandlerPipelined : Handler
{

private static ReadOnlySpan<byte> _hello => "hello"u8;

public async ValueTask HandleAsync(IConnection connection)
{
while (true)
Expand All @@ -94,14 +83,12 @@ public async ValueTask HandleAsync(IConnection connection)
{
case FrameType.Text:

//connection.Write(frame.Data);
connection.Write(_hello);
connection.Write(frame.Payload.FirstSpan);
break;

case FrameType.Binary:

//connection.Write(frame.Data, FrameType.Binary);
connection.Write(_hello, FrameType.Binary);
connection.Write(frame.Payload.FirstSpan);
break;

case FrameType.Ping:
Expand Down
31 changes: 16 additions & 15 deletions frameworks/dogrider/meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"display_name": "dogrider",
"language": "C#",
"type": "production",
"engine": "zerg",
"description": "GenHTTP websockets with zerg backend",
"repo": "https://github.com/MDA2AV/dogrider",
"enabled": true,
"tests": [
"echo-ws"
],
"maintainers": [
"MDA2AV"
]
}
{
"display_name": "dogrider",
"language": "C#",
"type": "production",
"engine": "zerg",
"description": "GenHTTP websockets with zerg backend",
"repo": "https://github.com/MDA2AV/dogrider",
"enabled": true,
"tests": [
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": [
"MDA2AV"
]
}
6 changes: 5 additions & 1 deletion frameworks/dogrider/riderdog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

<ItemGroup Condition="$(PublishAot) == 'true'">
<RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.HillClimbing.Disable" Value="true" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="dogrider" Version="10.0.2" />
<PackageReference Include="dogrider" Version="10.1.3" />
</ItemGroup>

</Project>
8 changes: 5 additions & 3 deletions frameworks/fleck/Program.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using Fleck;

namespace riderdog;
namespace fleckws;

internal static class Program
{
private static async Task Main()
{
var server = new WebSocketServer("ws://0.0.0.0:8080");
var server = new WebSocketServer("ws://0.0.0.0:8080/");
Console.WriteLine("ooga fleck");
server.Start(socket =>
{
socket.OnMessage = message => socket.Send(message);
socket.OnBinary = binary => socket.Send(binary);
});

Console.ReadLine();
await Task.Delay(-1);
}
}
31 changes: 16 additions & 15 deletions frameworks/fleck/meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"display_name": "fleck",
"language": "C#",
"type": "production",
"engine": "fleck",
"description": "C# websockets framework",
"repo": "https://github.com/statianzo/Fleck",
"enabled": true,
"tests": [
"echo-ws"
],
"maintainers": [
"MDA2AV"
]
}
{
"display_name": "fleck",
"language": "C#",
"type": "production",
"engine": "fleck",
"description": "C# websockets framework",
"repo": "https://github.com/statianzo/Fleck",
"enabled": true,
"tests": [
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": [
"MDA2AV"
]
}
3 changes: 2 additions & 1 deletion frameworks/go-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/gobwas/ws",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
1 change: 1 addition & 0 deletions frameworks/helidon-production/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"baseline-h2",
"static-h2",
"echo-ws",
"echo-ws-pipeline",
"unary-grpc",
"unary-grpc-tls",
"stream-grpc",
Expand Down
1 change: 1 addition & 0 deletions frameworks/helidon-tuned/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"baseline-h2",
"static-h2",
"echo-ws",
"echo-ws-pipeline",
"unary-grpc",
"unary-grpc-tls",
"stream-grpc",
Expand Down
3 changes: 2 additions & 1 deletion frameworks/hyperf/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"noisy",
"api-4",
"api-16",
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": [
"suyar"
Expand Down
3 changes: 2 additions & 1 deletion frameworks/lute/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"json",
"json-tls",
"upload",
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": ["nicell"]
}
3 changes: 2 additions & 1 deletion frameworks/node-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/websockets/ws",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
3 changes: 2 additions & 1 deletion frameworks/simplew/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"crud",
"api-4",
"api-16",
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
1 change: 1 addition & 0 deletions frameworks/slimeweb/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"json-comp",
"upload",
"echo-ws",
"echo-ws-pipeline",
"api-4",
"api-16",
"static",
Expand Down
3 changes: 2 additions & 1 deletion frameworks/spring-boot/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"api-16",
"baseline-h2",
"static-h2",
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": []
}
3 changes: 2 additions & 1 deletion frameworks/swoole-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"repo": "https://github.com/swoole/swoole-src",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
]
}
3 changes: 2 additions & 1 deletion frameworks/workerman-websocket/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"repo": "https://github.com/walkor/Workerman",
"enabled": true,
"tests": [
"echo-ws"
"echo-ws",
"echo-ws-pipeline"
],
"maintainers": ["joanhey"]
}
20 changes: 20 additions & 0 deletions scripts/lib/framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,26 @@ framework_wait_ready() {
local probe_url
local -a probe_extra=()

# Pure-WebSocket frameworks (e.g. Fleck) don't speak HTTP at all, so the
# curl probe below would never succeed. If every subscribed test is a
# WS-only profile, sleep briefly to let the container bind its listener
# (sub-second on most runtimes) and skip the HTTP probe.
if [ -n "$FRAMEWORK_TESTS" ]; then
local _t _all_ws=true
IFS=',' read -ra _ws_tests_arr <<< "$FRAMEWORK_TESTS"
for _t in "${_ws_tests_arr[@]}"; do
case "$_t" in
echo-ws|echo-ws-pipeline) ;;
*) _all_ws=false; break ;;
esac
done
if $_all_ws; then
info "ws-only framework — skipping HTTP probe (sleep 2s for startup)"
sleep 2
return 0
fi
fi

info "waiting for server..."

case "$endpoint" in
Expand Down
3 changes: 2 additions & 1 deletion scripts/lib/profiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ declare -A PROFILES=(
[gateway-h3]="1|0|0-31,64-95|64,256|gateway-h3"
[production-stack]="1|0|0-31,64-95|256,1024|production-stack"
[echo-ws]="1|0|0-31,64-95|512,4096,16384|ws-echo"
[echo-ws-pipeline]="16|0|0-31,64-95|512,4096,16384|ws-echo"
)

PROFILE_ORDER=(
Expand All @@ -52,7 +53,7 @@ PROFILE_ORDER=(
production-stack
unary-grpc unary-grpc-tls
stream-grpc stream-grpc-tls
echo-ws
echo-ws echo-ws-pipeline
)

# ── Parsing + validation ────────────────────────────────────────────────────
Expand Down
Loading
Loading