Giter VIP home page Giter VIP logo

dabao-netty's Introduction

Netty project for remote DATA transfer

Things to concern

  1. stable - the server would always be online
  2. concurrency - use case show that many users may concurrent send data server at traffic summit period
  3. persistence - data at last need to be persisted safely for further analysis(both offline and online)
  4. protocol - maybe protobuf for protocol definition.
  5. economy - zero-copy, less memory resource consumption

Goal : Asynchronous, non-blocking, event-driven data transfer

What may we utilize?

  1. netty(5.x) - asynchorous, event-driven network application. concurrent, non-block
  2. levelDB
  3. Kafka
  4. Redis, MongoDB, MySQL etc.
  5. Flume???

Netty concepts

  1. Buffers
  2. Codec
  3. Pipelines and Handlers
  4. Multiple protocol - Http, Websocket, protobuf, Binary; TCP&UDP

Thread model

  1. Tomcat - 1 thread = 1 request; fast for ~ 1000 clients, too much memory consumption
  2. NodeJs - 1 thread = all request; super scalable and limited error handling.
  3. Netty - 1 thread = many request; flexible model

Examples

HttpServer

  1. Set up thread pool - boss pool for handling incoming connections; working pool for handling I/O

dabao-netty's People

Watchers

James Cloos avatar yubo 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.