Popularity
1.4
Growing
Activity
0.0
Stable
11
5
0
Programming language: Go
License: Apache License 2.0
MicroFrame alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view MicroFrame alternatives based on common mentions on social networks and blogs.
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin. -
Gorilla WebSocket
DISCONTINUED. A fast, well-tested and widely used WebSocket implementation for Go. -
Iris
The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket: -
GoFrame
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. -
goa
🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨ -
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc. -
Huma
A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of MicroFrame or a related project?
README
MicroFrame
MicroFrame是基于go-micro结合go的plugin(需要go1.8或以上)开发的一个微服务框架。
go-micro本身已经做了非常好的抽象和插件化。MicroFrame没有直接采用go-micro,而是在它的基础上重新开发有下面一些原因。
- 对纯粹的业务开发屏蔽掉掉所有服务本身的代码(当时也有考虑过使用生成代码)
- go-micro使用命令行参数设置启动状态,MicroFrame则依据配置文件
- 统一微服务节点结构
- 统计提供日志收集,状态监控,PV统计,性能统计,请求跟踪调试的服务。
- 所有节点可以通过配置,直接使用以上这些公共服务
微服务架构设计
节点设计
- 每个微服务节点为一个MicroFrame框架服务实例(包括API、WEB、SRV、Worker、数据库代理、配置中心节点、日志收集节点)
- MicroFrame通过配置选择加载需要公共插件和业务插件,而成为不同的功能节点
- 对于一个新的业务功能,我们只需要为其开发相应的微服务Handle业务插件即可
MicroFrame框架运行流程
- 框架读取配置文件
- 框架根据配置文件加载插件(当内部插件与外部插件同名时,会加载外部插件)
- 调用已经加载插件的NewPlugin函数新建插件结构体(插件的NewPlugin调用无序)
- 对插件按插件本身阶段类型以及在配置文件中的位置进行排序
- 顺序依次调用插件的Preinit函数(wrap操作需要在这一步增加)
- 框架初始化自己的Service
- 顺序依次调用插件的Init函数(这一步注册业务Handle)
- 顺序依次调用插件的Start函数
- 逆序依次调用插件的Stop函数
- 逆序依次调用插件的Uninit函数
微服务技术选型示例
- 服务发现 consul(优先考虑)
- 服务保护 hystrix
- 服务通信 protobuf(优先), jsonrpc(兼容)
- 框架 microframe(基于go-micro)
- 部署方案 kubernetes,docker swarm
- 监控报警 influxdb, telegraf, hrafana
- 日志收集 fluentd(ELK)
- 配置文件格式 yaml(优先),toml
- 日志格式 xclog