SlideShare a Scribd company logo
Python Experience in KKBOX Group
Shuen-Huei (Drake) Guan
#Taipei.py (It was originally planned for PyCon TW)
04/21/2016
Let’s conduct some surveys first.
pyKKBOX? pyUIA? Mass?
@drakeguan
- Technical Director, KKStream
- Sr. Principal Engineer, KKBOX
- Volunteer, PyCon Taiwan
“This talk is about a compilation of tasks and projects, done in
Python, in KKBOX Group. Each project has its own
challenges and context to deal with. What you can take home
are some stories and experience.”
Warning: it’s just our own experience, not suitable to yours!
pyKKBOX, 2011
KKBOX “一起聽”
KKBOX “一起聽”
● An user can broadcast what he/she is listening to others.
● Multiple users are then able to subscribe to his/her station, listening to the
same song simultaneously.
● A major/highlighted KKBOX feature developed in 2011.
Challenges by “一起聽”
● iOS (client) co-works with Windows (broadcaster) only.
● There is even no broadcasters to listen to!
● In academia, we may call this “ill-posed (optimization) problem”.
pyKKBOX, https://github.com/KKBOX/pyKKBOX
pyKKBOX
● It is a lite-weight, not fully functional client.
● It is initially just a bot, which can login, and do broadcasting.
● It should be easy because we are iOS client team, not server team.
● It’s a proof of concept.
API Testing by pyKKBOX
● Now we have bots:
○ A tool to do stress testing.
○ A tool to provide radio-like automatic service.
● And then, more APIs are in.
● Test cases for KKBOX API!
● Hourly testing on Jenkins CI.
Playlist Auto-Sync
● CPL (Cloud PlayList) synchronization.
● The sync is not done based on data (playlist), but JSON-based commands!
● In 3 months, the API’s version changed 5 times.
● n-to-m synchronization makes it even worse.
● pyKKBOX is, again, used to prototype even though technical spec is not
finalized.
Toy Project: Photomosaic by pyKKBOX
Album covers by pyKKBOX
Yes. That’s me.
Photomosaic
● It’s based on KKBOX 2014 workshop group photo.
● 1,500 album covers are used.
● Final photomosaic resolution: 14k x 6k.
● I didn’t read the official KKBOX API yet. Just self-introspection of pyKKBOX in
IPython is enough.
● Coding time: less than half hour.
pyKKBOX facts
● Initiated in 2011, to ~2013.
● Two main contributors (Welly Liu and @zonble), but with ~10 contributors then.
● Just the builtin Python modules (including PyObjC) are used.
“Another weapon for app developers;
prototyping, or even trash-able code, is a great fit here;
being a glue, a common language among diversified developers if you’re doing
multi-platform product development;
Python speaks plain language.”
● Hmm, we have no further plans yet. :p
pyUIA, 2013
Testing Goals & Reports
Testing for Playlist Auto-Sync
● Easy to manage and organize playlists across various devices.
● Multiple devices, mostly in different platforms, are involed.
One Test Case (iOS > Android)
1. On iOS, create a new playlist.
2. On Android, check if the playlist
created in step 1 appears.
A (Pseudo) Test Script that Works!
Abstraction of Layers for Testing
pyUIA, https://github.com/imsardine/pyuia
pyUIA, https://github.com/imsardine/pyuia
pyUIA facts
● Initiated in 2014 and it keeps evolving.
● It doesn’t take much time because it’s just simply works. v0.3 is released on
June 2015. http://www.slideshare.net/jeremykao92/pyuia-03
● 3 developers contribute their talents.
● Python packages: selenium, robotframework and Appium-Python-Client.
“Somehow, we just want to implement automated tests in Pythonic way!”
● 120 Release Acceptance Test (RAT) are on pyUIA, ~20% cases.
Video Encoding System, 2014
Video Streaming Service
● KKBOX forms a team, Video Development, to build video streaming services
in Japan. They are Videopass and Animepass.
● More than 1,000,000 subscription users.
● More than 30,000 videos, not that many but resource-consuming.
Challenges for Video Encoding System
● Given a couple of thousands of videos;
● given ~150 videos per day;
● given a scalable number of encoders on EC2 instances;
● assuming the workflow for each video can be different;
● how to make a robust system to handle this challenge in consideration of
○ just 1.5 developer(s)
○ everything can be broken
○ computing resource is expensive (c3.8xlarge, c4.8xlarge, …)
○ it’s a vivid world~
One Simplified Audio Encoding Workflow
Another Simplified Encoding Workflow
Render Farm Idea from VFX/Animation Industry
Ed Catmull, Pixar
Pixar’s Alfred
http://bit.ly/1rnR0Ht
Mass, https://github.com/kkbox/mass
Mass, https://github.com/kkbox/mass
● Job script as the central data to control the workflow, instead of fixed coding
logics in workers.
● Focus on data, the workflow and real work, than underneath system or
infrastructure.
● Leverage AWS SWF (or Apache Kafka, Mesos, or other message brokers) to
provide robust, fault-tolerant and fully automatic distributed system.
Mass facts
● Initiated in 2014, and it keeps rocking~
● Just 2 mid-level Python developers (they both have presented in PyCon TW).
● Python packages: arrow, awscli, boto, click, clint, flask, filechunkio, flask,
fluent-logger, isodate, logbook, parmap, requests, sh.
“We hope to polish the open-sourced Mass much sexy and useful in near
future.”
● 3,000,000-minute videos got encoded through it.
● Mass once finished 3,000 videos encoding within one day without any issue
while 800 encoders on 100 c3.8xlarge instances were on duty.
RDC Toolbox, 2015
KKBOXers demands more data-driven facts/info
One example of request ticket from production team
Someone can learn from others’ queries!
“透過Python你幾乎可以做到任何事情, 剩下的就只是
你不知道要這樣做而已, 但是用戶的使用方式會教你
這件事。”
--- RDC Toolbox main developer
RDC Toolbox facts
● Initiated in Oct 2015, still quite young.
● 1.5 developer(s) with many contributes then.
● Python packages: flask, pandas, psycopg2, redis, requests, slacker, sqlparse.
“python 的強大社群
想架站的時候有 flask
想處理資料的時候有 pandas
想用創意的方式來log有 slacker
切測試環境的時候有 virtualenv
如果不使用python, 我應該沒辦法在一個人和這麼短的時間內完成 prototype”
● 10,000,000,000 metering data to deal with.
● 10,000 queries conducted by (mostly) non-developers.
● Lots of future plan. We are building music streaming specific BI tools.
AWS Lambda CI/CD
It would get shared in PyCon TW 2016
Finally, let’s do some surveys again,
but in KKBOX Group (just for fun).
What programming languages have you used
to contribute your talents in KKBOX Group?
What programming languages are you
HAPPY to work with in KKBOX Group?
What programming languages are you planning
to learn for future challenges in KKBOX Group?
Thank you!

More Related Content

What's hot

CI/CD on pure AWS
CI/CD on pure AWSCI/CD on pure AWS
CI/CD on pure AWS
Andrey Trubitsyn
 
Infrastructure as a Code
Infrastructure as a Code Infrastructure as a Code
Infrastructure as a Code
Ahmed Mekkawy
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*
Haggai Philip Zagury
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
Lars Rosenquist
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
nklmish
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
AdaCore
 
Modern Monitoring [ with Prometheus ]
Modern Monitoring [ with Prometheus ]Modern Monitoring [ with Prometheus ]
Modern Monitoring [ with Prometheus ]
Haggai Philip Zagury
 
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
Codefresh
 
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuffBuildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Patrick Shuff
 
Everything as code
Everything as codeEverything as code
Everything as code
kloia
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
Charlie Gracie
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
Codefresh
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
NETWAYS
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
Roman Podoliaka
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
Brandon Mueller
 
CI/CD 101
CI/CD 101CI/CD 101
CI/CD 101
djdule
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in MelbourneAnsible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ken Thompson
 
GitLab - Java User Group
GitLab - Java User GroupGitLab - Java User Group
GitLab - Java User Group
PhilippWestphalen
 

What's hot (20)

CI/CD on pure AWS
CI/CD on pure AWSCI/CD on pure AWS
CI/CD on pure AWS
 
Infrastructure as a Code
Infrastructure as a Code Infrastructure as a Code
Infrastructure as a Code
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
 
Modern Monitoring [ with Prometheus ]
Modern Monitoring [ with Prometheus ]Modern Monitoring [ with Prometheus ]
Modern Monitoring [ with Prometheus ]
 
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
Multi-cloud CI/CD with failover powered by K8s, Istio, Helm, and Codefresh
 
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuffBuildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
 
Everything as code
Everything as codeEverything as code
Everything as code
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
 
CI/CD 101
CI/CD 101CI/CD 101
CI/CD 101
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in MelbourneAnsible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
 
GitLab - Java User Group
GitLab - Java User GroupGitLab - Java User Group
GitLab - Java User Group
 

Viewers also liked

從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
Shuen-Huei Guan
 
Streaming Experience
Streaming ExperienceStreaming Experience
Streaming Experience
Shuen-Huei Guan
 
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
Shuen-Huei Guan
 
AWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast ForwardAWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast Forward
Shuen-Huei Guan
 
Migrate the Mission Critical Application to AWS Cloud
Migrate the Mission Critical Application to AWS CloudMigrate the Mission Critical Application to AWS Cloud
Migrate the Mission Critical Application to AWS Cloud
Shuen-Huei Guan
 
AWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap TaiwanAWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap Taiwan
Shuen-Huei Guan
 
Seamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise SupportSeamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise Support
Shuen-Huei Guan
 
Spatial Disorientation
Spatial DisorientationSpatial Disorientation
Spatial Disorientation
Shuen-Huei Guan
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1
Shuen-Huei Guan
 
PyConTW 2013 經驗分享
PyConTW 2013 經驗分享PyConTW 2013 經驗分享
PyConTW 2013 經驗分享
Shuen-Huei Guan
 
Python Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StylePython Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding Style
Shuen-Huei Guan
 
Python + NoSQL in Animations
Python + NoSQL in AnimationsPython + NoSQL in Animations
Python + NoSQL in Animations
Shuen-Huei Guan
 
Reyes and Shader Pipeline
Reyes and Shader PipelineReyes and Shader Pipeline
Reyes and Shader Pipeline
Shuen-Huei Guan
 
PHPConf.TW 2012: A step to better PHP
PHPConf.TW 2012: A step to better PHPPHPConf.TW 2012: A step to better PHP
PHPConf.TW 2012: A step to better PHP
Yi-Feng Tzeng
 
重構三兩事
重構三兩事重構三兩事
重構三兩事
teddysoft
 
The IoC Hydra
The IoC HydraThe IoC Hydra
The IoC Hydra
Kacper Gunia
 
不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会
Joseph Chiang
 
Enterprise Architecture Case in PHP (MUZIK Online)
Enterprise Architecture Case in PHP (MUZIK Online)Enterprise Architecture Case in PHP (MUZIK Online)
Enterprise Architecture Case in PHP (MUZIK Online)
Yi-Feng Tzeng
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享
William Yeh
 

Viewers also liked (20)

從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章
 
Streaming Experience
Streaming ExperienceStreaming Experience
Streaming Experience
 
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
 
AWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast ForwardAWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast Forward
 
Migrate the Mission Critical Application to AWS Cloud
Migrate the Mission Critical Application to AWS CloudMigrate the Mission Critical Application to AWS Cloud
Migrate the Mission Critical Application to AWS Cloud
 
AWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap TaiwanAWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap Taiwan
 
Seamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise SupportSeamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise Support
 
Spatial Disorientation
Spatial DisorientationSpatial Disorientation
Spatial Disorientation
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1
 
PyConTW 2013 經驗分享
PyConTW 2013 經驗分享PyConTW 2013 經驗分享
PyConTW 2013 經驗分享
 
Python Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StylePython Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding Style
 
Python + NoSQL in Animations
Python + NoSQL in AnimationsPython + NoSQL in Animations
Python + NoSQL in Animations
 
Reyes and Shader Pipeline
Reyes and Shader PipelineReyes and Shader Pipeline
Reyes and Shader Pipeline
 
PHPConf.TW 2012: A step to better PHP
PHPConf.TW 2012: A step to better PHPPHPConf.TW 2012: A step to better PHP
PHPConf.TW 2012: A step to better PHP
 
重構三兩事
重構三兩事重構三兩事
重構三兩事
 
The IoC Hydra
The IoC HydraThe IoC Hydra
The IoC Hydra
 
不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会不断归零的前端人生 - 2016 中国软件开发者大会
不断归零的前端人生 - 2016 中国软件开发者大会
 
Enterprise Architecture Case in PHP (MUZIK Online)
Enterprise Architecture Case in PHP (MUZIK Online)Enterprise Architecture Case in PHP (MUZIK Online)
Enterprise Architecture Case in PHP (MUZIK Online)
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享
 

Similar to Python Experience in KKBOX Group

Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1Udi Bauman
 
Exploits of the Snapcraft Ninja
Exploits of the Snapcraft NinjaExploits of the Snapcraft Ninja
Exploits of the Snapcraft Ninja
Dani Llewellyn
 
Python_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.pptPython_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.ppt
VGaneshKarthikeyan
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
Linaro
 
Language Matters: JavaScript 
from IoT Product Concept 
to Production
Language Matters: JavaScript 
from IoT Product Concept 
to ProductionLanguage Matters: JavaScript 
from IoT Product Concept 
to Production
Language Matters: JavaScript 
from IoT Product Concept 
to Production
Kinoma
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouse
Altinity Ltd
 
GitOps Core Concepts & Ways of Structuring Your Repos
GitOps Core Concepts & Ways of Structuring Your ReposGitOps Core Concepts & Ways of Structuring Your Repos
GitOps Core Concepts & Ways of Structuring Your Repos
Weaveworks
 
Beyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in ProductionBeyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in Production
C4Media
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
Eran Shlomo
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
Cisco Russia
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
Karolis Ramanauskas
 
OLPC Learning Club DC Jan 2009 Meeting
OLPC Learning Club DC Jan 2009 MeetingOLPC Learning Club DC Jan 2009 Meeting
OLPC Learning Club DC Jan 2009 Meeting
Mike Lee
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
aspyker
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
All Things Open
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Jamie Coleman
 
An Introduction to PyPy
An Introduction to PyPyAn Introduction to PyPy
An Introduction to PyPy
Michael Hudson-Doyle
 
TiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsTiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium Applications
Jamil Spain
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnycJamil Spain
 
PySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March MeetupPySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March Meetup
Holden Karau
 
DA 592 - Term Project Report - Berker Kozan Can Koklu
DA 592 - Term Project Report - Berker Kozan Can KokluDA 592 - Term Project Report - Berker Kozan Can Koklu
DA 592 - Term Project Report - Berker Kozan Can KokluCan Köklü
 

Similar to Python Experience in KKBOX Group (20)

Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1
 
Exploits of the Snapcraft Ninja
Exploits of the Snapcraft NinjaExploits of the Snapcraft Ninja
Exploits of the Snapcraft Ninja
 
Python_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.pptPython_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.ppt
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Language Matters: JavaScript 
from IoT Product Concept 
to Production
Language Matters: JavaScript 
from IoT Product Concept 
to ProductionLanguage Matters: JavaScript 
from IoT Product Concept 
to Production
Language Matters: JavaScript 
from IoT Product Concept 
to Production
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouse
 
GitOps Core Concepts & Ways of Structuring Your Repos
GitOps Core Concepts & Ways of Structuring Your ReposGitOps Core Concepts & Ways of Structuring Your Repos
GitOps Core Concepts & Ways of Structuring Your Repos
 
Beyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in ProductionBeyond the Hype: 4 Years of Go in Production
Beyond the Hype: 4 Years of Go in Production
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
OLPC Learning Club DC Jan 2009 Meeting
OLPC Learning Club DC Jan 2009 MeetingOLPC Learning Club DC Jan 2009 Meeting
OLPC Learning Club DC Jan 2009 Meeting
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
An Introduction to PyPy
An Introduction to PyPyAn Introduction to PyPy
An Introduction to PyPy
 
TiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsTiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium Applications
 
Documenting apps ti confnyc
Documenting apps   ti confnycDocumenting apps   ti confnyc
Documenting apps ti confnyc
 
PySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March MeetupPySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March Meetup
 
DA 592 - Term Project Report - Berker Kozan Can Koklu
DA 592 - Term Project Report - Berker Kozan Can KokluDA 592 - Term Project Report - Berker Kozan Can Koklu
DA 592 - Term Project Report - Berker Kozan Can Koklu
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 

Python Experience in KKBOX Group

  • 1. Python Experience in KKBOX Group Shuen-Huei (Drake) Guan #Taipei.py (It was originally planned for PyCon TW) 04/21/2016
  • 2. Let’s conduct some surveys first. pyKKBOX? pyUIA? Mass?
  • 3. @drakeguan - Technical Director, KKStream - Sr. Principal Engineer, KKBOX - Volunteer, PyCon Taiwan
  • 4. “This talk is about a compilation of tasks and projects, done in Python, in KKBOX Group. Each project has its own challenges and context to deal with. What you can take home are some stories and experience.” Warning: it’s just our own experience, not suitable to yours!
  • 7. KKBOX “一起聽” ● An user can broadcast what he/she is listening to others. ● Multiple users are then able to subscribe to his/her station, listening to the same song simultaneously. ● A major/highlighted KKBOX feature developed in 2011.
  • 8. Challenges by “一起聽” ● iOS (client) co-works with Windows (broadcaster) only. ● There is even no broadcasters to listen to! ● In academia, we may call this “ill-posed (optimization) problem”.
  • 10. pyKKBOX ● It is a lite-weight, not fully functional client. ● It is initially just a bot, which can login, and do broadcasting. ● It should be easy because we are iOS client team, not server team. ● It’s a proof of concept.
  • 11. API Testing by pyKKBOX ● Now we have bots: ○ A tool to do stress testing. ○ A tool to provide radio-like automatic service. ● And then, more APIs are in. ● Test cases for KKBOX API! ● Hourly testing on Jenkins CI.
  • 12. Playlist Auto-Sync ● CPL (Cloud PlayList) synchronization. ● The sync is not done based on data (playlist), but JSON-based commands! ● In 3 months, the API’s version changed 5 times. ● n-to-m synchronization makes it even worse. ● pyKKBOX is, again, used to prototype even though technical spec is not finalized.
  • 14. Album covers by pyKKBOX Yes. That’s me.
  • 15. Photomosaic ● It’s based on KKBOX 2014 workshop group photo. ● 1,500 album covers are used. ● Final photomosaic resolution: 14k x 6k. ● I didn’t read the official KKBOX API yet. Just self-introspection of pyKKBOX in IPython is enough. ● Coding time: less than half hour.
  • 16. pyKKBOX facts ● Initiated in 2011, to ~2013. ● Two main contributors (Welly Liu and @zonble), but with ~10 contributors then. ● Just the builtin Python modules (including PyObjC) are used. “Another weapon for app developers; prototyping, or even trash-able code, is a great fit here; being a glue, a common language among diversified developers if you’re doing multi-platform product development; Python speaks plain language.” ● Hmm, we have no further plans yet. :p
  • 18. Testing Goals & Reports
  • 19. Testing for Playlist Auto-Sync ● Easy to manage and organize playlists across various devices. ● Multiple devices, mostly in different platforms, are involed.
  • 20. One Test Case (iOS > Android) 1. On iOS, create a new playlist. 2. On Android, check if the playlist created in step 1 appears.
  • 21. A (Pseudo) Test Script that Works!
  • 22. Abstraction of Layers for Testing
  • 25. pyUIA facts ● Initiated in 2014 and it keeps evolving. ● It doesn’t take much time because it’s just simply works. v0.3 is released on June 2015. http://www.slideshare.net/jeremykao92/pyuia-03 ● 3 developers contribute their talents. ● Python packages: selenium, robotframework and Appium-Python-Client. “Somehow, we just want to implement automated tests in Pythonic way!” ● 120 Release Acceptance Test (RAT) are on pyUIA, ~20% cases.
  • 27. Video Streaming Service ● KKBOX forms a team, Video Development, to build video streaming services in Japan. They are Videopass and Animepass. ● More than 1,000,000 subscription users. ● More than 30,000 videos, not that many but resource-consuming.
  • 28. Challenges for Video Encoding System ● Given a couple of thousands of videos; ● given ~150 videos per day; ● given a scalable number of encoders on EC2 instances; ● assuming the workflow for each video can be different; ● how to make a robust system to handle this challenge in consideration of ○ just 1.5 developer(s) ○ everything can be broken ○ computing resource is expensive (c3.8xlarge, c4.8xlarge, …) ○ it’s a vivid world~
  • 29. One Simplified Audio Encoding Workflow
  • 31. Render Farm Idea from VFX/Animation Industry Ed Catmull, Pixar Pixar’s Alfred
  • 32.
  • 35. Mass, https://github.com/kkbox/mass ● Job script as the central data to control the workflow, instead of fixed coding logics in workers. ● Focus on data, the workflow and real work, than underneath system or infrastructure. ● Leverage AWS SWF (or Apache Kafka, Mesos, or other message brokers) to provide robust, fault-tolerant and fully automatic distributed system.
  • 36. Mass facts ● Initiated in 2014, and it keeps rocking~ ● Just 2 mid-level Python developers (they both have presented in PyCon TW). ● Python packages: arrow, awscli, boto, click, clint, flask, filechunkio, flask, fluent-logger, isodate, logbook, parmap, requests, sh. “We hope to polish the open-sourced Mass much sexy and useful in near future.” ● 3,000,000-minute videos got encoded through it. ● Mass once finished 3,000 videos encoding within one day without any issue while 800 encoders on 100 c3.8xlarge instances were on duty.
  • 38. KKBOXers demands more data-driven facts/info
  • 39. One example of request ticket from production team
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. Someone can learn from others’ queries!
  • 46. RDC Toolbox facts ● Initiated in Oct 2015, still quite young. ● 1.5 developer(s) with many contributes then. ● Python packages: flask, pandas, psycopg2, redis, requests, slacker, sqlparse. “python 的強大社群 想架站的時候有 flask 想處理資料的時候有 pandas 想用創意的方式來log有 slacker 切測試環境的時候有 virtualenv 如果不使用python, 我應該沒辦法在一個人和這麼短的時間內完成 prototype” ● 10,000,000,000 metering data to deal with. ● 10,000 queries conducted by (mostly) non-developers. ● Lots of future plan. We are building music streaming specific BI tools.
  • 47. AWS Lambda CI/CD It would get shared in PyCon TW 2016
  • 48. Finally, let’s do some surveys again, but in KKBOX Group (just for fun).
  • 49. What programming languages have you used to contribute your talents in KKBOX Group?
  • 50.
  • 51. What programming languages are you HAPPY to work with in KKBOX Group?
  • 52.
  • 53. What programming languages are you planning to learn for future challenges in KKBOX Group?
  • 54.