Database Design

MediaServices

MediaServices

id

INT

PK

 

state

INT

 

Service 상태 ( 0=Creating, 1=Created, 2=Deleting, 3=Error )

 

 

 

 

 

MediaTasks

MediaTasks

id

INT

PK

 

service_id

INT

FK

연결 된 Service의 ID

status

TEXT

 

Task의 현재 상태 (“Creating”, “Created”, “Deleting”, “Error” )

app_code

INT

 

Task가 실행 중인 앱 코드 (예: 0=PoD, 1=People Counting, 2=Motion Detection, 3=Face Recognition, …)

alarm_interval_hint

INT

DEFAULT=5

알람을 주는 App의 경우, 선호하는 주기를 설정 가능 (단위: 밀리초)

app_instance_id

TEXT

FK

Task을 실제로 실행하는 App이 내부적으로 관리하는 ID값. App은 서드파티가 될 수 있음.

inputs [ ]

JSONB

 

앱의 입력 파라메터

outputs [ ]

JSONB

 

앱의 출력

app_contexts [ ]

JSONB

 

App의 컨택스트를 얻을 수 있다면 이 곳에 저장

 

 

Transactions

Transactions

txid

INT

PK

Transaction ID

tx_type

INT

 

Transaction Type Code

created

Time

 

생성시각

expires

Time

 

만료시각. UTC time 표기. timestamp [ (p) ] with time zone

형식) 2019-10-19 10:23:54

status

TEXT

 

 

resources

TEXT

 

예약 된 리소스

 

 

 

JSONB Example Formats

jsonb: app_params_md

jsonb: app_params_md

width

INT

 

height

INT

 

fps

INT

 

codec

TEXT

 

jsonb: app_params_vi

jsonb: app_params_vi

annotation_mode

INT