Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3ec32ef
add mq-bridge
marcomq Jun 14, 2026
0cc4779
updating version, fixing handlers
marcomq Jun 14, 2026
54c179a
reject http1.1
marcomq Jun 14, 2026
2068640
performance fix, version upgrade
marcomq Jun 14, 2026
400b0fe
fix ws
marcomq Jun 14, 2026
f0376ff
improve py performance, remove unwanted cache
marcomq Jun 14, 2026
58f0084
increase batch size
marcomq Jun 15, 2026
ac2c3dd
Merge remote-tracking branch 'httparean/main'
marcomq Jun 15, 2026
08c6013
Benchmark results: mq-bridge
github-actions[bot] Jun 15, 2026
262cc72
switch to dev branch
marcomq Jun 16, 2026
692ebea
Merge branch 'main' of https://github.com/marcomq/HttpArena
marcomq Jun 16, 2026
e10455e
bump version
marcomq Jun 16, 2026
1580024
Merge remote-tracking branch 'httparean/main'
marcomq Jun 16, 2026
d96ea9c
Benchmark results: mq-bridge
github-actions[bot] Jun 16, 2026
31f57cb
Merge remote-tracking branch 'httparean/main'
marcomq Jun 16, 2026
d67d4a4
Merge branch 'main' of https://github.com/marcomq/HttpArena
marcomq Jun 16, 2026
872755e
Benchmark results: mq-bridge-py
github-actions[bot] Jun 16, 2026
fde2f55
Benchmark results: mq-bridge-websocket
github-actions[bot] Jun 17, 2026
783af82
fix websocket performance
marcomq Jun 17, 2026
94a3e79
Merge branch 'main' of https://github.com/marcomq/HttpArena
marcomq Jun 17, 2026
916430a
Benchmark results: mq-bridge-websocket
github-actions[bot] Jun 17, 2026
abcf616
Merge remote-tracking branch 'httparean/main'
marcomq Jun 18, 2026
c199b57
Merge branch 'main' of https://github.com/marcomq/HttpArena
marcomq Jun 18, 2026
e3dbb34
add missing tests, update for ws performance
marcomq Jun 18, 2026
1d22b15
Benchmark results: mq-bridge-websocket
github-actions[bot] Jun 18, 2026
8f2890d
Benchmark results: mq-bridge
github-actions[bot] Jun 18, 2026
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
40 changes: 40 additions & 0 deletions frameworks/mq-bridge-py/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# HttpArena image for the mq-bridge-py (Python) entry.
#
# Builds the mq_bridge_py wheel with maturin (http feature only) and runs
# server.py on port 8080. Build and runtime share the same Python base image so
# the compiled extension ABI matches. Pin MQB_REF to a released tag.
FROM python:3.12-slim AS build

ARG MQB_REF=v0.2.19
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl build-essential git ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install --no-cache-dir maturin

RUN git clone --depth 1 -b "${MQB_REF}" https://github.com/marcomq/mq-bridge /src
WORKDIR /src/python/mq-bridge-py
RUN maturin build --release --no-default-features -F http -F pyo3/extension-module -o /wheels

FROM python:3.12-slim
RUN groupadd --system appuser \
&& useradd --system --gid appuser --create-home --home-dir /home/appuser --shell /usr/sbin/nologin appuser \
&& mkdir -p /app /wheels \
&& chown -R appuser:appuser /app /wheels
COPY --from=build --chown=appuser:appuser /wheels/*.whl /wheels/
# psycopg[binary] powers the optional /async-db profile; absent DATABASE_URL it is unused.
RUN pip install --no-cache-dir /wheels/*.whl "psycopg[binary]>=3.1" "psycopg_pool>=3.2"
WORKDIR /app
COPY --chown=appuser:appuser server.py /app/server.py
EXPOSE 8080
# Take CPython's cyclic GC off the request hot path: the JSON handlers allocate
# many short-lived dicts/lists per request (no reference cycles), so disabling
# the periodic collector removes its scan overhead with no leak. `count` is the
# safe alternative if a handler ever introduces cycles.
ENV MQ_BRIDGE_PY_GC_MODE=off
# Scale Python across cores with one process per core (single GIL each),
# co-binding port 8080 via SO_REUSEPORT. Unset/0 => all cores; set 1 to disable.
ENV MQB_WORKERS=0
USER appuser:appuser
CMD ["python", "server.py"]
23 changes: 23 additions & 0 deletions frameworks/mq-bridge-py/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"display_name": "mq-bridge-py",
"language": "Python",
"type": "emerging",
"mode": "standard",
"engine": "mq-bridge",
"description": "mq-bridge Python bindings (mq_bridge_py). A single http->response route serves the cleartext HTTP/1.1 + h2c profiles; HTTP framing stays in Rust and the inline-response fast path keeps responses off the GIL, so the Python handler runs only the per-request dispatch.",
"repo": "https://github.com/marcomq/mq-bridge",
"enabled": true,
"tests": [
"baseline",
"pipelined",
"limited-conn",
"json",
"json-comp",
"upload",
"static",
"async-db",
"api-4",
"api-16"
],
"maintainers": []
}
Loading