Git Product home page Git Product logo

netty's Introduction

Netty学习笔记

netty

###netty

1.一个EventLoopGroup当中会包含一个或者多个EventLoop
2.一个EventLoop在他的整个生命周期当中都会与唯一一个Thread进行绑定
3.所有的EventLoop所处理的各种I/O事件都将在它所关联的那个Thread上进行处理
4.一个Channel在他的整个生命周期中只会注册在一个EventLoop上
5.一个EventLoop在运行过程当中,会被分配给一个或者多个Channel

结论 在Netty中,Channel的实现一定是线程安全的;基于此,我们可以存储一个Channeld的引用,并且在需要向远程端点发送数据时,通过这个引用来调用Channel相应的方法;即便当时有很多线程都在使用他也不会出现线程不安全的问题;而且,消息一定会按照顺序发送出去。 重要结论 我们在业务的开发中,不要将

netty's People

Contributors

mikeygithub avatar

Watchers

 avatar  avatar  avatar

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.