https://github.com/chivenzhang/openms
Open Microservice Framework
https://github.com/chivenzhang/openms
aos architecture-of-service distributed-service microservice
Last synced: 7 months ago
JSON representation
Open Microservice Framework
- Host: GitHub
- URL: https://github.com/chivenzhang/openms
- Owner: ChivenZhang
- License: mit
- Created: 2024-11-11T00:28:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-07T18:12:37.000Z (8 months ago)
- Last Synced: 2025-08-07T19:26:54.355Z (8 months ago)
- Topics: aos, architecture-of-service, distributed-service, microservice
- Language: C++
- Homepage:
- Size: 626 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
___ __ __ ____
/ _ \ _ __ ___ _ __ | \/ / ___|
| | | | '_ \ / _ \ '_ \| |\/| \___ \
| |_| | |_) | __/ | | | | | |___) |
\___/| .__/ \___|_| |_|_| |_|____/
======|_|============================
:: OpenMS :: (v1.0.0)
## Description
The Distributed Network Framework based on Microservice Theory.
## Features
- [x] Support [reactor](https://en.wikipedia.org/wiki/Reactor_pattern) network pattern
- [x] Support tcp, udp, [kcp](https://github.com/skywind3000/kcp), rpc, http, mysql, redis
- [x] Support [c++20 coroutine](https://en.cppreference.com/w/cpp/language/coroutines) coding
- [x] Support [Erlang](https://en.wikipedia.org/wiki/Erlang_(programming_language))-like message
- [x] Support [IOC](https://en.wikipedia.org/wiki/Inversion_of_control) collection mechanism
- [x] Support [microservice](https://microservices.io/patterns/index.html) cluster
- [x] Support Windows, macOS, Linux
- [ ] Support Hot module replacement
## How to install
* Set the environment variable "VCPKG_ROOT_CUSTOM".
* Use [vcpkg](https://learn.microsoft.com/zh-cn/vcpkg/get_started/overview) to install dependency on manifest mode.
* Use [CLion](https://www.jetbrains.com.cn/en-us/clion/) or [Visual Studio](https://visualstudio.microsoft.com/) to open folder where contains CMakeLists.txt .
* See directory [./Sample](https://github.com/ChivenZhang/OpenMS/tree/master/Sample) for more details.
```c++
// Master service instance
class Master : public MasterService
{
protected:
void onInit() override;
void onExit() override;
};
OPENMS_RUN(Master)
```
```c++
// First cluster instance joined to master
class Cluster1 : public ClusterService
{
protected:
void onInit() override;
void onExit() override;
};
OPENMS_RUN(Cluster1)
```
```c++
// Second cluster instance joined to master
class Cluster2 : public ClusterService
{
protected:
void onInit() override;
void onExit() override;
};
OPENMS_RUN(Cluster2)
```
## Architecture