Readme.md in optimizely_server_side-0.0.3 vs Readme.md in optimizely_server_side-0.0.4
- old
+ new
@@ -1,8 +1,10 @@
## Optimizely Server Side
[![Code Climate](https://codeclimate.com/github/ankit8898/optimizely_config_provider/badges/gpa.svg)](https://codeclimate.com/github/ankit8898/optimizely_config_provider) [![Build Status](https://travis-ci.org/ankit8898/optimizely_server_side.svg?branch=master)](https://travis-ci.org/ankit8898/optimizely_server_side)
+[![Gem Version](https://badge.fury.io/rb/optimizely_server_side.svg)](https://badge.fury.io/rb/optimizely_server_side)
+[![Test Coverage](https://codeclimate.com/github/ankit8898/optimizely_config_provider/badges/coverage.svg)](https://codeclimate.com/github/ankit8898/optimizely_config_provider/coverage)
### What is Optimizely Server Side ?
This is a wrapper on top of [Optimizely's](https://app.optimizely.com/projects) ruby sdk called [optimizely-sdk](https://github.com/optimizely/ruby-sdk) . The sdk specializes in server side setup of A/B test . You can read more about it [here](http://developers.optimizely.com/server/introduction/index.html) .
@@ -10,23 +12,30 @@
This gem solves few things:
- **Syncing AB test config across different servers when you don't want to fetch config via REST endpoint or redis/memcache store**
+ Yes, it's designed keeping performance in mind as we want to save a network overhead and a extra dependency.
+
If you are using Optimizely you will be aware about the [datafile](http://developers.optimizely.com/server/reference/index.html#datafile). Once we make changes to the A/B test like change in percent distribution, start / pause a experiment this file get's updated.
- If you have 50 servers with 40 passenger / puma process these process needs to be updated. The Gem polls the config at regular interval and keeps the file cached across different process.
+ If you have 50 servers with 40 passenger / puma process these process needs to be updated. The Gem polls the config at regular interval and keeps the datafile cached across different process.
- The config is stored in **Memory Store** .
+ The config is stored in **Memory Store** . We use [Activesupport memory store](http://api.rubyonrails.org/classes/ActiveSupport/Cache/MemoryStore.html) for same.
* **Some additional helpers**
Some more helpers exposed that can be exposed in views (.erbs) or PORO's. It avoids duplication of few activation settings.
+### Architecture
+
+![alt text](https://github.com/ankit8898/optimizely_server_side/blob/master/docs/general_architecture.png
+ "Architecture")
+
### Getting Started
-Add the gem in you Gemfile
+Add the gem in your Gemfile
```ruby
gem 'optimizely_server_side'
```
@@ -69,11 +78,10 @@
end
end
```
-
Now in your views or models
```ruby
experiment(EXPERIMENT_KEY) do |config|
@@ -91,14 +99,31 @@
end
end
```
-EXPERIMENT_KEY: The experiment key that you will be getting while setting up your experiment from https://app.optimizely.com.
+`EXPERIMENT_KEY`: The experiment key that you will be getting while setting up your experiment from https://app.optimizely.com.
-VARIATION_ONE_KEY: Key for Variation one. This will be also set when setting up experiment
+`VARIATION_ONE_KEY`: Key for Variation one. This will be also set when setting up experiment
-VARIATION_TWO_KEY: Key for Variation two. This will be also set when setting up experiment
+`VARIATION_TWO_KEY`: Key for Variation two. This will be also set when setting up experiment
-VARIATION_DEFAULT_KEY: Key for default experience. This will be also set when setting up experiment
+`VARIATION_DEFAULT_KEY`: Key for default experience. This will be also set when setting up experiment
![alt text](https://github.com/ankit8898/optimizely_server_side/blob/master/docs/screenshot.png "Logo Title Text 1")
+
+### Testing
+
+Gem uses rspec for unit testing
+
+```ruby
+bundle exec rspec .
+```
+
+```
+Finished in 0.28287 seconds (files took 1.3 seconds to load)
+36 examples, 0 failures
+```
+
+### License
+
+The MIT License