GithubHelp home page GithubHelp logo

thkhxm / tgf Goto Github PK

View Code? Open in Web Editor NEW
66.0 3.0 9.0 13.35 MB

​ tgf框架是使用golang开发的一套游戏分布式框架,支持全球一服.项目采用了rpcx做为底层rpc的通讯,consul提供服务注册发现.定义了一整套的模块开发规范.

Home Page: https://thkhxm.github.io/tgf_writerside/starter-topic.html

License: Apache License 2.0

Go 100.00%
game gameserver golang golang-game-engine

tgf's Introduction

Go Report Card

关于 tgf

tgf框架是使用golang开发的一套游戏分布式框架.

属于开箱即用的项目框架,目前适用于中小型团队,独立开发者,快速开发使用.

框架提供了一整套开发工具,并且定义了模块开发规范.

开发者只需要关注业务逻辑即可,无需关心用户并发和节点状态等复杂情况.

API 项目地址
项目文档
国内项目文档
项目案例地址 知乎博客
CSDN专栏
B站教程

交流群

QQ群:7400585

技术选型

Golang开发版本:  1.22
技术 说明 仓库地址
rpcx 底层rpc的实现 https://github.com/smallnest/rpcx
redis 提供数据缓存 https://redis.io/
hashmap 线程安全的集合 https://github.com/cornelk/hashmap
ants 高性能go协程池 https://github.com/panjf2000/ants
redislock 分布式redis锁 https://github.com/bsm/redislock
snowflake 雪花算法 https://github.com/bwmarrin/snowflake
doublejump 一致性hash https://github.com/edwingeng/doublejump
godotenv 环境变量工具 https://github.com/joho/godotenv
zap 日志框架 https://go.uber.org/zap
lumberjack 日志切割工具 https://gopkg.in/natefinch/lumberjack.v2
excelize Excel工具 https://github.com/qax-os/excelize
sonic json高性能工具 https://github.com/bytedance/sonic/

规划

项目后续会更新系列教程文章和视频教程,并且开源项目案例.也会不断的更新和优化项目框架.
欢迎大家加入qq群一起交流和探讨.

tgf's People

Contributors

hjnth avatar tanyueheng avatar thkhxm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tgf's Issues

feat: 用户请求动态路由

概述

我们将服务器分为有状态节点和无状态节点.

有状态节点,表示会记录用户的请求.保证用户在周期内的每次请求都会请求相同的节点

无状态节点,表示用户每次请求,都会重新进行路由分配,请求到不同的节点

目前框架实现了在rpc请求操作的时候,可以指定是否重新路由节点,可以参考源码中的NewBindRPCContext函数.它的作用域是单次rpc请求,并不是以整个逻辑节点为作用域.即针对的是单次,单接口的请求.而不是整个逻辑节点都或所有请求.

但是缺少了用户从客户端发起请求,在经过网关之后的接口状态路由规则.

规划

通过服务器管理工具,进行api接口的动态路由规则设置

feat: 管理工具

规划

基于第三方ui工具,开发一套针对框架的管理工具

[bug] db.Set函数

使用db.Set函数的时候,如果类型是string的话,会使用json的反序列化操作.

例如存储字符串 abcd , 最终存入Redis中的数据为 "abcd" , 会多出双引号.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.