Git Product home page Git Product logo

netty-tools's Introduction

netty-tools

A small collection of tools useful when working with JBoss Netty. The HTTP tools are useful for adding simple web features to your server.

Included

  • HTTP File Server
    A file serving handler based on Trustin Lee's example. Supports serving from file system or class path.
  • HTTP Cache
    A simple cache to be used in conjunction with the file server (see above). Will cache served files in-memory. Intended for caching smaller files.
  • HTTP Router
    Simple router that can route incoming HTTP requests to different ChannelHandlers. Supports very basic matching rules.
  • Bandwidth meter
    A monitor to measure the use of bandwidth in your Netty application. Place it first in your pipeline and it will measure the size of sent/received ChannelBuffers.
  • Async WebSocket client
    A WebSocket client in pure Java with Netty. Useful for integration testing. Being event-driven, it's also perfect for doing heavy load testing of WebSocket servers.
  • Thrift server support
    An RPC processor for Thrift is included together with a ChannelBuffer transport.
  • Thrift client support
    Transport for enabling Thrift clients to connect to remote Thrift servers through Netty. Thanks Davide Inglima!
  • Flash Policy file handling
    Can detect and respond to Adobe Flash Policy file requests. When not used, it can simply remove itself providing minimal performance hit.

Netty is not a web server and these tools are quite "raw" in the HTTP sense. If you intend to do anything moderately complex, please look elsewhere. I've used it for creating small HTTP-based admin interfaces for my Netty servers. That's one use case where these tools may come in handy.

This project is used in two applications the main author is working on. First one is Beaconpush, a real-time push server for browsers and mobile phones supporting a wide array of transports including Web Sockets. And the second one is Sonar Voice, which is an embeddable VoIP solution for the web/desktop/mobile with distributed voice servers.

Getting started

netty-tools is available on Maven Central. Just include the dependency in your POM file and you'll be up and running:

<dependency>
    <groupId>com.cgbystrom</groupId>
    <artifactId>netty-tools</artifactId>
    <version>1.2.7</version>
</dependency>

Examples

As of now, please see the tests for example usage.

Version history

  • 1.2.0 - Thrift HTTP support
  • 1.1.1 - Bug fixes
  • 1.1.0 - Thrift client and Flash Policy file handler
  • 1.0.2 - Async WebSocket client, Thrift support + various bug fixes
  • 1.0.1 - Internal version
  • 1.0.0 - Initial version

Authors

License

Open source licensed under the MIT license (see LICENSE file for details).

netty-tools's People

Contributors

cgbystrom avatar joachimhs avatar limacat avatar rshelley avatar

Watchers

 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.