Skip to content

chore: Updated change log and readme #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 26, 2019
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Optimizely Csharp SDK Changelog

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Let's say C# and not Csharp.


## 3.3.0
September 3rd, 2019
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date change to 19th september.


### New Features:
- Added support for event batching via the event processor.
- Events generated by methods like `activate`, `track`, and `isFeatureEnabled` will be held in a queue until the configured batch size is reached, or the configured flush interval has elapsed. Then, they will be combined into a request and sent to the event dispatcher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activate, Track, IsFeatureEnabled typo.

- To configure event batching, set the `eventBatchSize` and `eventFlushInterval` properties in the `OptimizelyFactory` using `OptimizelyFactory.SetBatchSize(int batchSize)` and `OptimizelyFactory.SetFlushInterval(TimeSpan flushInterval)` and then create `OptimizelyFactory.NewDefaultInstance`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the correct property names. @mnoman09

- Event batching is enabled by default. `eventBatchSize` defaults to `10`. `eventFlushInterval` defaults to `30000` Milliseconds.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. milliseconds (small m)

- Updated the `dispose` method representing the process of closing the instance. When `dispose` is called, any events waiting to be sent as part of a batched event request will be immediately batched and sent to the event dispatcher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be immediately batched or timed out depending on the timed out interval @mikeng13 @mjc1283 is this suggestion look OK?

Copy link

@mjc1283 mjc1283 Aug 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest saying immediately batched and sent to event dispatcher, then describe the timeout functionality in another bullet point.

- If any such requests were sent to the event dispatcher, `close` waits for provided `TimeoutInterval` before closing, so that events get successfully dispatched.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close?


### Deprecated
- `EventBuilder` was deprecated and now we will be using `UserEventFactory` and `EventFactory` to create logEvents.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we added warning for eventbuilder ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LogEvents, referring to class.

- `LogEvent` was deprecated from `TrackNotification` and `ActivateNotification` notifications in favor of explicit `LogEvent` notification.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks bit confusing. We are talking about notification and above this point, we are talking about class. Need to distinguish clearly between these two points.

- New features will no longer be supported on `.net standard 1.6` and `.net 3.5`

## 3.2.0
July 22nd, 2019

Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The Optimizely client object accepts the following plug-ins:
2. `ILogger` exposes a single method, Log, to record activity in the SDK. An example of a class to bridge the SDK's Log to Log4Net is provided in the Demo Application.
3. `IErrorHandler` allows you to implement custom logic when Exceptions are thrown. Note that Exception information is already included in the Log.
4. `ProjectConfigManager` exposes method for retrieving ProjectConfig instance. Examples include `FallbackProjectConfigManager` and `HttpProjectConfigManager`.

5. `EventProcessor` provides an intermediary processing stage within event production. It's assumed that the EventProcessor dispatches events via a provided EventDispatcher. Examples include `ForwardingEventProcessor` and `BatchEventProcessor`.
These are optional plug-ins and default behavior is implement if none are provided.

#### OptimizelyFactory
Expand All @@ -91,6 +91,37 @@ You can also provide default datafile with the SDK key.
Optimizely optimizely = OptimizelyFactory.newDefaultInstance(<<SDK_KEY>>, <<Fallback>>);
```

#### BatchEventProcessor
[BatchEventProcessor](https://github.com/optimizely/csharp-sdk/blob/master/OptimizelySDK/Event/BatchEventProcessor.cs) is a batched implementation of the [EventProcessor](https://github.com/optimizely/csharp-sdk/blob/master/OptimizelySDK/Event/EventProcessor.cs)
* Events passed to the BatchEventProcessor are immediately added to a BlockingQueue.
* The BatchEventProcessor maintains a single consumer thread that pulls events off of the BlockingQueue and buffers them for either a configured batch size or for a maximum duration before the resulting LogEvent is sent to the NotificationManager.
##### Use BatchEventProcessor

```
EventProcessor eventProcessor = new BatchEventProcessor.Builder()
.WithMaxBatchSize(MaxEventBatchSize)
.WithFlushInterval(MaxEventFlushInterval)
.WithEventDispatcher(eventDispatcher)
.WithNotificationCenter(notificationCenter)
.Build();
```

##### Max Event Batch Size

The Max event batch size is used to limit eventQueue batch size and events will be dispatched when limit reaches.

##### Flush Interval

The FlushInterval is used to specify a delay between consecutive flush events call. Event batch will be dispatched after meeting this specified timeSpan.

##### Event Dispatcher

Custom EventDispatcher can be passed.

##### Notification Center

Custom NotificationCenter can be passed.

#### HttpProjectConfigManager

[`HttpProjectConfigManager`](https://github.com/optimizely/csharp-sdk/blob/master/OptimizelySDK/Config/HttpProjectConfigManager.cs)
Expand Down