Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

What I learned building an xAPI 2.0 library and LRS for .NET

说明与用途

xapi-dotnet 是一款现代 .NET xAPI 2.0 库和 LRS,完全符合 ADL 标准,具备持久化 outbox 和 Unity/WebGL 支持。

问题

Existing .NET xAPI libraries lack xAPI 2.0 support and have performance and reliability issues.

结果

xapi-dotnet now fully supports xAPI 2.0, passes all ADL conformance tests, offers durable outbox, and runs in Unity/WebGL. It improves JSON parsing performance by ~60% and reduces memory allocation.

工作流

  • 1. Implement statement models and validation for xAPI 2.0.
  • 2. Build async client with durable disk‑based outbox.
  • 3. Embed LRS in ASP.NET Core with EF Core on SQLite/PostgreSQL.
  • 4. Integrate ADL conformance suite in CI, parsing JSON log to enforce test floor.
  • 5. Optimize JSON parsing performance and validation error reporting.
  • 6. Add Unity support, including WebGL handler and async file read adjustments.
  • 7. Publish NuGet package and Docker image, provide migration guide from TinCan.NET.

证据

TinCan.NET last changed in 2018. It targets net35, its calls block, and it has no xAPI 2.0 support.

来源

The LRS now passes all 1,365 and all 1,435 tests, on both databases, in four CI jobs on every pull request.

来源

Reading the same statement takes 5.48 μs and 5.2 KB, about four times the cost of JsonDocument.Parse over the same bytes.

来源

The file store flushes its journal to disk before EnqueueAsync returns, and that turned out to be almost all of the cost: 4.7 ms per enqueue on my M1 Pro.

来源

  • 记录日期: 2026-10-17T18:56:13.142Z