日本開發者大會短講分享
- 2. Build an App based on
existing Web Service
Take LINE TODAY as Example
- 8. Article pageTop pageLINE loginIntroduction
All WebViews except onboarding & native LINE login
v1.0 - Complete Features
- 19. 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
- 23. INDEX IS ONLY
BASED ON ROWKEYS
Lexicographically sorted by
rowKey
NO TRANSACTION
Inter-row operations are not
atomic
- 25. Get post(s) by ID(s)
rowKey
(postID)
Column Family
title author …
…
0 userA
1 userB
2 userA
…
Buzz post page
- 26. (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
- 29. 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)
- 30. ● Call commit only when all
messages are processed
successfully
● Duplicate messages might be
possible
CONTROL CONSUMER’S OFFSET COMMIT
- 45. 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
- 47. Zookeeper Key = User ID + Action
Type
CONCURRENT BEACON
EVENTS HANDLING
EVENT HANDLING
Server
B
B
B
B
- 48. 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