SlideShare a Scribd company logo
URBANESIA
 Development History
Business Connect – 29 Oktober 2012




       Prepared by: Batista Harahap
URBANESIA BETA V0
The first public iteration of Urbanesia
PROS


•   Data structures in MySQL
•   Effective memory caching implementations
•   Effective SEO implementations
•   Effective search server implementations
•   Urbanesia is successfully consumed as a
    Directory
CONS

• No effective separation of Backend & Frontend web
  applications
• Source Code = Spaghetti Code
• Storing low value, high volume data in MySQL
• Many queries using GROUP BY with highly populated tables
• A warm boot will cause +20 seconds to generate any page
• Difficult to scale horizontally & vertically
• Very low concurrency

• The product’s identity is weak
• So many features left unused by users
WHAT WE LEARNED

• Do NOT use MySQL as session storage
• Use NoSQL database for low value, high volume
  data
• Separate backend & frontend web application,
  create APIs for backends
• Use output caching where available
• When using PHP-APC, make sure apc.stat = 0
• Increase concurrency by reverse proxying
  requests to Apache
CHALLENGES


• Handle Google Bots traffic of over 1 TB/month
  with only 2 servers
• Do output caching with Codeigniter
• Achieving sub second page generation even in
  warm boots
• Redesign backend by creating an API for our
  native apps
URBANESIA V1
The second iteration based on refined codes
                   and infrastructure design
PROS

• Achieved sub second page generation in warm boots
• Aggressive & effective caching mechanism
• Optimized MY_Controller
• Session storage handled by Memcache
• MySQL read/write access lowered from ~400 qps to only 1 qps
• Lean memory usage in database server
• Created an OAUTH enabled API
• Concurrency increased by using nginx as reverse proxy
• The same server setup can theoretically handle 10x the current traffic
  without scaling horizontally
• Google bots are only limited by bandwidth instead of efficient codes
• Index properly with MySQL
• Don’t use MySQL, used custom built MySQL alternative: Percona Server
CONS

• Source code = Spaghetti code
• Unpredictable behavior of codes because of V0 inheritance,
  when more rows fill, queries are bottlenecks
• Subqueries still exists
• Everything is still synchronous, no message queue yet
• The end product fails to impress the illusion of speed (fast)
  to users
• New hires have a steeper learning curve because of the
  inherited complexity added with V1’s own complex
• Still difficult to scale horizontally & vertically
WHAT WE LEARNED

• CodeIgniter is enabling fast product delivery but optimization &
  efficiency of codes are questionable at best
• Need to enable asynchronous architecture
• Do not do things realtime, instead offload to message queues
• To impress users with the illusion of speed, JavaScript must be
  thoroughly implemented
• Emails should not be handled by ourselves, use third party email
  solutions like AWS SES
• Offload server side international bandwidth to clients, for
  Facebook, use Facebook JS SDK instead of the PHP SDK
• The product gains more engagements with contents that are more
  focused (thematic)
• Speed of content delivery is important to engagement metrics
CHALLENGES

• Build a third iteration with a strong identity based on users’
  personas
• Focus more on verticals, create the illusion of a
  discovery/recommendation platform
• Progressive Disclosure of contents
• A JavaScript framework that is light, fast and minimal
  dependencies
• Make everything asynchronous and message/event based
• Redefine Urbanesia’s atomic data structure
• Do MySQL JOINs in server side
• Get the data first FAST, compute later
PRODUCTS & TECHNOLOGIES
 Does the product makes the technology
  or the technology makes the product?
THE PRODUCT MAKES THE TECHNOLOGY!
REAL WORLD EXAMPLES


• We need to know which part of Urbanesia will
  really work for users
• Store the preferences for each users’ dynamic
  activity
• Make calculations of other contents a user
  might consume
• Present the content unobtrusively
• Do it fast and almost realtime
TECHNICAL SPEAK

We need to know which part of Urbanesia will really work
                      for users

• Mine all user’s data each time they visit, including
  anonymous users
• Log everything FAST and asynchronously
• Low value & high volume data
• Avoid MySQL at all cost
• Model data based on choosen NoSQL database model
TECHNICAL SPEAK

                     Introducing Redis

•   Read/Write data from memory
•   Stores data on disk
•   Key/Value similarity with Memcache
•   Ability to perform atomic tasks without worrying states
•   Redis’ primitive data types are very simple
•   Ideal for low value/high volume data
•   Less is more!
TECHNICAL SPEAK

  Store the preferences for each users’ dynamic activity

• Simple increments
• Perfect for Sorted Hashmaps in Redis
• Need them sorted so analytics functions is supported
  primitively by Redis == High Performance
• Fire & Forget – Consider using async frameworks like
  Node.js & trigger using JavaScript
• Why trigger with JavaScript? To make sure at the very
  least that it’s actually users accessing the page
TECHNICAL SPEAK

                   Node.js & Socket.io

• Node.js is a Network ready daemon with Chrome’s V8
  JavaScript engine inside
• Node.js is asynchronous by default (event based)
• Socket.io is the transport used for data
• Socket.io is abstracted to fallback gracefully between
  Websocket, Flash and plain AJAX
• JavaScript clients should only subscribe to onFailed
  events to minimize overhead
TECHNICAL SPEAK


  Make calculations of other contents a user
               might consume

• Use Machine Learning algorithms to learn
  users behaviors
• Naïve Bayes Classifier to the rescue
• Independent per keyword assumptions
• Proven algorithm used by many big websites
TECHNICAL SPEAK


               Naïve Bayes Classifier

• There is no wrong or right assumptions, only
  accuracy
• Accuracy is increased with more data and better
  classifications
• Relatively easy to code
• Lots of libraries out there in different languages
TECHNICAL SPEAK


       Present the content unobtrusively

• Giving users the illusion that we understand
  them
• Do not make this feature dominant
• Show it where you want the content look
  smart
TECHNICAL SPEAK


         Do it fast and almost realtime

• Fast is an illusion
• Realtime is overrated
• If you don’t have enough resource to do so,
  schedule it and pre generate content
• Scale vertically
Talk is cheap, show me the CODES!
URBANESIA @ Github




      https://github.com/Urbanesia
URBANESIA @ Github




https://github.com/Urbanesia/Simple-Naive-
           Bayes-Classifier-for-PHP
NAÏVE BAYES CLASSIFIER


First Iteration:
• Took ~1000 seconds to classify 1 keyword
• MySQL as storage
• No micro optimizations
NAÏVE BAYES CLASSIFIER


Second Iteration:
• Took ~400 seconds to classify 1 keyword
• MongoDB as storage
• Macro optimization trimmed 600 of 1000
  seconds
• No micro optimizations
NAÏVE BAYES CLASSIFIER


Third Iteration:
• Took ~1 second to classify 1 keyword
• Redis as storage
• Insane macro optimization boost
• No micro optimizations
NAÏVE BAYES CLASSIFIER


Fourth Iteration:
• Took 0.01428 second to classify 1 keyword
• Redis as storage
• Reworked classification algorithm
• Get the data first and compute later
• More memory usage, faster execution time
NAÏVE BAYES CLASSIFIER


Fifth Iteration:
• Reworked the trainer methods
• Created deTrain method to update data
• Created helpers to do keyword blacklists
• Consistent performance from CLI or HTTP
NAÏVE BAYES CLASSIFIER

What we learned:
• Always be open to new things
• Geek Talk with peers from the industry
• Very talented people will always come up with smarter and
  better way to do something
• Decide, get smart or get smarter?
• Algorithms are the engine but it doesn’t mean anything
  without implementation
• Consider opening up source codes for others to examine,
  the smarter the population, the better products we create
• Focus on USERS instead of technology
NAÏVE BAYES CLASSIFIER


More insights below:

http://www.bango29.com/go/blog/2012/naive-
bayes-classifier-revisited
Geekball
Every Tuesday, 17.00 – 19.00
Basket Hall C, Senayan
OUR PRODUCTS
Urbanesia’s product lineup
URBANESIA.COM
URBANESIA.COM SEARCH
M.URBANESIA.COM
URBAN’S NOTES
URBANESIA WINDOWS 8




               http://urho.me/vkND6
URBANESIA ANDROID




              http://urho.me/BSsqR
JAJAN
JAJAN
JAJAN
Jajan is Open Source, get the source codes:
• Blackberry - https://github.com/Urbanesia/Jajan-Blackberry
• Android - https://github.com/Urbanesia/Jajan
• HTML5 - https://github.com/Urbanesia/jajan-html5

Platforms:
• Blackberry - https://appworld.blackberry.com/webstore/content/54742/
• Android - https://play.google.com/store/apps/details?id=com.bango.jajan
• iOS - https://itunes.apple.com/us/app/jajan/id527278768?mt=8
• HTML5 - https://jajan5.urbanesia.com/
URBANESIA BALI




             http://urho.me/HPLT9
WHAT’S NEXT
Our third iteration of Urbanesia.com
WHAT’S NEXT


• A rework from scratch both in Product Design
  and Technical Implementation
• Focusing more on users and our RICH content
• A social network useful for everyday city life
• Machine learning implementation for our
  recommendation engine
WHAT’S NEXT



         Live Beta opening soon!
Email to dev@urbanesia.com for access 
KEY TAKEAWAYS
       Summary
KEY TAKEAWAYS


•   Empower people working with you
•   Invest in company culture
•   Focus on USERS, not technology
•   Macro to Micro optimizations & scaling
•   Be open to new ideas (things)
•   Geek Talks over whatever like Basketball or Beer
•   Good is not Great
•   Whatever WORKS
Hi! From Urbanesia
THANK YOU
Email me: batista@bango29.com
                 Twitter: @tista
            Github: tistaharahap
       Blog: www.bango29.com

More Related Content

What's hot

A modern web centric development-deployment environment
A modern web centric development-deployment  environment A modern web centric development-deployment  environment
A modern web centric development-deployment environment
Paulo Mattos
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
BIWUG
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2
Icinga
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?
IWMW
 
CakePHP at a Massive Scale on a Budget
CakePHP at a Massive Scale on a BudgetCakePHP at a Massive Scale on a Budget
CakePHP at a Massive Scale on a Budgetandygale
 
Fashiolista
FashiolistaFashiolista
Fashiolista
nlwebperf
 
Into The Box 2015 Keynote
Into The Box 2015 KeynoteInto The Box 2015 Keynote
Into The Box 2015 Keynote
Ortus Solutions, Corp
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
hernanibf
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
Vlad Stanescu
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
hernanibf
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
Rakuten Group, Inc.
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?
IWMW
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
Paul Withers
 
Georgia Tech Drupal Users Group - Local Drupal Development
Georgia Tech Drupal Users Group - Local Drupal DevelopmentGeorgia Tech Drupal Users Group - Local Drupal Development
Georgia Tech Drupal Users Group - Local Drupal Development
Eric Sembrat
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basics
Chris Love
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
Derek Jacoby
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with  Apache Cocoon 2.1Basic web application development with  Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1Jeroen Reijn
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
Chris Love
 

What's hot (19)

A modern web centric development-deployment environment
A modern web centric development-deployment  environment A modern web centric development-deployment  environment
A modern web centric development-deployment environment
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?
 
CakePHP at a Massive Scale on a Budget
CakePHP at a Massive Scale on a BudgetCakePHP at a Massive Scale on a Budget
CakePHP at a Massive Scale on a Budget
 
Fashiolista
FashiolistaFashiolista
Fashiolista
 
Into The Box 2015 Keynote
Into The Box 2015 KeynoteInto The Box 2015 Keynote
Into The Box 2015 Keynote
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
Journey to a multi-tenant e commerce solution in the cloud with Kubernetes - ...
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
 
IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?IWMW 2003: Content Management - Buy or Build?
IWMW 2003: Content Management - Buy or Build?
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
 
Georgia Tech Drupal Users Group - Local Drupal Development
Georgia Tech Drupal Users Group - Local Drupal DevelopmentGeorgia Tech Drupal Users Group - Local Drupal Development
Georgia Tech Drupal Users Group - Local Drupal Development
 
Single page applications the basics
Single page applications the basicsSingle page applications the basics
Single page applications the basics
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with  Apache Cocoon 2.1Basic web application development with  Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 

Viewers also liked

Chip Meetup V3 - Android Trends
Chip Meetup V3 - Android TrendsChip Meetup V3 - Android Trends
Chip Meetup V3 - Android TrendsBatista Harahap
 
SparxUp - Growth VS Scalability
SparxUp - Growth VS ScalabilitySparxUp - Growth VS Scalability
SparxUp - Growth VS Scalability
Batista Harahap
 
Teknoup - Urbanesia Android
Teknoup - Urbanesia AndroidTeknoup - Urbanesia Android
Teknoup - Urbanesia Android
Batista Harahap
 
Bancakan v5 - Selling Me
Bancakan v5 - Selling MeBancakan v5 - Selling Me
Bancakan v5 - Selling Me
Batista Harahap
 
Urbanesia - Open Source & Microsoft
Urbanesia - Open Source & MicrosoftUrbanesia - Open Source & Microsoft
Urbanesia - Open Source & Microsoft
Batista Harahap
 
Startup Kitchen - Bandung Ventures Night 2011
Startup Kitchen - Bandung Ventures Night 2011Startup Kitchen - Bandung Ventures Night 2011
Startup Kitchen - Bandung Ventures Night 2011
Batista Harahap
 
Mediafusion - Company Profile
Mediafusion - Company ProfileMediafusion - Company Profile
Mediafusion - Company Profile
Batista Harahap
 

Viewers also liked (9)

Chip Meetup V3 - Android Trends
Chip Meetup V3 - Android TrendsChip Meetup V3 - Android Trends
Chip Meetup V3 - Android Trends
 
SparxUp - Growth VS Scalability
SparxUp - Growth VS ScalabilitySparxUp - Growth VS Scalability
SparxUp - Growth VS Scalability
 
Teknoup - Urbanesia Android
Teknoup - Urbanesia AndroidTeknoup - Urbanesia Android
Teknoup - Urbanesia Android
 
Bancakan v5 - Selling Me
Bancakan v5 - Selling MeBancakan v5 - Selling Me
Bancakan v5 - Selling Me
 
Urbanesia - Open Source & Microsoft
Urbanesia - Open Source & MicrosoftUrbanesia - Open Source & Microsoft
Urbanesia - Open Source & Microsoft
 
Startup Kitchen - Bandung Ventures Night 2011
Startup Kitchen - Bandung Ventures Night 2011Startup Kitchen - Bandung Ventures Night 2011
Startup Kitchen - Bandung Ventures Night 2011
 
Urbanesia API v1.0
Urbanesia API v1.0Urbanesia API v1.0
Urbanesia API v1.0
 
Lokal ID - Alpha
Lokal ID - AlphaLokal ID - Alpha
Lokal ID - Alpha
 
Mediafusion - Company Profile
Mediafusion - Company ProfileMediafusion - Company Profile
Mediafusion - Company Profile
 

Similar to Urbanesia - Development History

High performance web sites with multilevel caching
High performance web sites with multilevel cachingHigh performance web sites with multilevel caching
High performance web sites with multilevel caching
Dotnet Open Group
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 
Ohio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCPOhio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCP
Wesley Workman
 
Serverless brewbox
Serverless   brewboxServerless   brewbox
Serverless brewbox
Lino Telera
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopware
Sander Mangel
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
2014 09-12 lambda-architecture-at-indix
2014 09-12 lambda-architecture-at-indix2014 09-12 lambda-architecture-at-indix
2014 09-12 lambda-architecture-at-indix
Yu Ishikawa
 
Couchbase Connect 2016
Couchbase Connect 2016Couchbase Connect 2016
Couchbase Connect 2016
Michael Kehoe
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
Rishikese MR
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsPop Apps
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
Derek Jacoby
 
NoSQL on the move
NoSQL on the moveNoSQL on the move
NoSQL on the move
Codemotion
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScalemmoline
 
Sitecore - what to look forward to
Sitecore - what to look forward toSitecore - what to look forward to
Sitecore - what to look forward to
jinto77
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
Dor Kalev
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
Christopher Dubois
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
Christian Posta
 

Similar to Urbanesia - Development History (20)

High performance web sites with multilevel caching
High performance web sites with multilevel cachingHigh performance web sites with multilevel caching
High performance web sites with multilevel caching
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Ohio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCPOhio Devfest - Visual Analysis with GCP
Ohio Devfest - Visual Analysis with GCP
 
Serverless brewbox
Serverless   brewboxServerless   brewbox
Serverless brewbox
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopware
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
2014 09-12 lambda-architecture-at-indix
2014 09-12 lambda-architecture-at-indix2014 09-12 lambda-architecture-at-indix
2014 09-12 lambda-architecture-at-indix
 
Couchbase Connect 2016
Couchbase Connect 2016Couchbase Connect 2016
Couchbase Connect 2016
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page Apps
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
NoSQL on the move
NoSQL on the moveNoSQL on the move
NoSQL on the move
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
 
Sitecore - what to look forward to
Sitecore - what to look forward toSitecore - what to look forward to
Sitecore - what to look forward to
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
 

Recently uploaded

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: 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
 
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
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
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
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
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
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
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
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
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
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
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
 

Recently uploaded (20)

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: 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 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
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
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
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
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
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
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...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
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
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
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...
 

Urbanesia - Development History

  • 1. URBANESIA Development History Business Connect – 29 Oktober 2012 Prepared by: Batista Harahap
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. URBANESIA BETA V0 The first public iteration of Urbanesia
  • 8. PROS • Data structures in MySQL • Effective memory caching implementations • Effective SEO implementations • Effective search server implementations • Urbanesia is successfully consumed as a Directory
  • 9. CONS • No effective separation of Backend & Frontend web applications • Source Code = Spaghetti Code • Storing low value, high volume data in MySQL • Many queries using GROUP BY with highly populated tables • A warm boot will cause +20 seconds to generate any page • Difficult to scale horizontally & vertically • Very low concurrency • The product’s identity is weak • So many features left unused by users
  • 10. WHAT WE LEARNED • Do NOT use MySQL as session storage • Use NoSQL database for low value, high volume data • Separate backend & frontend web application, create APIs for backends • Use output caching where available • When using PHP-APC, make sure apc.stat = 0 • Increase concurrency by reverse proxying requests to Apache
  • 11. CHALLENGES • Handle Google Bots traffic of over 1 TB/month with only 2 servers • Do output caching with Codeigniter • Achieving sub second page generation even in warm boots • Redesign backend by creating an API for our native apps
  • 12. URBANESIA V1 The second iteration based on refined codes and infrastructure design
  • 13. PROS • Achieved sub second page generation in warm boots • Aggressive & effective caching mechanism • Optimized MY_Controller • Session storage handled by Memcache • MySQL read/write access lowered from ~400 qps to only 1 qps • Lean memory usage in database server • Created an OAUTH enabled API • Concurrency increased by using nginx as reverse proxy • The same server setup can theoretically handle 10x the current traffic without scaling horizontally • Google bots are only limited by bandwidth instead of efficient codes • Index properly with MySQL • Don’t use MySQL, used custom built MySQL alternative: Percona Server
  • 14. CONS • Source code = Spaghetti code • Unpredictable behavior of codes because of V0 inheritance, when more rows fill, queries are bottlenecks • Subqueries still exists • Everything is still synchronous, no message queue yet • The end product fails to impress the illusion of speed (fast) to users • New hires have a steeper learning curve because of the inherited complexity added with V1’s own complex • Still difficult to scale horizontally & vertically
  • 15. WHAT WE LEARNED • CodeIgniter is enabling fast product delivery but optimization & efficiency of codes are questionable at best • Need to enable asynchronous architecture • Do not do things realtime, instead offload to message queues • To impress users with the illusion of speed, JavaScript must be thoroughly implemented • Emails should not be handled by ourselves, use third party email solutions like AWS SES • Offload server side international bandwidth to clients, for Facebook, use Facebook JS SDK instead of the PHP SDK • The product gains more engagements with contents that are more focused (thematic) • Speed of content delivery is important to engagement metrics
  • 16. CHALLENGES • Build a third iteration with a strong identity based on users’ personas • Focus more on verticals, create the illusion of a discovery/recommendation platform • Progressive Disclosure of contents • A JavaScript framework that is light, fast and minimal dependencies • Make everything asynchronous and message/event based • Redefine Urbanesia’s atomic data structure • Do MySQL JOINs in server side • Get the data first FAST, compute later
  • 17. PRODUCTS & TECHNOLOGIES Does the product makes the technology or the technology makes the product?
  • 18. THE PRODUCT MAKES THE TECHNOLOGY!
  • 19. REAL WORLD EXAMPLES • We need to know which part of Urbanesia will really work for users • Store the preferences for each users’ dynamic activity • Make calculations of other contents a user might consume • Present the content unobtrusively • Do it fast and almost realtime
  • 20. TECHNICAL SPEAK We need to know which part of Urbanesia will really work for users • Mine all user’s data each time they visit, including anonymous users • Log everything FAST and asynchronously • Low value & high volume data • Avoid MySQL at all cost • Model data based on choosen NoSQL database model
  • 21. TECHNICAL SPEAK Introducing Redis • Read/Write data from memory • Stores data on disk • Key/Value similarity with Memcache • Ability to perform atomic tasks without worrying states • Redis’ primitive data types are very simple • Ideal for low value/high volume data • Less is more!
  • 22. TECHNICAL SPEAK Store the preferences for each users’ dynamic activity • Simple increments • Perfect for Sorted Hashmaps in Redis • Need them sorted so analytics functions is supported primitively by Redis == High Performance • Fire & Forget – Consider using async frameworks like Node.js & trigger using JavaScript • Why trigger with JavaScript? To make sure at the very least that it’s actually users accessing the page
  • 23. TECHNICAL SPEAK Node.js & Socket.io • Node.js is a Network ready daemon with Chrome’s V8 JavaScript engine inside • Node.js is asynchronous by default (event based) • Socket.io is the transport used for data • Socket.io is abstracted to fallback gracefully between Websocket, Flash and plain AJAX • JavaScript clients should only subscribe to onFailed events to minimize overhead
  • 24. TECHNICAL SPEAK Make calculations of other contents a user might consume • Use Machine Learning algorithms to learn users behaviors • Naïve Bayes Classifier to the rescue • Independent per keyword assumptions • Proven algorithm used by many big websites
  • 25. TECHNICAL SPEAK Naïve Bayes Classifier • There is no wrong or right assumptions, only accuracy • Accuracy is increased with more data and better classifications • Relatively easy to code • Lots of libraries out there in different languages
  • 26. TECHNICAL SPEAK Present the content unobtrusively • Giving users the illusion that we understand them • Do not make this feature dominant • Show it where you want the content look smart
  • 27. TECHNICAL SPEAK Do it fast and almost realtime • Fast is an illusion • Realtime is overrated • If you don’t have enough resource to do so, schedule it and pre generate content • Scale vertically
  • 28. Talk is cheap, show me the CODES!
  • 29. URBANESIA @ Github https://github.com/Urbanesia
  • 31. NAÏVE BAYES CLASSIFIER First Iteration: • Took ~1000 seconds to classify 1 keyword • MySQL as storage • No micro optimizations
  • 32. NAÏVE BAYES CLASSIFIER Second Iteration: • Took ~400 seconds to classify 1 keyword • MongoDB as storage • Macro optimization trimmed 600 of 1000 seconds • No micro optimizations
  • 33. NAÏVE BAYES CLASSIFIER Third Iteration: • Took ~1 second to classify 1 keyword • Redis as storage • Insane macro optimization boost • No micro optimizations
  • 34. NAÏVE BAYES CLASSIFIER Fourth Iteration: • Took 0.01428 second to classify 1 keyword • Redis as storage • Reworked classification algorithm • Get the data first and compute later • More memory usage, faster execution time
  • 35. NAÏVE BAYES CLASSIFIER Fifth Iteration: • Reworked the trainer methods • Created deTrain method to update data • Created helpers to do keyword blacklists • Consistent performance from CLI or HTTP
  • 36. NAÏVE BAYES CLASSIFIER What we learned: • Always be open to new things • Geek Talk with peers from the industry • Very talented people will always come up with smarter and better way to do something • Decide, get smart or get smarter? • Algorithms are the engine but it doesn’t mean anything without implementation • Consider opening up source codes for others to examine, the smarter the population, the better products we create • Focus on USERS instead of technology
  • 37. NAÏVE BAYES CLASSIFIER More insights below: http://www.bango29.com/go/blog/2012/naive- bayes-classifier-revisited
  • 38. Geekball Every Tuesday, 17.00 – 19.00 Basket Hall C, Senayan
  • 44. URBANESIA WINDOWS 8 http://urho.me/vkND6
  • 45. URBANESIA ANDROID http://urho.me/BSsqR
  • 46. JAJAN
  • 47. JAJAN
  • 48. JAJAN Jajan is Open Source, get the source codes: • Blackberry - https://github.com/Urbanesia/Jajan-Blackberry • Android - https://github.com/Urbanesia/Jajan • HTML5 - https://github.com/Urbanesia/jajan-html5 Platforms: • Blackberry - https://appworld.blackberry.com/webstore/content/54742/ • Android - https://play.google.com/store/apps/details?id=com.bango.jajan • iOS - https://itunes.apple.com/us/app/jajan/id527278768?mt=8 • HTML5 - https://jajan5.urbanesia.com/
  • 49. URBANESIA BALI http://urho.me/HPLT9
  • 50. WHAT’S NEXT Our third iteration of Urbanesia.com
  • 51. WHAT’S NEXT • A rework from scratch both in Product Design and Technical Implementation • Focusing more on users and our RICH content • A social network useful for everyday city life • Machine learning implementation for our recommendation engine
  • 52. WHAT’S NEXT Live Beta opening soon! Email to dev@urbanesia.com for access 
  • 53. KEY TAKEAWAYS Summary
  • 54. KEY TAKEAWAYS • Empower people working with you • Invest in company culture • Focus on USERS, not technology • Macro to Micro optimizations & scaling • Be open to new ideas (things) • Geek Talks over whatever like Basketball or Beer • Good is not Great • Whatever WORKS
  • 56. THANK YOU Email me: batista@bango29.com Twitter: @tista Github: tistaharahap Blog: www.bango29.com