Граф коммитов

276 Коммитов

Автор SHA1 Сообщение Дата
Max Gortman 65410d275a Merge pull request #120 from nayato/xml
Adds xml-doc output/packaging - fixes (#103)
2016-06-01 14:36:19 -07:00
Max Gortman 477aac9a0c Adds xml-doc output/packaging - fixes (#103)
Motivation:
Improve dev exp using DotNetty nuget packages.

Modifications:
- enabled xml-doc output on projects

Result:
xml-docs are packages along binaries in nuget packages.
2016-06-01 14:30:14 -07:00
Max Gortman acab5fc36e Merge pull request #116 from nayato/tls
Fixes TlsHandler from operation, perf and compat POVs.
2016-06-01 14:11:42 -07:00
Max Gortman f31c02e346 Fixes TlsHandler from operation, perf and compat POVs.
Motivation:
TlsHandler
Fix TlsHandler, optimize encryption / decryption wrt Write vs Flush semantics, optimize memory retention for sparse communication, adopt IByteBuffer.GetIoBuffers() in TlsHandler.

Modifications:
- TlsHandler is rewritten to use batch->copy->write approach instead of writing directly to SslStream in order to reduce overhead of framing / writing out everything separately.
- TlsHandler uses IByteBuffer.GetIoBuffers intead of direct array access increasing compatibility for non-array-backed buffers.
- TlsHandler and TlsHandler.MediationStream use Task semantics now when reading through SslStream.
- Extra: upgraded to NBench 2.2, xUnit 2.1.0.
- Extra: better portability for .NET Core support.

Result:
TlsHandler provides better framing and much better (x2+) performance (depends on application control of flushing).
TlsHandler operates properly in edge cases when more than one frame is accepted at once and if decrypted frame size is more than 4 KB.
TlsHandler holds only 256 byte buffer while waiting for more data to arrive off the wire.
Extra: DotNetty is almost .NET Core compatible.
2016-06-01 14:09:14 -07:00
Max Gortman 86749e908c Merge pull request #117 from nayato/recv
Porting adaptive receive buffer prediction
2016-05-31 18:04:24 -07:00
Max Gortman 0131fa9fe2 Porting adaptive read buffer prediction
Motivation:
Provides good flexible default while lowering memory consumption on average.

Modifications:
- Synced IRecvByteBufAllocator and relevant parts up to date
- Ported AdaptiveRecvByteBufAllocator
- Extra: properly porting ChannelMetadata

Result:
Process of receiving bytes from network is more configurable and allows for both more conservative and more agressive ingestion.
2016-05-31 17:55:07 -07:00
Max Gortman 29315699f1 Merge pull request #114 from nayato/attrs
Adds attribute support in Channel, Bootstrap [#78]
2016-05-17 17:50:41 -07:00
Max Gortman 6cf5cf5499 Adds attribute support in Channel, Bootstrap [#78]
Motivation:
Increasing feature parity and dev convenience through addition of arbitrary data assignment on Channel and related API on Bootstrap classes.

Modifications
- Introduced IAttributeMap, IAttribute<T>, IConstant and related impl artifacts.
- Moved ChannelOption to common constant codebase
- AbstractChannel now inherits from DefaultChannelMap
- Reflection-less child optoins config in ServerBootstrap
- Extra: minor closure allocation fixes, internal API fixes.

Result:
Attributes can be set on Channels, better code portability in Bootstrap.
2016-05-17 17:44:00 -07:00
Max Gortman 36ba08b5e9 Merge pull request #98 from avatar29A/port-idlestatehandler-97
Port idlestatehandler 97
2016-05-16 12:29:37 -07:00
Glebov Boris c9418595e7 Implementation Idle connections and timeouts.
Modifications:

Added new handlers:

- IdleStateHandler.cs
- ReadTimeoutHandler
- WriteTimeoutHandler
- ChannelDuplexHandler

Added a new utils class for work with time:

- TimeUtil.cs
2016-05-15 13:00:03 +05:00
Max Gortman 7f3f9e5cea set version to 0.3.0, fixing build 2016-05-13 18:17:50 -07:00
Max Gortman 5a611686c4 Merge pull request #111 from nayato/port
Moving towards .NET Platform compatibility
2016-05-13 17:41:49 -07:00
Max Gortman ebc82c4e2d Moving towards .NET Platform compatibility
Motivation:
Support new versions of .NET, have a core framework that is portable across all .NET platforms.

Modifications:
addressing part of issues reported by portability analyzer

Result:
Easier to introduce .NET Platform compatibility in the future.
2016-05-13 14:16:26 -07:00
Max Gortman c0d9ed22e6 Merge pull request #109 from nayato/lang2
Fixing minor issues and code style throughout
2016-05-13 12:38:51 -07:00
Max Gortman 8114b7fb21 Fixing minor issues and code style throughout
Motivation:
Modern language features provide for easier to read, more compact code.

Modifications:
- expression body for single line methods
- Extra: fixes in xml docs
- Extra: code style deviations in recent commits

Result:
Cleaner, more consistent code.
2016-05-13 12:18:04 -07:00
Max Gortman afb136b08a Merge pull request #96 from Aaronontheweb/inbound-only-benchmark
added inbound only TcpSocketChannel benchmark
2016-05-13 10:15:31 -07:00
Aaron Stannard e2dad0e71a added inbound only TcpSocketChannel benchmark 2016-05-13 08:59:25 -07:00
Max Gortman e705b7de67 Merge pull request #108 from nayato/writev
Enables multi-buffer send in TcpSocketChannel. Remove constraints on …
2016-05-12 19:06:19 -07:00
Max Gortman 1a80817c71 Enables multi-buffer send in TcpSocketChannel. Remove constraints on IByteBuffer for writing.
Motivation:
In order to avoid buffer copies and yet perform IO efficiently,
it is essential to support sending multiple byte sequences in one call.
Also there should be no additional constraints on IByteBuffer implementations
in order to be accepted by TcpSocketChannel for sending.

Modifications:
- IoBufferCount, GetIoBuffer(), GetIoBuffers() are ported to IByteBuffer and implementations.
- ChannelOutboundBuffer is extended to leverage *IoBuffer* members in order to prepare buffer batches for sending.
- TcpSocketChannel and its ancestors were extended to support sending (sync and async) a list of array segments.
- Extra: fixes WriterIndex positioning in ByteBufferUtil.EncodeString(..).
- Extra: TLS support and exception reporting in benchmark (commented out).
- Extra: fixes async send path in TcpSocketChannel and AbstractSocketChannel.

Result:
A benchmark of single client channel writing to a single server channel runs 3 times faster at 150K op/sec (vs 53K op/sec before) with no increase in CPU consumption.
CompositeByteBuffer can be used directly in IChannel.WriteAsync.
2016-05-12 18:42:54 -07:00
Max Gortman 1fb5f4d273 Merge pull request #107 from nayato/schedule-runnable
Adds Schedule support for IRunnable actions.
2016-05-10 15:20:35 -07:00
Max Gortman 28f6279761 Adds Schedule support for IRunnable actions.
Motivation:
Improving support for future porting efforts relying on special implementations of IRunnable tasks.

Modifications:
- Added IEventExecutor.Schedule(IRunnable, TimeSpan) overload
- Extra: cleaning out IEventExecutor.Unwrap and related IWrappedEventExecutor.
- Extra: fixing synchronization in DefaultChannelPipeline's Replace and DestroyDown methods.

Result:
Better support for IRunnable implementations in execution model.
2016-05-09 14:29:13 -07:00
Max Gortman c23becfea1 Merge pull request #106 from nayato/pipeline
Syncing core channel pipeline elements up to date.
2016-05-09 10:37:29 -07:00
Max Gortman ab72d4af7b Syncing core channel pipeline elements up to date.
Motivation:
initial port was based on now dropped netty 5.0. This is an effort to bring core channel model artifacts to terms  with ongoing development in netty 4.1. As a result future sync efforts should be much lower.

Modifications:
- Rewrote DefaultChannelPipeline (port as much as possible)
- Updated AbstractChannelHandlerContext (Skip handling is preserved from netty 5.0)
- Revisited AbstractChannel
- Extra: fixes in benchmark
- Extra: tweaking spin count on STEE

Result:
Core channel model elements are up to speed on recent modifications in netty.
2016-05-09 02:43:03 -07:00
Max Gortman 49308fb644 Merge pull request #105 from jeoffman/dev
Porting in DelimiterBasedFrameDecoder from Java (redo)
2016-05-06 10:13:02 -07:00
jeoffman 7bbfe1bddf porting in DelimiterBasedFrameDecoder from Java (redo) 2016-05-06 06:29:08 -05:00
Max Gortman 45c8c70649 Merge pull request #101 from nayato/bufferpool
PooledByteBufferAllocator port, Byte Buffers improvements
2016-05-05 19:11:46 -07:00
mgortman cef1295c3c PooledByteBufferAllocator port, Byte Buffers improvements
Motivation:
Existing rudimentary buffer pool implementation is not flexible to efficiently support scenarios with high variety in message sizes.

Modifications:
- implemented PooledByteBufferAllocator (port of PooledByteBufAllocator) and related artifacts
- made IByteBuffer implement IEquatable<IByteBuffer>, IComparable<IByteBuffer>, implemented Equals, GetHashCode.
- ported test suite for Byte Buffers and fixed discovered issues.
- added suppression of ExecutionContext flow on async read / write on socket-based channels.
- removed old pooled Byte Buffer allocator implementation.

Result:
Support for buffer pooling for larger byte sequences, more efficient usage of memory dedicated for the pool.
2016-05-05 17:40:07 -07:00
Max Gortman 152b0375ae Merge pull request #102 from nayato/lang
switching to C# 6.0
2016-05-05 10:49:11 -07:00
Max Gortman 47163fde8d switching to C# 6.0 2016-05-05 01:19:49 -07:00
Max Gortman 401d48fb4c Merge pull request #95 from Aaronontheweb/nbench-integration
added NBench support + End2End performance spec for TcpSocketChannel
2016-05-01 10:22:07 -07:00
Aaron Stannard 31864c6db0 added NBench support + End2End performance spec for TCP 2016-05-01 10:06:10 -07:00
Max Gortman 3fb1984e9c Merge pull request #94 from robichaud/jsonobjectdecoder-93
Implemented JsonObjectDecoder
2016-04-28 01:35:49 -07:00
robichaud 17d7429d5d Ported JsonObjectDecoder
Motivation:
Needed a json decoder

Modifications:
- added JsonObjectDecoder

Result:
- implemented JsonObjectDecoder
2016-04-27 20:30:40 -05:00
Max Gortman 4d8b02eca7 refreshed build, set version to 0.2.6 2016-04-27 17:45:52 -07:00
Max Gortman 66caa64871 Merge pull request #91 from nayato/shutdown
Fixes ByteBuffer+Stream integration, TLS neg, STEE Shutdown
2016-04-27 11:39:42 -07:00
Max Gortman aa3cbc6766 Fixes ByteBuffer+Stream integration, TLS neg, STEE Shutdown
Motivation:
Fix up top priority issues to ensure proper working state with recent changes.

Modifications:
- TlsHandler negotiates TLS 1.0+ on server side (#89)
- STEE properly supports graceful shutdown (#7)
- UnpooledHeapByteBuffer.GetBytes honors received index and length (#88)
- Echo E2E test uses length-prefix based framing (#90)

Result:
Setting up DotNetty does not require workarounds for shutdown and hacks to enable negotiation of higher versions of TLS. Tests are passing even with new SslStream behavior.
2016-04-27 10:51:02 -07:00
Max Gortman d3e6fe4b54 Merge pull request #86 from avatar29A/implement-stringdecoder-and-string-encoder-85
Implementation the StringEncoder and StringDecoder and all them depen…
2016-04-27 03:13:03 -07:00
Glebov Boris a8b40617fd Implementation the StringEncoder and StringDecoder and all them dependencies
Modifications

 - Added LineBasedFrameDecoder.cs
 - Added MessageToMessageDecoder.cs
 - Added StringDecoder.cs, StringEncoder.cs
 - Added ByteProcessor.cs
 - Added methods ForEachByte in IByteBuffer (also implemented them in AbstractByteBuffer.cs, EmptyByteBuffer.cs, SwappedByteBuffer, WrappedByteBuf);
 - Added method EncodeString in ByteBufferUtil.cs
2016-04-27 15:03:20 +05:00
Max Gortman a5832b5abc Merge pull request #87 from Aaronontheweb/locked-fake
fixed nuget 3.x packaging issues
2016-04-26 21:42:41 -07:00
Aaron Stannard e0180e36c8 fixed nuget 3.x packaging issues 2016-04-26 21:38:01 -07:00
Max Gortman 45e7a081b2 set version to 0.2.5 2016-04-15 01:43:22 -07:00
Max Gortman db6ae6c9b2 Merge pull request #83 from mtuchkov/schedulefix
Hotfix: poll task from the queue.
2016-04-14 18:28:50 -07:00
Mikhail 30806f5eac Poll task from the queue. Hotfix 2016-04-14 18:14:43 -07:00
Max Gortman e9d3fce6ef Merge pull request #82 from nayato/build-signed
Better signed build automation
2016-04-10 01:10:03 -07:00
mgortman 3cfcafd75e set version to 0.2.4 2016-04-08 02:54:48 -07:00
mgortman 13863df29d Better signed build automation
Motivation
Since signed assemblies became part of the release they slowed down release cycle due to extended effort necessary to prepare nuget packages with signed assemblies.

Modifications
- introduced "Signed" solution configuration
- optional Test Friends (turned off in Signed)
- re-signing support in build script

Result
New releases can be produced quicker with less effort.
2016-04-08 02:52:18 -07:00
Max Gortman ed028ed5a1 Merge pull request #81 from nayato/no-breakout
STEE: smarter idle waiting for scheduled tasks
2016-04-06 13:58:57 -07:00
mgortman ba716c6778 STEE: smarter idle waiting for scheduled tasks
Motivation:
use of breakoutInterval setting on SingleThreadEventExecutor while executor is idling is confusing to users and inefficient due to fixed interval wake ups. We can do better by peeking next scheduled task and use its deadline for wait timeout.
While breakoutInterval is still useful while executor is busy, it can be reduced now to much lower number without impacting idle performance.

Modifications:
- When going to wait due to empty immediate queue, consult with scheduled task queue to figure out timeout value (next task's deadline - now).
- default breakoutInterval changed to 100 ms for higher resolution for scheduled tasks while busy.

Result:
Better precision for scheduled tasks at no performance cost while idling.
2016-04-06 13:35:26 -07:00
Max Gortman 198655332b Merge pull request #80 from nayato/cancel-schedule
Adds IEventExecutor.Schedule, proper cancellation of scheduled tasks
2016-04-05 19:25:20 -07:00
mgortman d5a4c30778 Adds IEventExecutor.Schedule, proper cancellation of scheduled tasks
Motivation:
Allow for less GC when scheduling if Task-based API is not required. Allow for proper cleanup when canceling scheduled task so that associated resources can be cleaned up early.

Modifications:
- Moved out scheduled task implementations from AbstractScheduledEventExecutor
- Introduced IScheduledTask and aligned IScheduledRunnable
- Implemented removal of scheduled task upon its cancellation
- Extra minor fixes
 - IByteBuffer.ToString(Encoding) honoring ArrayOffset
 - InternalLoggerFactory creating default logging factory lazily

Result:
Scheduled tasks that normally never fire (e.g. timeout handling) do not cause resources to be held up unnecessarily in memory for longer period of time if not necessary.
2016-04-05 19:17:46 -07:00