Grizzly 2.0 M1 Release
By oleksiys on Apr 21, 2009
The M1 release has 4 modules:
- Framework: Grizzly 2.0 core
- RCM: Resource Consumption Filter implementation, based on Grizzly 2.0 API
- HTTP: Lightweight Web container, based on Grizzly 2.0 API
- Servlet: Lightweight Servlet container, based on Grizzly 2.0 API.
There are 2 modules, which provide examples of basic features, provided by Grizzly 2.0:
- Framework-samples: "echo" client/server application, SSL example, Connection lifecycle control using Grizzly 2.0 API, custom I/O Strategy example.
- HTTP-samples: simple Grizzly lightweight webserver using Grizzly core API (WebFilter) and higher level GrizzlyWebServer API. Both HTTP and HTTPS scenarios.
Following new features are included in this release:
- New I/O API, based on Grizzly StreamReader and StreamWriter.
- Extensible memory management API, which makes possible to implement either simple or complex memory management logic and use it with Grizzly.
- Extensible Strategy API for processing Connection events. Grizzly bundles 4 built-in strategies:
- SameThreadStrategy, which processes all I/O events in the same thread they were got (selector thread), so no additional worker threads are used. This strategy could be very useful and optimal for processing small amount of clients, and lets server have great response time
- LeaderFollowerStrategy. Performs I/O processing in the same thread (selector thread), and delegates selector polling logic to another thread.
- WorkerThreadStrategy. Performs all the I/O events in separate worker thread.
- SimpleDynamicStrategy. Dynamically applies one of the above 3 strategies, depending on number of SelectionKeys selected last time.
- WebFilter. Grizzly lightweight webcontainer implemented as Filter.
- GrizzlyWebServer. High level API to work with Grizzly lightweight webcontainer.
Later I will write separate blogs describing each feature....