Golaxy Distributed Service Development Framework aims to provide a comprehensive server-side solution for real-time communication applications. Based on the core of the EC system and Actor thread model, the framework implements all dependency functions for distributed services. It is designed to be simple and easy to use, making it particularly suitable for developing games and remote control systems.
The framework supports the development of stateful (Stateful
) or stateless (Stateless
) distributed services with the following features:
- MQ and Broker: Based on NATS, supports message queue and event-driven architecture.
- Service Discovery: Based on ETCD, also supports Redis (for demo purposes due to lack of data version control).
- Distributed Synchronization: Supports distributed locking with ETCD or Redis, default is ETCD.
- Distributed Service: Defines distributed service node address format, provides asynchronous model futures (
Future
), supports inter-service communication and horizontal scaling. - Distributed Entities: Provides registration and query functions for distributed entities, supports communication between them.
- GTP Protocol: For long connections and real-time communication, works on reliable protocols (
TCP/WebSocket
), supports bi-directional signature verification, link encryption, link authentication, reconnect and retransmission, custom messages. - GAP Protocol: For application layer communication messages, works on
GTP Protocol
orMQ
, supports message deduplication, custom messages, custom variable types. - GTP Gate and Client: Gateway and client based on
GTP Protocol
, supportsTCP/WebSocket
long connections. - Router: Supports communication routing, session to entity mapping, client-service communication, communication grouping, and multicast messages.
- RPC: Supports RPC calls between services, entities, clients, and groups based on
GAP Protocol
, supports variable types, simple and easy to use. Supports one-way notification RPC and response RPC. - Logger: Based on Zap.
- Config: Based on Viper, supports local and remote configurations.
- Database: Supports connection to relational databases (based on
GORM
), Redis, MongoDB.
Directory | Description |
---|---|
/ | Common types and functions for application development. |
/addins/broker | Message queue middleware. |
/addins/conf | Configuration system. |
/addins/db | Database support. |
/addins/dentq | Distributed entity query support. |
/addins/dentr | Distributed entity registration support. |
/addins/discovery | Service discovery. |
/addins/dsvc | Distributed service support. |
/addins/dsync | Distributed locking. |
/addins/gate | GTP gateway implementation. |
/addins/log | Logging system. |
/addins/router | Client routing system. |
/addins/rpc | RPC system. |
/addins/rpcstack | RPC stack support. |
/net/gap | GAP protocol implementation. |
/net/gtp | GTP protocol implementation. |
/net/netpath | Service node address structure. |
/utils | Various utility classes and functions. |
See: Examples
go get -u git.golaxy.org/framework