Giter VIP home page Giter VIP logo

Comments (13)

taozywu avatar taozywu commented on May 18, 2024 1

@Allenxuxu
自定义协议方面可以参考下这个
https://github.com/ctfang/network
它这个我也研究了一些。我先抽时间尽快熟悉gev,然后看是否将两个融合一起。
如果你没时间的话,我尽力尝试下。

from gev.

Allenxuxu avatar Allenxuxu commented on May 18, 2024
  1. 文档目前确实比较少,会尽量补充的
  2. Go 中 *_test.go 这种单元测试文件一般不会放到专门的 test 目录(可以去看标准库)。
    目前目录结构 :
    • .github :GitHub Actions CI 配置
    • benchmarks :压测相关
    • connection :TCP 连接相关
    • eventloop :事件循环相关
    • example :示例代码
    • listener :TCP 监听器相关
    • poller : epoll/queue 封装的 poller
    • ws :websocket 相关
  3. TCP 粘包的处理,可以参考 ws 目录中对 websocket 的处理,因为 websocket 也是基于 tcp 的协议。
    关于框架增加自定义预留同时也多开放一些(text、frame、自定义),我也一直在思考如何增加此功能比较好,如果你有好的想法可以留言告诉我,或者直接 PR。
  4. 本项目旨在构建一个足够简洁,快速高效的异步库,剔除了很多不需要的功能,所以如果对 Reactor 有了解或者对 muduo 有了解,非常容易看懂源码的。
    关于视频讲解,这个我考虑下😳。

from gev.

MrChang0 avatar MrChang0 commented on May 18, 2024

@taozywu gev是一个精简的go网络库,现有的功能基本上readme中都有展示,稍微模仿运行改造就基本了解使用方法。
对于第2点,gev不是一个框架,只是一个网络库,类比的话相当于早期简单的swoole。提供的是底层安全可靠的tcp服务,对于更上层的协议或者是框架,考虑在gev稳定后再做计划。
我们基本研究了很多市面上各种语言主流或者非主流的网络库,gev目前来说剔除不常用的或者还未实现的非必要功能的精简网络库,很适合用于学习研究。
最后希望可以看到一些更加详细的更加具体的问题可以一起研究讨论。

from gev.

taozywu avatar taozywu commented on May 18, 2024

@Allenxuxu @MrChang0
感谢,我现在做php用的一直是workerman,swoole也接触过。所以看到咱们这个gev中的onStart/onClose/onMessage就特别很亲切。我很乐意更多去学习gev并也想如有机会能加入到你们中能更丰富gev也能对go有更好的学习。目前go基础方面也学了、也看了、也练了。正在选择框架的时候看了gin、snow、sniper、rpcx、yar-go、zinx等。当然也看到有些框架中也用到类似onXXX。接下来我打算重点研究下gev并持续投入。如果咱们有技术交流群请及时告知,感谢!!

from gev.

taozywu avatar taozywu commented on May 18, 2024

@Allenxuxu
还有个小小建议
1、目前目录结构还是感觉太乱(我也抽时间看下是否可以梳理一下)
2、目前咱们import gev 会发现必须要import gev import gev/connection import ringerbuffer... 这样个人感觉不太好。最好能import一行。

from gev.

Allenxuxu avatar Allenxuxu commented on May 18, 2024

@taozywu 感谢推荐,我最近正在思考自定义协议如何优雅融入 gev,这几天应该就能出。

from gev.

Allenxuxu avatar Allenxuxu commented on May 18, 2024

@Allenxuxu
还有个小小建议
1、目前目录结构还是感觉太乱(我也抽时间看下是否可以梳理一下)
2、目前咱们import gev 会发现必须要import gev import gev/connection import ringerbuffer... 这样个人感觉不太好。最好能import一行。

个人感觉,所有的文件放在一个包里不太好。
相反,import 这个包从路径上就能看出,这个包是干嘛的,我觉得更好。

from gev.

taozywu avatar taozywu commented on May 18, 2024

@taozywu 感谢推荐,我最近正在思考自定义协议如何优雅融入 gev,这几天应该就能出。

哈哈,看来不需要我加了。期待!

from gev.

taozywu avatar taozywu commented on May 18, 2024

@Allenxuxu
还有个小小建议
1、目前目录结构还是感觉太乱(我也抽时间看下是否可以梳理一下)
2、目前咱们import gev 会发现必须要import gev import gev/connection import ringerbuffer... 这样个人感觉不太好。最好能import一行。

个人感觉,所有的文件放在一个包里不太好。
相反,import 这个包从路径上就能看出,这个包是干嘛的,我觉得更好。

抱歉,可能我表述没太清楚。我本意是想少import。

from gev.

taozywu avatar taozywu commented on May 18, 2024

@Allenxuxu
不管怎么样,先一步一步完善,加油!期待能加入一起!

from gev.

MrChang0 avatar MrChang0 commented on May 18, 2024

@taozywu onXXX是异步非阻塞最简单实现,也是最容易理解的。进阶得话可以研究go本身得net是怎么提供“异步阻塞”这种模式。"技术交流群"有很大缺陷,很容易水群以及问题很容易被淹没住,建议在issue或者是邮件交流,可以作为长期保存。

from gev.

Allenxuxu avatar Allenxuxu commented on May 18, 2024

@Allenxuxu
不管怎么样,先一步一步完善,加油!期待能加入一起!

欢迎PR啊,有问题可以直接issue或者邮件交流,有私聊需要的话可以通过邮箱的qq号加我微信或者QQ。

from gev.

taozywu avatar taozywu commented on May 18, 2024

@MrChang0 @Allenxuxu
灰常感谢!

from gev.

Related Issues (20)

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.