/
ml_platform_architecture.dsl
82 lines (67 loc) · 3.22 KB
/
ml_platform_architecture.dsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
workspace {
model {
customer = person "Customer" "Customer using the app" "External"
data_scientist = person "Data Scientist" "Data scientist developing a machine learning model" "External"
ml_platform = softwareSystem "ML Platform" "Machine learning model serving platform exposing models over REST and Kafka." {
sidecar = container "Model sidecar application" "Ambassador sidecar for ML model" {
streaming_module = component "Streaming module" "Reads prediction requests from Kafka topic and returns predictions to another."{
}
rest_module = component "REST module" "Receives prediction requests and returns response."
}
model_container = container "Model" "Machine learning model serving predictions" {
sidecar -> this "Sends request to" "GRPC"
model_module = component "Python model implementation" "Python Model class implementing __init__ and predict methods" {
data_scientist -> this "Develops"
}
api_module = component "Model wrapper" "Python model wrapper serving predictions using a Dataframe => Dataframe interface." {
rest_module -> this "Requests prediction from" "GRPC"
streaming_module -> this "Requests prediction from" "GRPC"
this -> model_module "Initializes and calls model."
}
}
}
logging = softwareSystem "Log aggregator" "Logging system based on ELK stack" "External" {
sidecar -> this "Sends logs to" "Kafka"
model_container -> this "Sends logs to" "Filebeat"
}
RTK = softwareSystem "Metrics collector" "Reliability toolkit supporting web application monitoring" "External" {
sidecar -> this "Exposes metrics to" "HTTP"
}
rest_client = softwareSystem "Backend application A" "Any application that makes use of a REST machine learning model" "External" {
this -> rest_module "Requests prediction from" "HTTP"
}
streaming_client = softwareSystem "Backend application B" "Any application that makes use of a streaming machine learning model" "External" {
this -> streaming_module "Sends prediction to" "Kafka"
}
client_fe = softwareSystem "FE application" "Client frontend web application" "External,FE" {
this -> rest_client "Requests information from" "HTTP"
this -> streaming_client "Requests information from" "HTTP"
customer -> this "Uses"
}
}
views {
systemContext ml_platform {
include *
include customer
include client_fe
autolayout lr
}
container ml_platform {
include *
autolayout lr
}
component model_container {
include *
autolayout lr
}
theme default
styles {
element "External" {
background #cccccc
}
element "FE" {
shape WebBrowser
}
}
}
}