[rakuten techconf2014] [sendai] sense of sens

Post on 03-Jul-2015

269 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Rakuten Technology Conference 2014 "Sense of SENS" Takayuki Nishiyama (Rakuten)

TRANSCRIPT

Sense of SENS

Oct/25/2014

Takayuki Nishiyama

Rakuten Ichiba Development Department, Rakuten Inc.

http://www.rakuten.co.jp/

2

Introduce Myself

3

Takayuki Nishiyama [Taka,Nisshy]

25 years old

4 years engineer

Long・Experienced Short・Interest・Learning

4

Topic

• What is SENS?

• Requirement

• Architecture

• Impression

5

Situation before Release SENS

Merchant

Inventory

All Rest

1 Item → 0 item

XX EC Site Rakuten YY EC Site

Stock Rest Stock Rest Stock Rest

1 11

0

Purchase

Real-Time

Purchase

Not delivered

Lag 15 min

6

Situation before Release SENS

Rakuten

Purchase

Order Mail

• Analyze mail & Collaborate System

• Manual Management

7

Shop

pe

r

Basket

SE

NS

Inven

tory

M

an

ag

em

ent

Syste

m

What is System Event Notification Service(SENS)?

8

Situation after Release SENS

Merchant

Inventory

All Rest

1 Item → 0 item

XX EC Site Rakuten YY EC Site

Stock Rest Stock Rest Stock Rest

0 01

Sync

Purchase

Real-Time

Give up

0

Sync

Easy!!

9

Requirement (Mission)

1. Real-time

2. Ensure Order Sync

3. Avoid Duplication

4. Keep High Performance

10

Architecture of SENS(First Version)

DB

API Layer Batch Layer

Java Remote Interface

11

Architecture of SENS

DB

API Layer Batch Layer

Java Remote Interface

Took Ave 207msec???

Too Slow !!

• Asynchronous

• Loose coupling ….

12

• Asynchronous

• Loose coupling

http://camel.apache.org/

→Message Routing Framework

13

Architecture of SENS

DB

API Layer Batch LayerCamel Layer

Java Remote Interface

Ave 40msec

ASYNC

14

Camel (Good Point)

• Understandable to message route

• Almost all Setting File

• Easy to set connection

15

Camel (Good Point)

• Coding is very simple

→Sending Process in Setting File

16

Camel (Bad point)

• Welcome to XML Hell

Line number: 213

- Process Flow Line : About 180

- End Point Line : 15

17

Camel (Bad point)

• Need many parameter

→this is one endpoint….

async or sync

Timeout

decode/encode

disconnect permanently

Etc…

18

Impression

• For loosing coupling, using camel is good

19

Impression

• For expanding service, there are many issue

20

Impression

• Thinking solution and architecture is fun!

21

Thank you!!!

top related