• This repository has been archived on 06/May/2020
  • Stars
    star
    262
  • Rank 156,136 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 14 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of tools useful when working with JBoss Netty.

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).

More Repositories

1

spotify-local-http-api

Simple client for local, built-in HTTP server in the Spotify player.
Python
105
star
2

hoard

node.js lib for storing time series data on disk, similar to RRD.
JavaScript
88
star
3

locust

Scalable user load simulator written in Python and gevent
JavaScript
68
star
4

awesome-trunk-based-dev

A curated list of trunk based development resources
65
star
5

sockjs-netty

Library for building SockJS compatible servers using Netty and the JVM.
Java
59
star
6

real-world-bazel

Bazel build files collected from real-world GitHub projects
Python
31
star
7

jersey-netty

Netty bindings for Jersey
Java
27
star
8

node-beaconpush

node.js client for Beaconpush (a cloud hosted service for browser push messaging with Web Sockets and Comet)
CoffeeScript
12
star
9

rubikey

Yubikey validation server written in Ruby using Sinatra and JSON
Ruby
7
star
10

actandra

An activity stream implemented using Cassandra
Python
5
star
11

yum-s3-plugin

Yum plugin for accessing protected repositories on Amazon S3
Python
4
star
12

tcp-accept-test

Pathological test server designed to reproduce bad TCP accept() performance under Xen
Java
3
star
13

stalker

Tracer for server-side HTTP requests in your browser
CSS
2
star
14

node-template-shootout

Benchmarking of node.js template languages
JavaScript
2
star
15

dot-emacs

Emacs Configuration
Emacs Lisp
2
star
16

voddler-chrome-ext

Google Chrome extension adding IMDB ratings to voddler.com
JavaScript
2
star
17

jvm-template-shootout

Benchmark of template engines on the JVM
Java
2
star
18

realtime-blog

Simple test of server and client side rendering of templates
Python
1
star
19

wsgi-accelerator

Simple HTTP cache for Python/WSGI applications with fine-grained invalidation
Python
1
star
20

shepherd

A virtual repository manager for yum
Ruby
1
star