Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Release new features using feature sliders
Search
Dimiter Petrov
November 20, 2013
Programming
0
100
Release new features using feature sliders
A presentation of the arturo gem
Dimiter Petrov
November 20, 2013
Tweet
Share
More Decks by Dimiter Petrov
See All by Dimiter Petrov
thoughtbot defaults with suspenders
crackofdusk
0
130
Multi-tenancy with Rails
crackofdusk
1
140
Developing Ruby gems with native extensions
crackofdusk
0
110
Offloading server work to the client side
crackofdusk
1
160
Other Decks in Programming
See All in Programming
從零到一:搭建你的第一個 Observability 平台
blueswen
1
780
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
160
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
360
無関心の谷
kanayannet
0
160
MLOps Japan 勉強会 #52 - 特徴量を言語を越えて一貫して管理する, 『特徴量ドリブン』な MLOps の実現への試み
taniiicom
2
650
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
21
5.8k
複数アプリケーションを育てていくための共通化戦略
irof
9
3.7k
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.2k
「兵法」から見る質とスピード
ickx
0
260
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
140
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
2.9k
ワンバイナリWebサービスのススメ
mackee
10
7.7k
Featured
See All Featured
Building Applications with DynamoDB
mza
95
6.4k
What's in a price? How to price your products and services
michaelherold
245
12k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
680
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Practical Orchestrator
shlominoach
188
11k
The Cult of Friendly URLs
andyhume
79
6.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Making Projects Easy
brettharned
116
6.2k
Transcript
Release new features using feature sliders Dimiter Petrov @crackofdusk 20
November 2013
Introduction
A feature can be too large for a single development
cycle
A feature may need testing by a small group before
being deployed to all users
You need fine-grained control over feature deployment
Feature sliders
Feature sliders Turn on and off features for some of
the users
Feature sliders with the arturo gem
Integrating arturo in your application 1. Create migration for features
table 2. Add configuration initializer 3. Mount arturo engine in the router 4. Run migration 5. Use arturo helpers to wrap features
Features table Needs a column for feature names and a
column for deployment percentage
Deployment percentage? Feature X can be deployed to m percent
of the users
Deployment percentage? Feature X can be deployed to m percent
of the users Deterministic: a feature is consistently enabled from now on for that m percent of users unless you decrease the deployment percentage.
Feature conditionals
Controller filters class ReservationsController < ApplicationController require_feature :reserve_table end
Conditional evaluation def widgets_for_sidebar widgets = [] widgets << twitter_widget
if feature_enabled?(:tweeting) # ... widgets end
Conditional evaluation <% if_feature_enabled(:reserve_table) %> <%= link_to ’Reserve a table’,
new_restaurant_reservation_path(restaurant) %> <% end %>
Feature conditionals oustide controllers Arturo.feature_enabled_for?(:reserve_table, recipient) Arturo.reserve_table_enabled_for?(recepient)
Fine-grained control
Whitelists & blacklists # config/initializers/arturo_initializer.rb Arturo::Feature.whitelist(:awesome) do |user| user.account.premium? end
Arturo::Feature.blacklist(:goodies) do |user| user.account.free? end
Feature recepients The current “thing” that is in the category
thatisthebasisfordeployingnewfeatures. E.g: a user, an account, a project, a venue,…
Feature recepients # config/initializers/arturo_initializer.rb Arturo.feature_recipient do current_project end
Feature administration
Feature administration Navigate to /features and manage features from the
mounted rails engine
Administration permissions # Default permissions current_user.present? && current_user.admin?
Administration permissions # Default permissions current_user.present? && current_user.admin? # config/initializers/arturo_initializer.rb
Arturo.permit_management do signed_in? && current_user.can?(:manage_features) end
Live demo https://github.com/happydawn/arturo-test
Thank you!