Skip to content
/ teddy Public

🌏 Teddy is a tiny but scalable http server based on Java NIO, inspired by netty.

License

Notifications You must be signed in to change notification settings

Aneureka/teddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

teddy

teddy is a tiny but scalable http server implemented with Java NIO, inspired by netty.

Structure

image-20191221002609408

teddy is implemented in Reactor pattern with Java NIO.

A server instance is equiped with an Acceptor and a Worker : Acceptor accepts upcoming sockets as well as offers them into the SocketChannelQueue ; Worker binds with a Selector and keeps consuming sockets from queue and selecting interested I/O operations.

Each SocketChannel is attached with a ChannelHandlerPipeline , which handles upstreams from SocketChannel and downstreams from application at the top layer. The server is flexible because adding more ChannelHandler to the pipeline is allowed, so you can handle both upstream and downstream at a higher layer.

Progress

πŸ™†β€β™€οΈ TCP layer

πŸ™†β€β™€οΈ HTTP layer: A standard & usable HTTP layer is already implemented, including HTTP message model, decoder, encoder...

πŸ‘©β€πŸ’» XXX layer: You may add another layer by implementing ChannelHandler and add it to ChannelPipeline.

About

🌏 Teddy is a tiny but scalable http server based on Java NIO, inspired by netty.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages