MySQL
user
서비스의 사용자와 플랫폼의 사용자를 매핑한다.
- 플랫폼 내부에서는 플랫폼 userId 를 바탕으로 동작하게 된다.
- 서비스로부터 오는 요청은 service_user_id 이다.
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PK |
service |
varchar |
서비스 구분자 |
SMEEM |
| PK |
service_user_id |
varchar |
서비스 사용자 인증값 |
abc-user-id |
|
service_user_name |
varchar |
서비스 사용자 이름 |
daehwan |
|
user_id |
varchar |
플랫폼 내 사용자 id |
UUID |
index
service, user_id
device
Notee 플랫폼 유저와 디바이스를 매핑한다.
- 한 플랫폼 유저는 여러 디바이스를 가질수 있다.
- 한 디바이스는 여러 플랫폼 유저에게 매핑될 수 있다.
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PK |
service |
varchar |
서비스 구분자 |
SMEEM |
| PK |
user_id |
varchar |
플랫폼 user id |
abc-uuid |
| PK |
divice_token |
varchar |
디바이스 구분자 (토큰) |
abc-device-token |
|
device_os |
varchar |
디바이스 os |
IOS, AOS |
|
region |
varchar |
지역 |
KR |
notification_template
알림 저장소
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PK |
service |
varchar |
서비스 구분자 |
SMEEM |
| PK |
notification_method |
varchar |
알림 방식 |
TOPIC, CYCLE, SINGLE |
| PK |
notification_type |
varchar |
알림 종류 |
|
|
title |
varchar |
알림 제목 |
|
|
body |
varchar |
알림 메시지 |
|
|
notification_key |
varchar |
알림 key |
UUID |
Cassandra
notification
topic_notification
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PartitionKey |
slot |
int |
파티션 slot |
no / 30,000 |
| PartitionKey |
notification_key |
varchar |
알림 key |
|
| PartitionKey |
topic |
varchar |
토픽 |
max length : 50 |
| ClusteringKey |
no |
bigint |
토픽 알림 numbering |
|
| ClusteringKey |
device_token |
varchar |
디바이스 구분자 (토큰) |
|
| data |
registered_at |
bigint |
등록 시간 |
|
max : 300 bytes
10MB / 300 bytes = 30,000 raws per partition
cycle_notification
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PartitionKey |
slot |
int |
파티션 slot |
no / 30,000 |
| PartitionKey |
notification_key |
varchar |
알림 key |
|
| PartitionKey |
hour |
int |
시 |
0~23 |
| PartitionKey |
minute |
int |
분 |
0~59 |
| PartitionKey |
day |
varchar |
요일 |
MON, TUE, WED, THU, FRI, SAT, SUN |
| ClusteringKey |
no |
bigint |
토픽 알림 numbering |
|
| ClusteringKey |
device_token |
varchar |
디바이스 구분자 (토큰) |
|
| data |
registered_at |
bigint |
등록 시간 |
|
max : 300 bytes
10MB / 300 bytes = 30,000 raws per partition
notification_per_user
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PartitionKey |
user_id |
varchar |
플랫폼 user id |
uuid |
| PartitionKey |
service |
varchar |
서비스 구분자 |
SMEEM |
| ClusteringKey |
notification_method |
varchar |
알림 방식 |
TOPIC, CYCLE |
| ClusteringKey |
notification_type |
varchar |
알림 종류 |
|
| ClusteringKey |
device_token |
varchar |
디바이스 구분자 (토큰) |
|
| data |
data |
varchar |
알림 방식 별 JSON |
|
numbering
notification
| Key |
컬럼명 |
타입 |
설명 |
비고 |
| PartitionKey |
service |
varchar |
서비스 구분자 |
SMEEM |
| ClusteringKey |
notification_method |
varchar |
알림 방식 |
TOPIC, CYCLE |
| ClusteringKey |
notification_type |
varchar |
알림 종류 |
|
| counter |
version |
counter |
캐시 버전 |
|
| counter |
count |
counter |
알림에 등록된 유저 수 |
|
| counter |
no |
counter |
알림 increment 값 |
incr only |
MySQL
user
서비스의 사용자와 플랫폼의 사용자를 매핑한다.
index
service, user_id
device
Notee 플랫폼 유저와 디바이스를 매핑한다.
notification_template
알림 저장소
Cassandra
notification
topic_notification
max : 300 bytes
10MB / 300 bytes = 30,000 raws per partition
cycle_notification
max : 300 bytes
10MB / 300 bytes = 30,000 raws per partition
notification_per_user
numbering
notification