Giter VIP home page Giter VIP logo

javahotfix's People

Contributors

gangan786 avatar zhenjunma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

javahotfix's Issues

大佬看看是不是遗漏了这一处ServerStatus status的维护

在接受完所有三种类型数据的时候,需要重新监听/tmp/hotfix.sock,当接受到热更新信号的时候,需要将ServerStatus status变更为ServerStatus.HOT_FIX,源代码补充如下
public void startHotFixServer() { new Thread(() -> { try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(EpollServerDomainSocketChannel.class) .childHandler(new ChannelInboundHandlerAdapter() { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { ByteBuf buf = (ByteBuf) msg; if (buf.readInt() == 1){ //关闭监听 hotFixServerChannelFuture.channel().close().addListener(future -> { if (!future.isSuccess()){ future.cause().printStackTrace(); } }); /* 老者接收到迁移信号:1,开始迁移连接信息 */ System.out.println("老者接收到迁移信号:1,开始迁移连接信息"); status = ServerStatus.HOT_FIX; //这里就是遗漏的地方 startListenerTransferTask(); } } }); SocketAddress s = new DomainSocketAddress(DomainSocketAddressEnum.TAG_HOTFIX.path()); hotFixServerChannelFuture = b.bind(s).sync(); }catch (Exception e){ e.printStackTrace(); } }).start(); System.out.println("启动监听hot-fix"); }

fd迁移方案的疑问

目前我在调研Netty的fd迁移方案,有幸看到大佬的Netty实现。想请问一下,之前貌似是使用的SO_REUSEPORT的方案来实现的,后来又改成了基于uds来实现的,请问如果是基于SO_REUSEPORT来实现的话,是有什么问题吗?

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.