duanhf2012 / origin Goto Github PK
View Code? Open in Web Editor NEWA game server framework in Go (golang).
License: Apache License 2.0
A game server framework in Go (golang).
License: Apache License 2.0
httpservice.go中的k,ok := mapCAFile["Certfile"]应该改成k,ok := mapCAFile["Keyfile"]
node ServiceA中使用AsyncCallNode 调用ServiceA的RPC方法,会调用两次
myselfRpcHandlerGo 一次
selfNodeRpcHandlerAsync 一次
服务发现存在master宕机的风险,改用etcd会稳定很多。
另外nats无论是作为rpc,还是扩展到对接其它服务器,会有很大的优势。
这个框架代码看起来非常舒服,特别清晰,作为中小公司创业首选一点都不过份,如加上上面两项,就更完美了。
origin/sysmodule/mysqlmodule
文件内模块命名错误,会导致包找不到
package mysqlmondule
-->
package mysqlmodule
开房间
并发安全开房间
RPC调用,函数参数结构体内的成员变量必须大写,否则会出现参数无效的情况,看了下底层代码,通过interface存储放入request队列之后取出。可以在文档中补充说明下。origin代码没有任何问题,很稳定。
是否可以添加AddNode接口,让用户自己管理节点?
github.com/duanhf2012/origin/sysservice: module github.com/duanhf2012/origin@latest found (v1.21.4), but does not contain package github.com/duanhf2012/origin/sysservice
protobuf 解码失败
具体问题可以看这个:https://stackoverflow.com/questions/64877307/cant-unmarshal-bytes-using-protobuf
gogo/protobuf 已知问题: gogo/protobuf#678
换回谷歌官方的protobuf 就没问题了
最近使用了event通信,simple_event包中有两个服务,serviceA用来广播,serviceB用来注册消息等待出发回调函数。serviceA和serviceB写在不同的文件中,这两个文件的init函数里会调用node.Setup这两个服务,但是如果serviceB先注册,serviceA后注册就会出现这样的问题,serviceB想在OnInit函数中获取serviceA,这个时候是获取不到的。如果能保证serviceA注册顺序优先于serviceB就没有问题。具体底层源码我还没看,最近使用出现了这个问题。
为了解决这个问题,我在simple_event这个包的init函数中保证广播的服务先注册就没问题了。
主要是关系到docker部署
1.cluster的配置支持热加载吗?比如我已部署了一个3个node的集群,现在需要增加一个节点,是必须重启所有节点吗?
2.既然每个节点下会去配置service的信息,比如tcpservice和wsservice的地址,端口等信息,还有必要配置公共service的必要吗?公共service配置主要的作用是什么?
messagepack结构体中,map的key只能为string。
如:
//go:generate msgp
type TestStruct struct {
TestMap map[string]int
}
若为
//go:generate msgp
type TestStruct struct {
TestMap map[int]int
}
在RPC调用时会造成数据丢失
如题,谢谢
在node目录下,仅可以看到 node_linux.go 与 node_win.go 两个文件,因此会在mac的开发环境下报错undefined: KillProcess
您好,最近再用origin搭建server,服务器中打算设计心跳逻辑,tcpservice中如何主动关闭一个客户端连接?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.