Skip to content

[FEATURE REQUEST] Support Single-Process Startup for OpenIM Chat #715

Description

@buvidk1234

Why this feature?

Feature Request: Support Single-Process Startup for OpenIM Chat

Background

OpenIM Server has introduced a unified cmd/main.go entry, allowing all internal modules to run within a single process. This significantly simplifies local development, debugging, deployment, and embedding.

It would be great if OpenIM Chat could provide a similar startup mode.

Proposal

Add a unified entry point such as:

cmd/main.go

which initializes and starts all Chat services in a single process, while preserving the existing modular architecture internally.

Benefits

  • Easier local development and debugging
  • Simpler deployment for small and medium-sized projects
  • Reduced operational complexity
  • Consistent startup experience with OpenIM Server
  • Better support for embedding OpenIM Chat into other applications

Compatibility

The existing multi-process deployment can remain the default for production environments. The single-process mode could be provided as an optional startup mode for development or lightweight deployments.

Additional Notes

This feature would align the startup experience of OpenIM Chat with OpenIM Server and improve the overall developer experience without affecting the current architecture.

Suggested Solution

Introduce an optional single-process startup mode for OpenIM Chat, similar to the implementation already available in OpenIM Server.

Specifically:

  • Add a unified entry point (e.g. cmd/main.go) that initializes and starts all Chat modules within a single process.
  • Keep the existing modular architecture internally, but run the services in-process instead of requiring multiple binaries.
  • Preserve the current multi-process deployment mode for production, making the single-process mode an optional choice for local development, testing, and lightweight deployments.
  • Reuse the existing configuration as much as possible to minimize migration effort and keep the developer experience consistent with OpenIM Server.

This would make OpenIM Chat easier to develop, debug, and deploy while maintaining backward compatibility with the current deployment model.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions