SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Building Zingme News Feed
           System


               Chau Nguyen Nhat Thanh
                Senior Software Manager
             User Platform Division - VNG
Agenda

1) Introduction to News Feed
2) ZingMe News Feed system history
3) ZingMe News Feed system
4) Some statistics
5) Bonus
6) Q&A
Introduction to News Feed
Introduction to News Feed
●   Update friends' info
●   Update Biz info
●   Update VIP info
●   Interaction to them by comment, like ...
Introduction to News Feed
Introduction to News Feed
Introduction to News Feed
Introduction to News Feed
●   Terms
    ●   Social graph: Users in most social networking
        sites are describable in terms of a social
        graph. The relationships between users are
        represented by adjacency lists. If Jack and Jill
        are friends, they are said to be adjacent. This
        is known as an "edge" in the graph. (from
        Quora)
    ●   Not only Friends
    ●   but also Followers …
Introduction to News Feed
●   What do we need?
    ●   Someone does actions, his friend will see these
        action in his home as soon as possible
●   What will we solve the problems?
    ●   Solution 1: Push model (fan out on write)
    ●   Solution 2: Pull model (fan out on read)
    ●   Solution 3: Mixing push and pull (Yahoo paper)
Introduction to News Feed
●   Push model
    ●   This method involves denormalizing the user's activity
        data and pushing the meta data to all the user's friends
        at the time it occurs. (from Quora)
●   Pull model
    ●   This method involves keeping all recent activity data in
        memory and pulling in (or fanning out) that data at the
        time a user loads their home page. Data doesn't need to
        be pushed out to all subscribers as soon as it happens,
        so no back-log and no disk seeks (from Quora)
●   Mix model
    ●   Active user using push model
    ●   Non active user using pull
ZingMe News Feed system history
ZingMe News Feed system history

●   First version
    ●   Using PHP for worker
    ●   Using MySQL for feed item
    ●   Using MySQL for feed indexing
    ●   Having full feature: feed type filtering, ignoring
        users ..
    ●   Restarting DB and other services are the favorite
        jobs at that time :)
    ●   Lesson learn:
        –   Relation DB may not be fit for this kind of project
ZingMe News Feed system history

●   Second version
    ●   Still using PHP for worker
    ●   Using Cassandra for feed item
    ●   Using home build list id service for feed Indexing
    ●   Using Memcached for caching item
    ●   Removing all deluxe features :) (stupid features due to
        our limited technique)
    ●   Restarting Cassandra, and waiting for compaction is our
        favorite jobs :) :)
    ●   Headache with changing avatar
    ●   Lesson learn: believe only ourself
ZingMe News Feed system history

●   Third version
    ●   Moving to Java for better performance
    ●   Still using Cassandra for feed item
    ●   Trying to uses redis in lab
    ●   Keep only simple feature (KISS)
    ●   Cannot control memcache
        –   The new one expired before the old one ???
        –   Memcached is wrong ???
    ●   Cannot believe to Cassandra from this time
    ●   Lesson learn: memcached is not the “thuốc tiên” :)
ZingMe News Feed system
    (The current one :))
ZingMe News Feed system
ZingMe News Feed system

●   Still using push model because of twitter public some
    info related to this
●   Not enough technical when choosing pull model
●   Begin to understand a little bit about how to keep it
    scaling
●   Do not use Cassandra any more for such kind of this
    system → do not believe to anyone, learn from what
    they do and try our best
ZingMe News Feed system

●   Feed Item
    ●   UserId, ObjectId, Created date...
    ●   Storage: home build based on Kyoto Cabinet
    ●   Fast recovery when crash
●   Feed Index
    ●   UserId → [feedId1,feedId2...]
    ●   Storage: home build
    ●   Fast recovery when crash
ZingMe News Feed system

●   Rate limit
    ●   Prefilter Spam or auto tool based on rate of write request
    ●   When hit limit, block that user for amount of time
●   Feed writer
    ●   Receive the write command
    ●   Get the next Id from Generator
    ●   Push the item to queue
    ●   Return the feedId for future reference
ZingMe News Feed system

●   Gearman feed storage queue
    ●   Very fast
    ●   Support multi language client
    ●   Some time block the all workers when network
        unstable :)
    ●   Solve most of our heavy jobs
ZingMe News Feed system

●   Feed Sync center
    ●   Sync the new feed to the others such as:
        –   Spam detection
        –   Feed ranking system
        –   Logging system
    ●   Feed replication function for future use
ZingMe News Feed system

●   Feed Render worker
    ●   The main and heavy job:
        –   Get the feed item
        –   Extract the template id
        –   Get user info
        –   Render the feed based on them
    ●   Put rendered feed in to appropriate cache
    ●   Mobile and Desktop are totally different
ZingMe News Feed system

●   Feed Aggregate
    ●   Get the feed index
    ●   Get the rendered cache
    ●   Return to the front-end
    ●   Some cheat:
        –   If the cached items less than 5, in stead of returning
            the data return the JavaScript to reload that list
        –   At the same time push a task to warm-up the
            rendered cache
    ●   Auto fail-over when a cache service die
Some statistics
Some statistics

●   ~15M actions / day
●   10% Spam
    ●   Gift receive
    ●   Meaningless status
●   Cache hit 98%
●   ~80M registered users
●   ~3M active users / days
Bonus
●   Twemcache
    ●   From twitter
    ●   Solve most problems with memcached
    ●   Twemcache proxy
●   Redis
    ●   Replacement for home build when you have not
        enough time
    ●   Set is default supported
    ●   Supported cluster
    ●   Persistence
Question and Answer
Q&A
●   What is the problem with followers?
    ●   Do that with the trick
    ●   Cheating the owner ;)
We are hiring!!!!!!!
Q&A




Contact info:
         Chau Nguyen Nhat Thanh

       thanhcnn@vng.com.vn

       me.zing.vn/thanhcnn2000

Weitere ähnliche Inhalte

Andere mochten auch

[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...AiTi Education
 
Twitter Bootstrap và LESS
Twitter Bootstrap và LESSTwitter Bootstrap và LESS
Twitter Bootstrap và LESSAiTi Education
 
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...AiTi Education
 
AiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education
 
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...AiTi Education
 
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...AiTi Education
 
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏAiTi Education
 

Andere mochten auch (7)

[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
 
Twitter Bootstrap và LESS
Twitter Bootstrap và LESSTwitter Bootstrap và LESS
Twitter Bootstrap và LESS
 
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
 
AiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 a
 
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...
[Vietnam Mobile Day 2013] - Payment sdk giải pháp thanh toán toàn diện cho ứn...
 
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
 
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ
[Vietnam Mobile Day 2013] - 5 chiến lược marketing app cho nhà phát triển nhỏ
 

Ähnlich wie Building zing me news feed system

Building ZingMe News Feed System
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed SystemChau Thanh
 
Security and why you need to review yours.
Security and why you need to review yours.Security and why you need to review yours.
Security and why you need to review yours.David Busby, CISSP
 
Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+Python Ireland
 
Utopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K usersUtopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K usersJaime Buelta
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahujacamunda services GmbH
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookMarco Martin
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUGslandelle
 
Big data @ uber vu (1)
Big data @ uber vu (1)Big data @ uber vu (1)
Big data @ uber vu (1)Mihnea Giurgea
 
Apache Cassandra at Target - Cassandra Summit 2014
Apache Cassandra at Target - Cassandra Summit 2014Apache Cassandra at Target - Cassandra Summit 2014
Apache Cassandra at Target - Cassandra Summit 2014Dan Cundiff
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your NetworkCTruncer
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesJumping Bean
 
Der Freitag, A Use Case
Der Freitag, A Use CaseDer Freitag, A Use Case
Der Freitag, A Use Casekhink
 
Our journey into scalable player engagement platform
Our journey into scalable player engagement platformOur journey into scalable player engagement platform
Our journey into scalable player engagement platformIdan Fridman
 
Debugging data pipelines @OLA by Karan Kumar
Debugging data pipelines @OLA by Karan KumarDebugging data pipelines @OLA by Karan Kumar
Debugging data pipelines @OLA by Karan KumarShubham Tagra
 
Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Hisham Mardam-Bey
 
FastNetMon and Metrics
FastNetMon and MetricsFastNetMon and Metrics
FastNetMon and MetricsAltinity Ltd
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonNETWAYS
 
Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012Daniel Woods
 

Ähnlich wie Building zing me news feed system (20)

Building ZingMe News Feed System
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed System
 
Security and why you need to review yours.
Security and why you need to review yours.Security and why you need to review yours.
Security and why you need to review yours.
 
Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+Utopia Kingdoms scaling case. From 4 users to 50.000+
Utopia Kingdoms scaling case. From 4 users to 50.000+
 
Utopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K usersUtopia Kindgoms scaling case: From 4 to 50K users
Utopia Kindgoms scaling case: From 4 to 50K users
 
Server fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil AhujaServer fleet management using Camunda by Akhil Ahuja
Server fleet management using Camunda by Akhil Ahuja
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma Netbook
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 
Big data @ uber vu (1)
Big data @ uber vu (1)Big data @ uber vu (1)
Big data @ uber vu (1)
 
Apache Cassandra at Target - Cassandra Summit 2014
Apache Cassandra at Target - Cassandra Summit 2014Apache Cassandra at Target - Cassandra Summit 2014
Apache Cassandra at Target - Cassandra Summit 2014
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your Network
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
 
Der Freitag, A Use Case
Der Freitag, A Use CaseDer Freitag, A Use Case
Der Freitag, A Use Case
 
Our journey into scalable player engagement platform
Our journey into scalable player engagement platformOur journey into scalable player engagement platform
Our journey into scalable player engagement platform
 
Debugging data pipelines @OLA by Karan Kumar
Debugging data pipelines @OLA by Karan KumarDebugging data pipelines @OLA by Karan Kumar
Debugging data pipelines @OLA by Karan Kumar
 
Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Activity feeds (and more) at mate1
Activity feeds (and more) at mate1
 
FastNetMon and Metrics
FastNetMon and MetricsFastNetMon and Metrics
FastNetMon and Metrics
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Sea of Data
Sea of DataSea of Data
Sea of Data
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
 
Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012
 

Mehr von AiTi Education

AiTi Education Profile
AiTi Education ProfileAiTi Education Profile
AiTi Education ProfileAiTi Education
 
AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education
 
AiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education
 
AiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education
 
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayVietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayAiTi Education
 
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...AiTi Education
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...AiTi Education
 
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...AiTi Education
 
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...AiTi Education
 
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...AiTi Education
 
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...AiTi Education
 
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...AiTi Education
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...AiTi Education
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....AiTi Education
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....AiTi Education
 
[Vietnam Mobile Day 2014] Gamification and Mobile Learning - Nguyễn Hữu Ân -...
[Vietnam Mobile Day 2014]  Gamification and Mobile Learning - Nguyễn Hữu Ân -...[Vietnam Mobile Day 2014]  Gamification and Mobile Learning - Nguyễn Hữu Ân -...
[Vietnam Mobile Day 2014] Gamification and Mobile Learning - Nguyễn Hữu Ân -...AiTi Education
 
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...AiTi Education
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...AiTi Education
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...AiTi Education
 

Mehr von AiTi Education (20)

AiTi Education Profile
AiTi Education ProfileAiTi Education Profile
AiTi Education Profile
 
AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03
 
AiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 b
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 b
 
AiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 a
 
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayVietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
 
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
 
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
 
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
 
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
 
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
 
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
 
[Vietnam Mobile Day 2014] Gamification and Mobile Learning - Nguyễn Hữu Ân -...
[Vietnam Mobile Day 2014]  Gamification and Mobile Learning - Nguyễn Hữu Ân -...[Vietnam Mobile Day 2014]  Gamification and Mobile Learning - Nguyễn Hữu Ân -...
[Vietnam Mobile Day 2014] Gamification and Mobile Learning - Nguyễn Hữu Ân -...
 
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...
[Vietnam Mobile Day 2014] Cơ hội & thách thức cho Game Studio Việt trước tảng...
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh – Cou...
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Building zing me news feed system

  • 1. Building Zingme News Feed System Chau Nguyen Nhat Thanh Senior Software Manager User Platform Division - VNG
  • 2. Agenda 1) Introduction to News Feed 2) ZingMe News Feed system history 3) ZingMe News Feed system 4) Some statistics 5) Bonus 6) Q&A
  • 4. Introduction to News Feed ● Update friends' info ● Update Biz info ● Update VIP info ● Interaction to them by comment, like ...
  • 8. Introduction to News Feed ● Terms ● Social graph: Users in most social networking sites are describable in terms of a social graph. The relationships between users are represented by adjacency lists. If Jack and Jill are friends, they are said to be adjacent. This is known as an "edge" in the graph. (from Quora) ● Not only Friends ● but also Followers …
  • 9. Introduction to News Feed ● What do we need? ● Someone does actions, his friend will see these action in his home as soon as possible ● What will we solve the problems? ● Solution 1: Push model (fan out on write) ● Solution 2: Pull model (fan out on read) ● Solution 3: Mixing push and pull (Yahoo paper)
  • 10. Introduction to News Feed ● Push model ● This method involves denormalizing the user's activity data and pushing the meta data to all the user's friends at the time it occurs. (from Quora) ● Pull model ● This method involves keeping all recent activity data in memory and pulling in (or fanning out) that data at the time a user loads their home page. Data doesn't need to be pushed out to all subscribers as soon as it happens, so no back-log and no disk seeks (from Quora) ● Mix model ● Active user using push model ● Non active user using pull
  • 11. ZingMe News Feed system history
  • 12. ZingMe News Feed system history ● First version ● Using PHP for worker ● Using MySQL for feed item ● Using MySQL for feed indexing ● Having full feature: feed type filtering, ignoring users .. ● Restarting DB and other services are the favorite jobs at that time :) ● Lesson learn: – Relation DB may not be fit for this kind of project
  • 13. ZingMe News Feed system history ● Second version ● Still using PHP for worker ● Using Cassandra for feed item ● Using home build list id service for feed Indexing ● Using Memcached for caching item ● Removing all deluxe features :) (stupid features due to our limited technique) ● Restarting Cassandra, and waiting for compaction is our favorite jobs :) :) ● Headache with changing avatar ● Lesson learn: believe only ourself
  • 14. ZingMe News Feed system history ● Third version ● Moving to Java for better performance ● Still using Cassandra for feed item ● Trying to uses redis in lab ● Keep only simple feature (KISS) ● Cannot control memcache – The new one expired before the old one ??? – Memcached is wrong ??? ● Cannot believe to Cassandra from this time ● Lesson learn: memcached is not the “thuốc tiên” :)
  • 15. ZingMe News Feed system (The current one :))
  • 17. ZingMe News Feed system ● Still using push model because of twitter public some info related to this ● Not enough technical when choosing pull model ● Begin to understand a little bit about how to keep it scaling ● Do not use Cassandra any more for such kind of this system → do not believe to anyone, learn from what they do and try our best
  • 18.
  • 19. ZingMe News Feed system ● Feed Item ● UserId, ObjectId, Created date... ● Storage: home build based on Kyoto Cabinet ● Fast recovery when crash ● Feed Index ● UserId → [feedId1,feedId2...] ● Storage: home build ● Fast recovery when crash
  • 20. ZingMe News Feed system ● Rate limit ● Prefilter Spam or auto tool based on rate of write request ● When hit limit, block that user for amount of time ● Feed writer ● Receive the write command ● Get the next Id from Generator ● Push the item to queue ● Return the feedId for future reference
  • 21. ZingMe News Feed system ● Gearman feed storage queue ● Very fast ● Support multi language client ● Some time block the all workers when network unstable :) ● Solve most of our heavy jobs
  • 22. ZingMe News Feed system ● Feed Sync center ● Sync the new feed to the others such as: – Spam detection – Feed ranking system – Logging system ● Feed replication function for future use
  • 23. ZingMe News Feed system ● Feed Render worker ● The main and heavy job: – Get the feed item – Extract the template id – Get user info – Render the feed based on them ● Put rendered feed in to appropriate cache ● Mobile and Desktop are totally different
  • 24. ZingMe News Feed system ● Feed Aggregate ● Get the feed index ● Get the rendered cache ● Return to the front-end ● Some cheat: – If the cached items less than 5, in stead of returning the data return the JavaScript to reload that list – At the same time push a task to warm-up the rendered cache ● Auto fail-over when a cache service die
  • 26. Some statistics ● ~15M actions / day ● 10% Spam ● Gift receive ● Meaningless status ● Cache hit 98% ● ~80M registered users ● ~3M active users / days
  • 27. Bonus ● Twemcache ● From twitter ● Solve most problems with memcached ● Twemcache proxy ● Redis ● Replacement for home build when you have not enough time ● Set is default supported ● Supported cluster ● Persistence
  • 29. Q&A ● What is the problem with followers? ● Do that with the trick ● Cheating the owner ;)
  • 31. Q&A Contact info: Chau Nguyen Nhat Thanh thanhcnn@vng.com.vn me.zing.vn/thanhcnn2000