Add metrics and benchmarking framework
- subproject/s4-benchmarks contains a simple benchmarking framework
- metrics are placed at various places across the codebase
- fixed a few potential race conditions
Bind S4Metrics as an eager singleton
Performance improvements
- upgraded kryo to version 2
- removed intermediate "EventMessage" class
- refactored serialized message handling by using ByteBuffer instead of
byte arrays
(this reduces copies and allows further optimizations)
- as a result, the internal API for sender and emitters has changed
Use a custom module for loading app classes
- can load from either current class path, or from fetched S4R (using S4RLoader)
disable proxy class dump (can still be used for debugging purposes)
Performance improvements and configurability
- clearly identify asynchronous stages and use configurable and injectable executors
for each of them (deserialization, processing, serialization)
- default executors for processing/sending use throttling
- stream processing now parallelizable, per stream
- Sender and Receiver are now interfaces, part of the base API
- SenderImpl and ReceiverImpl are default implementations in s4-core
- simplified regression tests for communication protocols
Fix classloading issue
- classes with dependency on the application classloader must be bound through the AppModule,
and relevant classes now include Listener implementations for instance
Improve throttling and benchmark apps
- limit number of pending messages for TCP channel
- added benchmark app with internal communications
Asynch serialization by default + add synchro in injector
- injector now only starts injecting when target consumers are all available
(allows to easily check that no event is lost)
Throttling and shedding improvements
- use a load shedding stream executor by default (drops incoming events when local stream queue is full)
- use a blocking sender executor by default
- provide throttling executors with limit rate
Address review comments + provide more sender executors
- use a throttling sender by default
Properly handle interruption
Merge branch 'S4-95' into dev