<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sandbox on 撷时录</title><link>https://jiangbyte.github.io/project-tags/sandbox/</link><description>Recent content in Sandbox on 撷时录</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 31 Aug 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://jiangbyte.github.io/project-tags/sandbox/index.xml" rel="self" type="application/rss+xml"/><item><title>SparkSandbox</title><link>https://jiangbyte.github.io/projects/sparksandbox/</link><pubDate>Mon, 31 Aug 2026 00:00:00 +0800</pubDate><guid>https://jiangbyte.github.io/projects/sparksandbox/</guid><description>&lt;p&gt;&lt;strong&gt;SparkSandbox&lt;/strong&gt; 是 Linux 上的&lt;strong&gt;隔离执行 HTTP 服务&lt;/strong&gt;，不是对外 SDK。任意语言发 HTTP 完成编译与运行，HMAC 验签由调用方实现。响应含 stdout、stderr、资源用量与执行状态；支持多测例、checker、interactive pipeline、文件仓与 SSE。仓内 Python 仅供本仓测试。当前版本 &lt;code&gt;0.1.1&lt;/code&gt;，MIT。&lt;/p&gt;&#10;&lt;p&gt;OJ、在线 IDE、作业评测把「跑用户代码」交给本服务；AC / WA 留在业务侧。&lt;a href="https://github.com/jiangbyte/acoj"&gt;ACOJ&lt;/a&gt; 判题执行即对接此服务。&lt;/p&gt;&#10;&lt;div class="solitude-tag tag-mermaid mermaid"&gt;flowchart TB&#10; client[&amp;#34;OJ / IDE / 作业系统&amp;#34;]&#10; http[&amp;#34;HTTP &amp;#43; HMAC&amp;#34;]&#10; orch[&amp;#34;FastAPI 编排&amp;#34;]&#10; engine[&amp;#34;C&amp;#43;&amp;#43;20 sparksandbox&amp;#34;]&#10; iso[&amp;#34;namespace / cgroup / seccomp&amp;#34;]&#10; client --&amp;gt; http --&amp;gt; orch --&amp;gt; engine --&amp;gt; iso&lt;/div&gt;&#10;&lt;h2 id="特性"&gt;特性&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;双层实现&lt;/strong&gt;：引擎负责隔离与状态分类；编排负责语言表、worker 池、CompileCache、FileStore、多测例并行&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;执行状态&lt;/strong&gt;：&lt;code&gt;succeeded&lt;/code&gt;、&lt;code&gt;compile_failed&lt;/code&gt;、&lt;code&gt;runtime_error&lt;/code&gt;、&lt;code&gt;time_limit_exceeded&lt;/code&gt;、&lt;code&gt;memory_limit_exceeded&lt;/code&gt;、&lt;code&gt;output_limit_exceeded&lt;/code&gt;、&lt;code&gt;security_violation&lt;/code&gt;、&lt;code&gt;internal_error&lt;/code&gt;；&lt;code&gt;stage&lt;/code&gt; 区分 compile / run&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;语言表&lt;/strong&gt;：默认 C11、C++17、Python 3、Java 17、Go、Node.js；镜像另开 Rust 与 SQLite；YAML 可声明 SQL 客户端语言&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;评测形态&lt;/strong&gt;：多测例、checker、interactive、文件仓、SSE&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;容器&lt;/strong&gt;：toolchain base 与 server 分层；&lt;code&gt;--privileged --cgroupns=host&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="solitude-tag tag-mermaid mermaid"&gt;flowchart LR&#10; compile[&amp;#34;compile&amp;#34;]&#10; run[&amp;#34;run&amp;#34;]&#10; ok[&amp;#34;succeeded&amp;#34;]&#10; fail[&amp;#34;compile_failed / runtime_error&amp;#34;]&#10; limit[&amp;#34;TLE / MLE / OLE&amp;#34;]&#10; sec[&amp;#34;security_violation&amp;#34;]&#10; compile --&amp;gt; run&#10; compile --&amp;gt; fail&#10; run --&amp;gt; ok&#10; run --&amp;gt; fail&#10; run --&amp;gt; limit&#10; run --&amp;gt; sec&lt;/div&gt;&#10;&lt;h2 id="技术栈"&gt;技术栈&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;引擎：C++20 · namespaces · cgroup · seccomp&lt;/li&gt;&#10;&lt;li&gt;编排：Python 3.10+ · FastAPI&lt;/li&gt;&#10;&lt;li&gt;交付：Docker 双层镜像&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>