随笔分类 -  netty4.x

netty ChannelOption参数 backlog 和 somaxconn同时设置才会生效
摘要:https://www.cnblogs.com/qiumingcheng/p/9492962.html 阅读全文

posted @ 2019-11-13 20:33 CreatorKou 阅读(315) 评论(0) 推荐(0)

netty优化学习积累+++++++
摘要:一、 c/s-Handler在需要发送消息时,不一定必须调用writeandFlush(),如果对于一些零碎的消息都writeAndFlush(),那么多次频繁的调用对应多次的syscall系统调用,如何减少系统调用提高效率? write()函数,对于多次要发送的零碎的消息都采用write()函数, 阅读全文

posted @ 2019-10-14 20:12 CreatorKou 阅读(270) 评论(0) 推荐(0)

aio的缺陷和问题(linux aio, java aio(nio.2)
摘要:https://lwn.net/Articles/671649/ https://stackoverflow.com/questions/20973754/linux-aio-poor-scaling 高性能网络服务器编程:为什么linux下epoll是最好,Netty要比NIO.2好? http: 阅读全文

posted @ 2019-10-14 10:48 CreatorKou 阅读(741) 评论(0) 推荐(0)

netty pooled vs unpooled ByteBuf
摘要:Whats the difference between Pooled vs Unpooled and Direct vs Heap in ByteBuf? Like , what does pooled means in context of a message received , becaus 阅读全文

posted @ 2019-10-12 19:48 CreatorKou 阅读(1202) 评论(0) 推荐(0)

Http-Netty-Rpc-Service系统改造:不要在springboot的启动主线程中阻塞,nettyserver的postconstruct注解的init方法中不要写future.channel().closeFuture().sync();
摘要:常规的demo级别的netty服务端的代码写法是这样的: 在这里面future.channel().closeFuture().sync();这个语句的主要目的是,方便测试,方便写一个非springboot的demo,比如一个简单地junit test方法,closeFuture().sync()可 阅读全文

posted @ 2019-09-29 11:34 CreatorKou 阅读(4965) 评论(0) 推荐(0)

jmeter压力测试netty-rpc-service
摘要:只发送消息,不等待结果,线程太快,有些channel还没有写完数据,就stop了,所以本来设置了1000个samples,结果只有337次发送到服务端 jmeter的threadgroup中的每个thread在启动时,拿到public class TestDemo extends AbstractJ 阅读全文

posted @ 2019-09-20 23:43 CreatorKou 阅读(2264) 评论(1) 推荐(0)

ChannelInboundHandlerAdapter, SimpleChannelInboundHandler<I>区别和优缺点
摘要:看源码,推荐用ChannelInboundHandlerAdapter https://www.rumoss.cn/archives/183/ https://stackoverflow.com/questions/36075855/multiple-channelinboundhandlerada 阅读全文

posted @ 2019-09-05 16:43 CreatorKou 阅读(972) 评论(0) 推荐(0)

Http-Netty-Rpc-Service系统
摘要:20190823rpc系统修改日志https://github.com/KouReal/Rpc-Netty-Registry/tree/master将httpserver模块的httptask去掉,直接在httpserverhandler调用rpcproxy的call的rpcclient的invok 阅读全文

posted @ 2019-08-23 19:53 CreatorKou 阅读(314) 评论(0) 推荐(0)

解决netty tcp自定义消息格式粘包/拆包问题
摘要:项目地址:https://github.com/KouReal/netty-study-0816 参考:https://www.cnblogs.com/sidesky/p/6913109.html 使用到的开源库:Reflections, 根据注解找到一个包下的所有类Class https://st 阅读全文

posted @ 2019-08-16 17:37 CreatorKou 阅读(608) 评论(0) 推荐(0)

Myfox开发笔记
摘要:1.一个头疼的问题,客户端怎么组织随时发送消息,在ManWeb.connect()中通过Sendmessage.ch = f.channel();拿到channel然后保存到另一个类里面就好了,channel.writeandflush可以写消息。(参见channel官方文档) 阅读全文

posted @ 2018-06-16 23:42 CreatorKou 阅读(661) 评论(0) 推荐(0)

netty:本地client无法连接远程server(阿里云)
摘要:需要在阿里云控制台,设置防火墙,添加规则:全部TCP+UDP,端口范围:1/65535 阅读全文

posted @ 2018-06-14 10:11 CreatorKou 阅读(469) 评论(0) 推荐(0)

java makefile学习实践(编译的javac命令写在makefile中,运行命令java写在shell脚本中)
摘要:学习makefile教程,ubuntu中文网 1.写一个简单的java项目,不需要外部jar,用的简单的 hellocat Hellocat.java Cat.java makefile 执行的时候还得输入java Hellocat,这个项目比较小无所谓,如果遇到大的项目,各种package,需要调 阅读全文

posted @ 2018-06-14 00:12 CreatorKou 阅读(775) 评论(0) 推荐(0)

导航