SlideShare a Scribd company logo
1 of 55
Download to read offline
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

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 PipelinesLars Rosenquist
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Dockernklmish
 
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 GPRbuildAdaCore
 
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-shuffPatrick Shuff
 
Everything as code
Everything as codeEverything as code
Everything as codekloia
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRCharlie Gracie
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshCodefresh
 
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 applicationsCesar Cardenas Desales
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applicationsRoman Podoliaka
 
CI/CD 101
CI/CD 101CI/CD 101
CI/CD 101djdule
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, 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 MelbourneKen Thompson
 

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
 
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 ForwardShuen-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 CloudShuen-Huei Guan
 
AWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap TaiwanAWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap TaiwanShuen-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 SupportShuen-Huei Guan
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1Shuen-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 StyleShuen-Huei Guan
 
Python + NoSQL in Animations
Python + NoSQL in AnimationsPython + NoSQL in Animations
Python + NoSQL in AnimationsShuen-Huei Guan
 
Reyes and Shader Pipeline
Reyes and Shader PipelineReyes and Shader Pipeline
Reyes and Shader PipelineShuen-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 PHPYi-Feng Tzeng
 
重構三兩事
重構三兩事重構三兩事
重構三兩事teddysoft
 
不断归零的前端人生 - 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 styleBo-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 NinjaDani 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.pptVGaneshKarthikeyan
 
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 IoTLinaro
 
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 ProductionKinoma
 
cLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouseAltinity 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 ReposWeaveworks
 
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 ProductionC4Media
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSCisco Russia
 
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 MeetingMike Lee
 
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 NetflixAll Things Open
 
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 Programaspyker
 
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.pptxJamie Coleman
 
TiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsTiConf NYC - Documenting Your Titanium Applications
TiConf NYC - Documenting Your Titanium ApplicationsJamil 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 MeetupHolden 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
 
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
 
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
 
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

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

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.