Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
日本開發者大會短講分享
Build an App based on
existing Web Service
Take LINE TODAY as Example
TOO MANY FEATURES
TOO LESS TIME
Hong KongTaiwanThailandIndonesia
Popular news service in several countries and regions
LINE TODAY SERVICE
Movie InfoDramasWebtoonCareer Info
Becomes content portal in LINE app
LINE TODAY SERVICE
HOW TO
CREATE AN APP FOR IT?
Find
Pain Points
Fix it
IterateRelease
Fast
PROPOSED APPROACH
Step 1 Step 2 Step 3
Step 2
Article pageTop pageLINE loginIntroduction
All WebViews except onboarding & native LINE login
v1.0 - Complete Features
v1.0 - Architecture
CUSTOMIZED WEBVIEW
Introduction LINE LoginIntroduction LINE Login
CUSTOMIZED WEBVIEW
User Profile
page
Video category
User generated
content
Top page
Implemented BottomNavigationBar
v2.0 - Easier Navigation
v2.0 - Architecture
CUSTOMIZED WEBVIEW
Introduction LINE Login
BottomNavigation
CUSTOMIZED WEBVIEW
Video PlayerVideo ArticleVideo Category
Native Video Category and Video Article page
v3.0 - Video Enhancement
i
v3.0 - Architecture
BottomNavigation
LINE LOGIN
INTRODUCTION
VIDEO ARTICLE
VIDEO
PLAYER
ROFILECUSTOMIZED WEBVIEW VIDEO CATEGORY
Find
Pain Points IterateRelease
Fast
SUMMARY
Step 1 Step 2 Step 3
THANK YOU
日本開發者大會短講分享
Build Secondary Indices
In Distributed Database
by Exploiting Apache Kafka
INTRODUCE
LINE TODAY AND BUZZ
LINE TODAY
A content portal currently
supporting TW/ TH/ ID/ HK
BUZZ
An new feature released in ID,
which allows users to post any
fun images or videos
LINE TODAY Buzz Profile page in Buzz
HBASE AS DATABASE
Key-value pair, column-oriented database
High scalability
High write throughput
WHAT WE MEET
WITH HBASE
INDEX IS ONLY
BASED ON ROWKEYS
Lexicographically sorted by
rowKey
NO TRANSACTION
Inter-row operations are not
atomic
WHY WE NEED
SECONDARY INDICESIndex is only based on rowKey
Get post(s) by ID(s)
rowKey
(postID)
Column Family
title author …
…
0 userA
1 userB
2 userA
…
Buzz post page
(Author - Full table scan)
rowKey
(postID)
Column Family
title author …
…
0 userA
1 userB
2 userA
…
User profile page
List posts that the user posted before
Post table
rowKey
(postID)
Column Family
title author …
…
0 userA
1 userB
2 userA
…
rowKey
(user_postID)
Column Family
…
userA_0
userA_2
userB_1
…
Secondary Table
ROWKEY IS INDEXED AND SORTED
rowKey with
prefix userA
WHY WE USE KAFKA
No transaction
BUILD SECONDARY INDICES BY KAFKA
rowKey
(postID)
Column Family
title author …
0 userA
1 userB
2 userA
rowKey
(user_postID)
Column Family
…
userA_0
userA_2
userB_1
2 1 0
consumer.poll()
Update secondary table
Apache Kafka
User A creates a
post (id=2)
● Call commit only when all
messages are processed
successfully
● Duplicate messages might be
possible
CONTROL CONSUMER’S OFFSET COMMIT
THANK YOU
日本開發者大會短講分享
Rapid Development of Wow Beacon LBS with LINE
LINE TODAY
TAIWAN 18,000,000 MAU
WHAT LINE BEACON CAN DO?
WITH TAIPEI METRO’S 2,000,000 DAILY TRAFFIC
Major Stations In Blue-Line
200+Beacons
at platform & exits
35
TAIPEI METRO
100%
APPLICATIONS
Taipei Metro x LINE TODAY
ENRICH YOUR 50 MINS
COMMUTE TIME
NEWS DIGEST
GIVE YOU
WHAT’S NEAR YOU
COUPON
MAKE THE CITY
YOUR PLAYGROUND
PUZZLE GAME
MAKE YOUR
TRANSFER SEAMLESS
BUS INFO
IMPLEMENTATION
Taipei Metro x LINE TODAY
ARCHITECTURE
LINE Platform
BOT
server
Web
server
API
server
Sticker
Giftshop
TODAY ServerUser
BeaconEvent
(enter/stay/leave)
Postback/ Text
REST API
BOT
Gift Coupon
• News (ImageMap) Coupon
• Puzzle(Carousel) Bus (Flex)
CMSDB
• ProcessBeacon
• UpdateAgreement
• ClaimCoupon
• PuzzleStatus
• BeaconTriggerInfo
Publish
Content Generation & Management
Misson Sticker
Beacon
OA
LIFF/C
WA
HOW TO MANAGE 200+ BEACONS
BEACON MANAGEMENT
Beacon HWID → Beacon Group → Action Type
HIERARCHICAL MANAGEMENT
Platform
Group1
Exit
B
Group2 Group3 Group4
Coupons
B B B B BBBB
Coupon TypeNews Type
2,028,963
HOW TO HANDLE LARGE AMOUNT
OF BEACON EVENTS?
Zookeeper Key = User ID + Action
Type
CONCURRENT BEACON
EVENTS HANDLING
EVENT HANDLING
Server
B
B
B
B
Independent data entry in DB / cache
• Agreement status
• Last action info of each action type
• Last triggered beacon group
EVENT PROCESSING SPEEDUP
Y
DB / cache
Should send
coupon/puzzle
Y N
Y Y
Should resend
user consent
Send
user consent
Send available
coupon/puzzle
ZooKeeper
Lock Acquire
User Agreed
{hwid, userid}
Beacon
EVENT HANDLING
THANK YOU

More Related Content

日本開發者大會短講分享