SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Remote Con g
REST API and Versioning
shibuya.apk #24
@red_fat_daruma
Agenda
What's Remote Con g?
How do we use Remote Con g?
What can we do by using REST API?
About Remocon
Remote Con g
Firebase family
Change your app's behavior
and view w/o distributing an
update
Completely free for now
Uses
Seasonal stuff which don't depend on device time
e.g. promotions, component control etc.
A/B testing
User segment-based value distributions
Of cial Client Libraries
For Android, iOS, Web app
Consist of 3 features
Fetch con gs and cache them
Set default values for missing keys
Return an associated value with a key
i.e. kinda GET-only KVS client w/ cache system
Overview of Client
Default & Fetched
Con g are sources
for Active Con g
ref: https:// rebase.google.com/docs/remote-con g/api-overview
Client libraries kindly handle
troublesome problems!
e.g. data consistensy, cache etc.
But they are just readers...
Cannot be used for Remote Con g management
So far
If you wanna update...
Only web UI editor is available
You need to click PUBLISH CHANGES after editing
Web UI looks rich! but...
No validations for values
If you wanna use JSON value, that's horrible
Cannot update automatically
Publishers might forget to click PUBLISH CHANGES (I
often do that)
Diffs are not visible
Who updated? What was changed?
Not friendly for non-developers
In addition, don't want them to open projects...
2018/03/13
Announcing the Remote
Con g REST API
https://goo.gl/twVB6w
Remote Con g REST API
Like single JSON object store and/or Firestore
Not key-based management interface
Get
Fetch con gs from the server as a json le
Update
Put a json le to update con gs on the server
ref: https:// rebase.google.com/docs/remote-con g/use-con g-rest
Authentication
Access token approach
1. Download a service account key of the project
2. Publish an access token (which has a time limit)
by using Google API Client
1. Download a key
SERVICE ACCOUNTS tab in your project setting
Publish an access token
For example, this is for python2.
% sudo easy_install oauth2client
% YOUR_EDITOR publish_access_token.py
API Spec
Endpoint
https:// rebaseremotecon g.googleapis.com/v1/projects/${your_p
roject_id}/remoteCon g
Supported methods
GET
PUT (w/ a le upload)
Accept-Encoding: deflate, gzip is required
If missing, Etag is not included
GET con gs
The of cial sample is based on curl
curl --compressed 
-D headers 
-H "Authorization: Bearer $token" 
-X GET 
"$ENDPOINT" 
-o "$output_file_path"
# --compressed is required to see etag
PUT con gs
curl --compressed -i 
-H "Content-Type: application/json; UTF8" 
-H "If-Match: last-returned-etag" 
-H "Authorization: Bearer $token" 
-X PUT 
"$ENDPOINT" 
-d @filename_of_config_json
# --compressed is required if you wanna see etag
Web UI looks rich! but... (again)
No validations for values
If you wanna use JSON value, that's horrible
Cannot update automatically
Publishers might forget to click PUBLISH CHANGES (I
often do that)
Diffs are not visible
Who updated? What was changed?
Not friendly for non-developers
In addition, don't want them to open projects...
What we can do w/ REST API
Value validations by your code
Nested json is not allowed so json validator is
still required
Update automatically by your code
PUT API publishes changes immediately
Diffs would be visible on your VCS
Non-developers can change con gs safely w/o
rebase permission by your code
Btw, are diffs readable
between jsons?
The answer is NO
Okay, I'll do it by myself...
so where is a sdk?
THERE IS NO SDK
Remocon
Ruby Gem - https://github.com/jmatsu/remocon
YAML-based RemoteCon g manager
Additional features
Validation system
File content load
How to use
1. Install remocon
2. Prepare an access token
3. export the following variables
FIREBASE_PROJECT_ID
REMOTE_CONFIG_ACCESS_TOKEN
4. Run commands!
Get con gs
remocon pull --dest=${output_dir}`
Create 4 les
con g.json : raw.json on the server
etag : etag
conditions.yml : condition de nitions
parameters.yml : parameter de nitions
Get con gs
remocon pull --dest=${output_dir}`
Create 4 les
con g.json : raw json on the server
etag : etag
conditions.yml : condition de nitions
parameters.yml : parameter de nitions
Only parameters.yml is what you will update
Update con gs
Create a json le to be uploaded
Of course, validations run in this section
remocon create 
--conditions="/path/to/conditions.yml" 
--parameters="/path/to/parameters.yml"`
And then, push it to the server
remocon push 
--source="/path/to/config.json" 
--etag="/path/to/etag"
Validation
Just run the following command
remocon validation 
--conditions="/path/to/conditions.yml" 
--parameters="/path/to/parameters.yml"`
Format of parameters.yml
How does it work on CI?
On feature branch
Just validate
On master
Load a service account json
Publish an access token
Just push your les
So it's like terraform's plan and apply
ref: http://tech.mercari.com/entry/2018/04/09/110000
Future work
Diff-based update
A prototype already worked on my local...
More readable diff command
Plugin system for validators
Fix a bug which was found while creating these
slides
Make it stable... and 1.0.0 release
Appendix1
Can we start with a blank remote con g?
Yes. But you need to get the initial Etag by
calling GET api.
Can we update con gs regularly or speci c time?
Partially yes. Firebase doesn't have such
features, so we need to use a time-based job
scheduler like cron.
Can we create conditions by API?
No. You need to create them from the console.
Appendix2
Best practice for fetching Remote Con g
https://goo.gl/Uw5nzq
If you know how to build expressions of
conditions, please let me know...!!!

Weitere ähnliche Inhalte

Was ist angesagt?

Capistrano Deployment By Nyros Developer
Capistrano Deployment By Nyros DeveloperCapistrano Deployment By Nyros Developer
Capistrano Deployment By Nyros DeveloperNyros Technologies
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails WorkshopAlex Rupérez
 
Reusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/RhinoReusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/RhinoKenneth Kalmer
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components IntroductionEugenio Romano
 
1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)Yuichiro MASUI
 
Tools of the CPAN Ninja
Tools of the CPAN NinjaTools of the CPAN Ninja
Tools of the CPAN NinjaAran Deltac
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.netSireesh K
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Loiane Groner
 
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化Ryosuke Uchitate
 
OpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationOpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationMichiel Kalkman
 
Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8Katy Slemon
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisFastly
 
Retrofit library for android
Retrofit library for androidRetrofit library for android
Retrofit library for androidInnovationM
 
決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話Ryosuke Uchitate
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 

Was ist angesagt? (20)

Capistrano Deployment By Nyros Developer
Capistrano Deployment By Nyros DeveloperCapistrano Deployment By Nyros Developer
Capistrano Deployment By Nyros Developer
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
 
Rack
RackRack
Rack
 
Pyramid deployment
Pyramid deploymentPyramid deployment
Pyramid deployment
 
Reusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/RhinoReusing your frontend JS on the server with V8/Rhino
Reusing your frontend JS on the server with V8/Rhino
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 
1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)
 
Tools of the CPAN Ninja
Tools of the CPAN NinjaTools of the CPAN Ninja
Tools of the CPAN Ninja
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.net
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018
 
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
Micrometerでメトリクスを収集してAmazon CloudWatchで可視化
 
OpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationOpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integration
 
DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5
 
Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8
 
Capistrano
CapistranoCapistrano
Capistrano
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Retrofit library for android
Retrofit library for androidRetrofit library for android
Retrofit library for android
 
Automake
AutomakeAutomake
Automake
 
決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 

Ähnlich wie REST API and Versioning for Remote Config Management

Istio Playground
Istio PlaygroundIstio Playground
Istio PlaygroundQAware GmbH
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web appsFastly
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerAndrew Phillips
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteorSapna Upreti
 
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트Amazon Web Services Korea
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.jsDev_Events
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...Amazon Web Services
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTKai Zhao
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsChris Bailey
 
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트) Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User ExperienceAccumulo Summit
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0Eugenio Romano
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoasZeid Hassan
 

Ähnlich wie REST API and Versioning for Remote Config Management (20)

Red5 - PHUG Workshops
Red5 - PHUG WorkshopsRed5 - PHUG Workshops
Red5 - PHUG Workshops
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
AWS 고객사를 위한 ‘AWS 컨테이너 교육’ - 유재석, AWS 솔루션즈 아키텍트
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...
High Velocity DevOps: Four Ways to Leverage CloudFront in Faster DevOps Workf...
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트) Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
Improving the Accumulo User Experience
 Improving the Accumulo User Experience Improving the Accumulo User Experience
Improving the Accumulo User Experience
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 

Kürzlich hochgeladen

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

REST API and Versioning for Remote Config Management

  • 1. Remote Con g REST API and Versioning shibuya.apk #24 @red_fat_daruma
  • 2. Agenda What's Remote Con g? How do we use Remote Con g? What can we do by using REST API? About Remocon
  • 3. Remote Con g Firebase family Change your app's behavior and view w/o distributing an update Completely free for now
  • 4. Uses Seasonal stuff which don't depend on device time e.g. promotions, component control etc. A/B testing User segment-based value distributions
  • 5. Of cial Client Libraries For Android, iOS, Web app Consist of 3 features Fetch con gs and cache them Set default values for missing keys Return an associated value with a key i.e. kinda GET-only KVS client w/ cache system
  • 6. Overview of Client Default & Fetched Con g are sources for Active Con g ref: https:// rebase.google.com/docs/remote-con g/api-overview
  • 7. Client libraries kindly handle troublesome problems! e.g. data consistensy, cache etc.
  • 8. But they are just readers... Cannot be used for Remote Con g management
  • 10. If you wanna update... Only web UI editor is available You need to click PUBLISH CHANGES after editing
  • 11. Web UI looks rich! but... No validations for values If you wanna use JSON value, that's horrible Cannot update automatically Publishers might forget to click PUBLISH CHANGES (I often do that) Diffs are not visible Who updated? What was changed? Not friendly for non-developers In addition, don't want them to open projects...
  • 12. 2018/03/13 Announcing the Remote Con g REST API https://goo.gl/twVB6w
  • 13.
  • 14. Remote Con g REST API Like single JSON object store and/or Firestore Not key-based management interface Get Fetch con gs from the server as a json le Update Put a json le to update con gs on the server ref: https:// rebase.google.com/docs/remote-con g/use-con g-rest
  • 15. Authentication Access token approach 1. Download a service account key of the project 2. Publish an access token (which has a time limit) by using Google API Client
  • 16. 1. Download a key SERVICE ACCOUNTS tab in your project setting
  • 17. Publish an access token For example, this is for python2. % sudo easy_install oauth2client % YOUR_EDITOR publish_access_token.py
  • 18. API Spec Endpoint https:// rebaseremotecon g.googleapis.com/v1/projects/${your_p roject_id}/remoteCon g Supported methods GET PUT (w/ a le upload) Accept-Encoding: deflate, gzip is required If missing, Etag is not included
  • 19. GET con gs The of cial sample is based on curl curl --compressed -D headers -H "Authorization: Bearer $token" -X GET "$ENDPOINT" -o "$output_file_path" # --compressed is required to see etag
  • 20. PUT con gs curl --compressed -i -H "Content-Type: application/json; UTF8" -H "If-Match: last-returned-etag" -H "Authorization: Bearer $token" -X PUT "$ENDPOINT" -d @filename_of_config_json # --compressed is required if you wanna see etag
  • 21. Web UI looks rich! but... (again) No validations for values If you wanna use JSON value, that's horrible Cannot update automatically Publishers might forget to click PUBLISH CHANGES (I often do that) Diffs are not visible Who updated? What was changed? Not friendly for non-developers In addition, don't want them to open projects...
  • 22. What we can do w/ REST API Value validations by your code Nested json is not allowed so json validator is still required Update automatically by your code PUT API publishes changes immediately Diffs would be visible on your VCS Non-developers can change con gs safely w/o rebase permission by your code
  • 23. Btw, are diffs readable between jsons?
  • 25. Okay, I'll do it by myself... so where is a sdk?
  • 26. THERE IS NO SDK
  • 27. Remocon Ruby Gem - https://github.com/jmatsu/remocon YAML-based RemoteCon g manager Additional features Validation system File content load
  • 28. How to use 1. Install remocon 2. Prepare an access token 3. export the following variables FIREBASE_PROJECT_ID REMOTE_CONFIG_ACCESS_TOKEN 4. Run commands!
  • 29. Get con gs remocon pull --dest=${output_dir}` Create 4 les con g.json : raw.json on the server etag : etag conditions.yml : condition de nitions parameters.yml : parameter de nitions
  • 30. Get con gs remocon pull --dest=${output_dir}` Create 4 les con g.json : raw json on the server etag : etag conditions.yml : condition de nitions parameters.yml : parameter de nitions Only parameters.yml is what you will update
  • 31. Update con gs Create a json le to be uploaded Of course, validations run in this section remocon create --conditions="/path/to/conditions.yml" --parameters="/path/to/parameters.yml"` And then, push it to the server remocon push --source="/path/to/config.json" --etag="/path/to/etag"
  • 32. Validation Just run the following command remocon validation --conditions="/path/to/conditions.yml" --parameters="/path/to/parameters.yml"`
  • 34. How does it work on CI? On feature branch Just validate On master Load a service account json Publish an access token Just push your les So it's like terraform's plan and apply ref: http://tech.mercari.com/entry/2018/04/09/110000
  • 35. Future work Diff-based update A prototype already worked on my local... More readable diff command Plugin system for validators Fix a bug which was found while creating these slides Make it stable... and 1.0.0 release
  • 36. Appendix1 Can we start with a blank remote con g? Yes. But you need to get the initial Etag by calling GET api. Can we update con gs regularly or speci c time? Partially yes. Firebase doesn't have such features, so we need to use a time-based job scheduler like cron. Can we create conditions by API? No. You need to create them from the console.
  • 37. Appendix2 Best practice for fetching Remote Con g https://goo.gl/Uw5nzq If you know how to build expressions of conditions, please let me know...!!!