Skip to content

examples: with-in-process-transport showcasing co-located services#17

Open
intech wants to merge 2 commits into
mainfrom
feature/in-process-transport
Open

examples: with-in-process-transport showcasing co-located services#17
intech wants to merge 2 commits into
mainfrom
feature/in-process-transport

Conversation

@intech

@intech intech commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new example, with-in-process-transport, demonstrating the registry-based
in-process transport added in @connectum/core.

  • Two services (OrdersService, InventoryService) registered on a single createServer({...}).
  • OrdersService.CreateOrder composes InventoryService.Reserve via server.client(InventoryService) — automatically routed to local invoke, no HTTP/2 loopback, no TCP port used for the inner call.
  • e2e test suite (tests/e2e/e2e.test.ts) covering both transports and a polyglot scenario where in-process and HTTP/2 callers observe consistent state.
  • Latency benchmark (bench/latency.ts) measuring in-process vs HTTP/2 loopback — observed ~5.86x p50 speedup on Node 25.

Test plan

  • pnpm run buf:generate — generates protobuf bindings
  • pnpm test — 6/6 e2e tests pass (in-process + HTTP/2 + polyglot scenarios)
  • Tested with CONNECTUM_LOCAL=1 pnpm install against locally packed framework tarballs

Related

Companion to the framework PR adding the in-process transport.

🤖 Generated with Claude Code

intech and others added 2 commits May 5, 2026 01:32
Migrate all 14 examples from pnpm 10 to pnpm 11.0.4 (stable). pnpm 11
no longer reads the `pnpm` field from package.json — configuration is
moved into per-example `pnpm-workspace.yaml`.

Per-example changes (14 packages):
- package.json: remove `"pnpm": { "onlyBuiltDependencies": [...] }` block
- pnpm-workspace.yaml (new): replace deprecated `onlyBuiltDependencies`
  with `allowBuilds` map; preserve any `overrides` from the old `pnpm`
  field (performance-test-server, runn)
- pnpm-lock.yaml: regenerate under pnpm 11 (lockfileVersion 9.0 retained)

Special cases:
- basic-service-tsx: add `esbuild: true` to allowBuilds (tsx runtime
  requires esbuild for transpilation)
- runn: add `protobufjs: true` to allowBuilds (alongside @bufbuild/buf)
- performance-test-server: pre-existing protobufjs override and build
  dependency preserved
- cross-runtime-test: pnpm-lock.yaml is gitignored (no change tracked)

Smoke-tested locally with CONNECTUM_LOCAL=1 against pack/ tarballs in
5 representative examples (basic-service-node, auth, with-events-nats,
with-custom-interceptor, runn): install + buf:generate + test/typecheck
all green. Final lockfiles regenerated without CONNECTUM_LOCAL — no
`pack/` paths committed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…local invoke

Two services (Orders, Inventory) co-located in one process, calling each other
through server.client(ServiceDesc) — automatically routed to local invoke via
the in-process transport. Includes e2e tests and latency benchmark
(~5.86x speedup vs HTTP/2 loopback on Node 25 dev box).
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@intech has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 33 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a19c42bf-6873-4f18-a469-748f8026c593

📥 Commits

Reviewing files that changed from the base of the PR and between 52e5944 and 61c08d4.

⛔ Files ignored due to path filters (14)
  • auth/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • basic-service-bun/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • basic-service-node/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • basic-service-tsx/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • performance-test-server/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • runn/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-custom-interceptor/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-amqp/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-dlq/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-kafka/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-nats/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-redpanda/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-events-valkey/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • with-in-process-transport/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (43)
  • auth/package.json
  • auth/pnpm-workspace.yaml
  • basic-service-bun/package.json
  • basic-service-bun/pnpm-workspace.yaml
  • basic-service-node/package.json
  • basic-service-node/pnpm-workspace.yaml
  • basic-service-tsx/package.json
  • basic-service-tsx/pnpm-workspace.yaml
  • cross-runtime-test/package.json
  • cross-runtime-test/pnpm-workspace.yaml
  • performance-test-server/package.json
  • performance-test-server/pnpm-workspace.yaml
  • runn/package.json
  • runn/pnpm-workspace.yaml
  • with-custom-interceptor/package.json
  • with-custom-interceptor/pnpm-workspace.yaml
  • with-events-amqp/package.json
  • with-events-amqp/pnpm-workspace.yaml
  • with-events-dlq/package.json
  • with-events-dlq/pnpm-workspace.yaml
  • with-events-kafka/package.json
  • with-events-kafka/pnpm-workspace.yaml
  • with-events-nats/package.json
  • with-events-nats/pnpm-workspace.yaml
  • with-events-redpanda/package.json
  • with-events-redpanda/pnpm-workspace.yaml
  • with-events-valkey/package.json
  • with-events-valkey/pnpm-workspace.yaml
  • with-in-process-transport/.pnpmfile.cjs
  • with-in-process-transport/README.md
  • with-in-process-transport/bench/latency.ts
  • with-in-process-transport/buf.gen.yaml
  • with-in-process-transport/buf.yaml
  • with-in-process-transport/package.json
  • with-in-process-transport/pnpm-workspace.yaml
  • with-in-process-transport/proto/inventory/v1/inventory.proto
  • with-in-process-transport/proto/orders/v1/orders.proto
  • with-in-process-transport/src/index.ts
  • with-in-process-transport/src/server.ts
  • with-in-process-transport/src/services/inventoryService.ts
  • with-in-process-transport/src/services/ordersService.ts
  • with-in-process-transport/tests/e2e/e2e.test.ts
  • with-in-process-transport/tsconfig.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/in-process-transport

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@intech intech self-assigned this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant