Skip to content

What still overlaps with core-cpp after the migration #807

Description

@christianparpart

The core-cpp migration (#805, #806) moved TimeoutScheduler, base64 and the wakeup pipe onto core-cpp, and added coroutines on core::async. This issue lists where morph and core-cpp still overlap. Each item is a candidate for its own change, and none of them is required by the migration.

morph core-cpp What moving would take
morph::exec: IExecutor, ThreadPoolExecutor, MainThreadExecutor, InlineExecutor, and the per-model StrandExecutor core::async::IExecutor, ThreadPoolExecutor, ResumeOn; core::net::EventLoop as an executor morph's executors post std::function<void()>. core-cpp's resume coroutine handles and account for abandoned work (ParkedWork). StrandCoroExecutor already bridges the two for Task handlers. Unifying them changes every Completion's callback executor, so it is a public API change and needs docs/spec/core/executor.md first.
morph::log core::log morph::log::logError is the sink for orphaned errors and for exceptions posted tasks throw, and tests silence it through --log-level. Moving means routing those through core::log without losing the level gate.
morph::core::FileIoOps (the injectable file-I/O seam for the journal and the offline queue) core::platform::FileSystem Durability tests inject faults through FileIoOps, including fsync and rename failures. FileSystem must offer the same fault points, or keep a morph adapter over them.
The process-global DateTime::now() override core::platform::IWallClock, injected The override is global state. Injection means threading a clock through every place that stamps a time: sessions, journal entries and token issue/verify.
morph::net (POSIX sockets only; MORPH_BUILD_NET warns and builds nothing on Windows) core::net sockets, listeners and TLS on every platform, IOCP on Windows Porting SocketServer/SocketBackend onto core::net would give morph's raw-socket transport Windows support, at the cost of rewriting its thread-per-connection design as event-loop flows.

Constraints any of these must keep

  • morph's public surface stays header-only. core-cpp's static modules are built alongside it, as they are now, but nothing may require a consumer to link a morph library of its own.
  • Single-threaded WebAssembly (Qt wasm_singlethread, emsdk 3.1.56, no -pthread) must keep building and working. No thread, no blocking wait, and nothing newer than libc++ 17 without a feature-test macro. Of core-cpp, only its WebAssembly subset is available there.
  • The wire protocol and the remote backends stay unchanged.

Verification status. This list comes from reading both codebases at the migration branch's head, not from measurement. Nothing here has been prototyped.

What would close this: each row either moved (with its own issue), or recorded here as deliberately kept, with the reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions