Comments (30)
The development of the client for gnet
has already started, coming soon.
The first stable version will be released within the next two months.
from gnet.
I am focusing on the gnet
implementation in server-side currently, so the delivery of client-side might be later.
from gnet.
希望快点开展client的支持,实际应用中会需要多个服务器协同工作,这时候就需要有Server和Client,我在改造的时候也遇到了相同的问题
from gnet.
I wrote a basic TCP client implementation. Seems to be working so far. The basic idea was that a client works pretty much like a server except it doesn't have a listen address. So I pretty much just added a second set of methods for setting up the Client event loop under the Server object (now the name doesn't make sense). Then there is an additional registration step of TCP connections (rather than connections being registered from the listener socket on the server). So you can use the standard golang TCPConn to dial and get the file descriptor from it and then register it to start monitoring for events. This is more of a starting point if anyone is interested.
EDIT...
Updated so that it uses syscalls instead of net.TCPconn like gnet already does. That fixes disconnect issues.
calbot@b6c453e
from gnet.
Focus on this issue progress...
from gnet.
How does it go?
from gnet.
I plan to start it after a stable server version of gnet
is released but gnet
server is still under active development, so the implementation of the gnet
client won't be delivered in the near future.
from gnet.
有进展吗?
from gnet.
暂时还没开始。
from gnet.
+1
from gnet.
+1
from gnet.
@panjf2000 i am also really interested in the client implementation and it's accompanying performance improvements compared to standard net package. If you could provide some references/guidelines regarding client implementation, i can try and make a PR!
from gnet.
@ALL
Sorry, I've been so stuck with work stuff lately that I don't have time for this in the near future!
So it would be great if someone is willing to devote to the development of gnet
client!
@panjf2000 i am also really interested in the client implementation and it's accompanying performance improvements compared to standard net package. If you could provide some references/guidelines regarding client implementation, i can try and make a PR!
Maybe you can refer to the implementation of netty
client? After all, I drew on many ideas from netty
when I was developing the server framework of gnet
. Thank you in advance. @Ice3man543
from gnet.
+1 for client for sure
from gnet.
@lesismal I believe the standard golang TCP library uses events internally except it is serialized to a single goroutine from the API perspective. If you want to load test a server it's very nice to event/non-blocking IO client otherwise you'll quickly run out of memory for all the goroutines. If you want to test thousands or millions of client connections you're going to want to use non-blocking IO/events.
from gnet.
Thanks @lesismal. I already ran my test using the my fork I mentioned above but I starred your repo for next time 😃
from gnet.
有规划了吗?
from gnet.
The development of the client for
gnet
has already started, coming soon.The first stable version will be released within the next two months.
期待client的发布,希望功能全面、性能强劲
距离7.20已经1个月了,能透露一下计划是在什么时候发布吗,client支持Windows吗
from gnet.
I was wandering ,if Client will be released in September?
from gnet.
I was wandering ,if Client will be released in September?
Yes.
from gnet.
请问,现在研发进展符合当初预期吗,9月底能否出个可交互版?
from gnet.
目前计划还是这个月底发布 v0.1.0 版本
from gnet.
Will you release the gnet client in this month?
from gnet.
Sorry for the delay, actually the code of the client has been done, but it's still not fully tested, I've been stuck in my daytime job lately.
from gnet.
咨询下client release版本有发布预计日期吗?
from gnet.
I've been stuck with the daytime job and other personal affairs for a really long time.
Therefore, I can't make a guarantee for the release date of gnet
client, I expect to have time to work on it by the end of the month and release the first version in December.
from gnet.
如果client还是用net.Dial的话,这就又让runtime去接管epoll了,runtime.netpoll的优先级又比较低,在P繁忙的情况下会有十几ms的延迟。
from gnet.
gnet leverages net.Dial() to get a reliable client socket and then duplicate its underlying fd by dup()
, finally call net.Conn.Close()
which will remove the original fd from the netpoll of Golang and close it, by then the original fd will have no impact on Go netpoll.
from gnet.
gnet的优势是利用底层网络特性,避免net库的沉重包袱,client为啥要用net.dial还是同步阻塞的呢?用系统调用级非阻塞connect, epoll托管连接状态,基于状态机驱动,比同步阻塞connect效率会高不少吧
from gnet.
hello,Client什么时候支持Windows环境呢?
from gnet.
Related Issues (20)
- [Question]: 应该如何支持 tls HOT 4
- [Feature]: 使用Engine.Stop退出时,会通过DefaultLogger输出很多错误日志 HOT 3
- [Question]: Why are http examples incompatible with MicroPython urequests
- [Bug]: bind: address already in use when using without reuseAddr parameter HOT 2
- UDP resets Context and creates new gnet.Conn OnTraffic() HOT 1
- [Feature]: 实现异步非阻塞的PacketConn接口,从而支持quic协议 HOT 2
- [Bug]: windows下的实现似乎有bug HOT 2
- [Question]: Does gnet support a websocket server that can handle different URL patterns HOT 1
- [Question]:详细的说明文档,说明什么情况下应用程序应该主动调用close方法呢 HOT 19
- [Question]: 请问 多网卡情况下,在 udp 的 OnTraffic 事件里面,怎么得到接收数据的网络接口呢 HOT 1
- [Question]: 请教运行在serverless中http的Keep-Alive应该如何配置 HOT 2
- [Question]: 数据超过65535时多次触发OnTraffic如何处理数据? HOT 2
- [Question]: 重启gnet.server需要如何做? HOT 6
- [Question]: 请问作者是否有异步读取的最佳实践示例呢? HOT 1
- [Question]:自定义codec中是否会存在接受header失败导致后续数据都无法正确获取的情况 HOT 1
- [Feature]: 添加pool来管理asyncwritev的内存, 以及客户端的api是否可以独立于服务端 HOT 7
- [Question]: IO Wait如何解决 HOT 3
- [Question]: conn_map.go:66 panic concurrent map read and map write HOT 2
- [Question]: 可疑的CPU占用 HOT 8
- [Question]: gnet打印很多error occurs in user-defined function, use of closed network connection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnet.