SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Developing MyTrafficCam
Leong Hean Hong
#HackerspaceJB #HSJB
About
● MTC shows traffic condition for JB-SG
travellers
● MTC aggregates cameras from different
sources
● I talk about how it works
● Share collected data
● Describe some of the challenges
System Design
Sponsor: JLP Technologies
System Design
● Camera sources
○ LTA (Singapore)
○ LLM (Malaysia)
○ Own camera @ Menara Cyberport
● Providing feed to
○ Mobile clients (iOS + Android)
○ Partner’s website
Sponsor: Common Extract
Components In Web Service
Sponsor: Hongineer
Software Stack
● CentOS
● Apache
● PHP 5.2
○ GluePHP (micro-framework)
○ Twig Templating library
Sponsor: Property.cc
Development Tools
● Sublime Text
○ Programming editor
● Filezilla
○ For deployment on production server
● Git
○ Source control
● Bitbucket
○ Free private repo
○ Code backup
Defining API
● Client makes request via HTTP
● Response in JSON
● API specifications documented in Google
Doc
○ Establish standardization across team
Defining API
CodeFu Techniques
Time-sensitive Photo
public static function photoURL($camId) {
$time = time();
return "/photo/{$camId}/{$time}/".self::genHash($camId, $time);
}
Add timestamp to photo URL, expires in 5
seconds
Tie Photo To Client’s IP
public static function photoURL($camId) {
return strtr('http://:host/v1api/photo/:camId/:hash', array(
':host' => $_SERVER['HTTP_HOST'],
':camId' => $camId,
':hash' => self::photoHash($camId)
));
}
protected static function photoHash($camId) {
return sha1(self::HASH_KEY.$camId.$_SERVER['REMOTE_ADDR']);
}
Prevent reuse of photo across devices
Rate-limiting Control
● Log IP address
● Allow not more than 10 requests per second
per IP
○ Currently we have only 6 cameras
Analytics
Growing from 6K
to 8K visitors
Busy night...
Analytics
More traffic in Sat/Sun
Challenges
● LLM Camera down frequently
● Need more cameras
● Cost of running MTC
Challenges
Running Out Of Bandwidth
18.50 GB in July 2014
1.73 GB from single host
Feedback
support@mytrafficcam.com

Weitere ähnliche Inhalte

Was ist angesagt?

NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
eddify
 

Was ist angesagt? (20)

Go bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KGGo bei der 4Com GmbH & Co. KG
Go bei der 4Com GmbH & Co. KG
 
Kubernetes ingress-pixelfederation
Kubernetes ingress-pixelfederationKubernetes ingress-pixelfederation
Kubernetes ingress-pixelfederation
 
DocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winnerDocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDokuPLM presentation - OW2Con 2015 Community Award winner
 
Jumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapperJumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapper
 
Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)
 
RIPE74 - ARouteServer - IXP Automation Made Easy
RIPE74 - ARouteServer - IXP Automation Made EasyRIPE74 - ARouteServer - IXP Automation Made Easy
RIPE74 - ARouteServer - IXP Automation Made Easy
 
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
 
Sprint 14
Sprint 14Sprint 14
Sprint 14
 
Sprint 62
Sprint 62Sprint 62
Sprint 62
 
Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)
 
Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)
 
Sprint 61
Sprint 61Sprint 61
Sprint 61
 
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai BuchwitzOSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
 
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
 
DevOps Fest 2019. Дмитрий Лагоза. CD for StartUp, cheap and furious
DevOps Fest 2019. Дмитрий Лагоза. CD for StartUp, cheap and furiousDevOps Fest 2019. Дмитрий Лагоза. CD for StartUp, cheap and furious
DevOps Fest 2019. Дмитрий Лагоза. CD for StartUp, cheap and furious
 
PintGlas: Pharo Image Network Transfer - GLobal Access Service
PintGlas: Pharo Image Network Transfer - GLobal Access ServicePintGlas: Pharo Image Network Transfer - GLobal Access Service
PintGlas: Pharo Image Network Transfer - GLobal Access Service
 
CNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to EnvoyCNCF Singapore - Introduction to Envoy
CNCF Singapore - Introduction to Envoy
 
Sprint 60
Sprint 60Sprint 60
Sprint 60
 

Andere mochten auch (7)

Mobile Payment
Mobile PaymentMobile Payment
Mobile Payment
 
Sept 30
Sept 30Sept 30
Sept 30
 
Risk Management views at Authentiction level (MPE 2014)
Risk Management views at Authentiction level (MPE 2014)Risk Management views at Authentiction level (MPE 2014)
Risk Management views at Authentiction level (MPE 2014)
 
Go serving: Building server app with go
Go serving: Building server app with goGo serving: Building server app with go
Go serving: Building server app with go
 
PHP_Frameworks_Discussion
PHP_Frameworks_DiscussionPHP_Frameworks_Discussion
PHP_Frameworks_Discussion
 
Risks and Threats in SoMe: Payments
Risks and Threats in SoMe: PaymentsRisks and Threats in SoMe: Payments
Risks and Threats in SoMe: Payments
 
Payfirma Mobile Payment App
Payfirma Mobile Payment AppPayfirma Mobile Payment App
Payfirma Mobile Payment App
 

Ähnlich wie Developing MyTrafficCam

Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 

Ähnlich wie Developing MyTrafficCam (20)

Building Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the CloudBuilding Kick Ass Video Games for the Cloud
Building Kick Ass Video Games for the Cloud
 
CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project Nashorn
 
introduction to micro services
introduction to micro servicesintroduction to micro services
introduction to micro services
 
Revealing ALLSTOCKER
Revealing ALLSTOCKERRevealing ALLSTOCKER
Revealing ALLSTOCKER
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
PuppetConf 2016: Why Network Automation Matters, and What You Can Do About It...
 
Deploy Eclipse hawBit in Production
Deploy Eclipse hawBit in ProductionDeploy Eclipse hawBit in Production
Deploy Eclipse hawBit in Production
 
FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache Camel
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup) Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup)
 
Lisbon Mulesoft Meetup - Logging Aggregation & Visualization
Lisbon Mulesoft Meetup - Logging Aggregation & VisualizationLisbon Mulesoft Meetup - Logging Aggregation & Visualization
Lisbon Mulesoft Meetup - Logging Aggregation & Visualization
 
Microservices at Mercari
Microservices at MercariMicroservices at Mercari
Microservices at Mercari
 
Devoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipsterDevoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipster
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017
 
Post mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EUPost mortem talk - Node Interactive EU
Post mortem talk - Node Interactive EU
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIs
 
Hassle-free IoT projects with DeviceHive — Artyom Sorokin (Tech Stage)
Hassle-free IoT projects with DeviceHive — Artyom Sorokin (Tech Stage)Hassle-free IoT projects with DeviceHive — Artyom Sorokin (Tech Stage)
Hassle-free IoT projects with DeviceHive — Artyom Sorokin (Tech Stage)
 

Mehr von Hean Hong Leong

Color filters for the dummies
Color filters for the dummiesColor filters for the dummies
Color filters for the dummies
Hean Hong Leong
 

Mehr von Hean Hong Leong (16)

Telegram Bot
Telegram BotTelegram Bot
Telegram Bot
 
How To Work With UI/UX Designer
How To Work With UI/UX DesignerHow To Work With UI/UX Designer
How To Work With UI/UX Designer
 
How not to be a mediocre developer!
How not to be a mediocre developer!How not to be a mediocre developer!
How not to be a mediocre developer!
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
 
Lazy Programmer's Guide To Writing Spec
Lazy Programmer's Guide To Writing SpecLazy Programmer's Guide To Writing Spec
Lazy Programmer's Guide To Writing Spec
 
Developing Better Software
Developing Better SoftwareDeveloping Better Software
Developing Better Software
 
Webhook & Mailhook
Webhook & MailhookWebhook & Mailhook
Webhook & Mailhook
 
Hacker Culture
Hacker CultureHacker Culture
Hacker Culture
 
Do More With Message Queue
Do More With Message QueueDo More With Message Queue
Do More With Message Queue
 
Building A Software Team
Building A Software TeamBuilding A Software Team
Building A Software Team
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
 
Android and web services
Android and web servicesAndroid and web services
Android and web services
 
Color filters for the dummies
Color filters for the dummiesColor filters for the dummies
Color filters for the dummies
 
Android security
Android securityAndroid security
Android security
 
Rubik Cubes For Geeks
Rubik Cubes For GeeksRubik Cubes For Geeks
Rubik Cubes For Geeks
 
Geekcamp Android
Geekcamp AndroidGeekcamp Android
Geekcamp Android
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Kürzlich hochgeladen (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Developing MyTrafficCam