-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkspace.dsl
266 lines (193 loc) · 9.75 KB
/
workspace.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
workspace "Quiz Booking System" "Event Driven Architecture" {
model {
user = person "User"
MYSQLDB = softwareSystem "AWS Aurora" "RDBMS as a service" "External System, Database"
AWSS3 = softwareSystem "AWS S3" "Cloud Blob Storage" "External System"
AWSDynamoDb = softwareSystem "AWS DynamoDB" "nosql Database with DX accelarator" "External System, Database"
AWSCognito = softwareSystem "AWS Cognito" "User pool and authentication" "External System"
AWSSQS = softwareSystem "AWS SQS" "Message Queue" "External System"
AWSPinpoint = softwareSystem "AWS Pinpoint" "Multichannel marketing communication service" "External System"
OpenSearch = softwareSystem "OpenSearch" "AWS Open search service"
EventStoreDB = softwareSystem "EventstoreDB" "Cloud service for event store" "External System,
Redis = softwareSystem "Redis" "In memory Storage" "External System,
ApachePulsar = softwareSystem "Apache Pulsar" "Messaging system" "External System,
Stripe = softwareSystem "Stripe checkout" "Payment Gateway" "External System,
notification = softwareSystem "Notification Backend Service" {
notficationservice = container "Notification Service" {
-> ApachePulsar "Subscribe to Notification topic"
-> AWSPinpoint "Send out email with replacing values in email templates "
}
}
UserApp = softwareSystem "User Application" {
Backend = container "User Service" {
-> MYSQLDB "Writes email and sub ID"
-> AWSCognito "Validate JWT Token & fetch from Profile Info from Cognito using SDK"
-> Redis "Saves user information and renders from cache using SDK"
}
Frontend = container "User app Front End" {
user -> this "navigates via client identity.quiz.com"
-> AWSCognito "Register and Authenticate get JWT Token using SDK"
-> Backend "Uses REST call with JWT token to Get Profile Information"
}
AWSCognito -> ApachePulsar "Writes to User registration using Post Sign upLambda"
ApachePulsar -> Backend "Consume User registration events by establish TCP connection"
}
project = softwareSystem "Projection Service" {
-> MYSQLDB "Subscribe to Order Events and project to"
}
EventStoreDB -> project "Subscribe & Project Events to Mysql DB"
Course = softwareSystem "Course Booking Application" {
CourseService = container "Course Booking Service" {
-> AWSCognito "Validate JWT Token"
-> AWSDynamoDb "Writes course data and read by Course ID using SDK"
-> OpenSearch " fetch search Data using SDK"
-> Redis "Cart management saves & renders from cache using SDK"
-> EventStoreDB "Publish to Order Intiated status Order topics using REST POST call "
}
CourseApp = container "Course Booking Front end" {
user -> this "user navigate / redirect upon registration to course.quiz.com"
-> CourseService "Uses JWT token Get Profile Information using REST API call"
}
UserApp -> Course "user navigate / redirect upon registration to course.quiz.com"
}
Payment = softwareSystem "Payment Application" {
PaymentService = container "Payment Service" {
-> AWSCognito "Validate JWT Token"
-> ApachePulsar "Produce Message to Notification Topic"
-> EventStoreDB "Publish to Payment Recived status "
}
Stripe -> PaymentService "Payment Success notification webhook"
PaymentApp = container "Payment Front end" {
user -> this "User Navigates to payment.quiz.com once order intiated "
-> Stripe "Redirect to Payment gateway"
-> PaymentService "Check for payment success/failure status and show to user"
}
Course -> PaymentApp "User Navigates to payment.quiz.com once order intiated "
}
Quiz = softwareSystem "Quiz Management Application" {
QuizService = container "Quiz Service" {
-> AWSCognito "Validate JWT Token"
-> ApachePulsar "Reads the Quiz Reponse and Evaluate it"
-> AWSDynamoDb "Writes quiz data and read by quiz data SDK uses DX"
-> EventStoreDB "Publish to Quiz Results using TCP"
}
QuizResultService = container "Quiz Result Service" {
-> EventStoreDB "Subscribe to Quiz Results Events to publish immediately to frontend"
}
QuizApp = container "Quiz Front end" {
user -> this "User Navigates to test.quiz.com once order login and course purchased "
-> ApachePulsar "Users' quiz responses are published as messages to Quiz Topic"
-> QuizResultService "Websocket Connection established to get Quiz results"
}
}
live = deploymentEnvironment "Live" {
deploymentNode "Amazon Web Services" {
deploymentNode "US-East-1" {
cloudfront = infrastructureNode "Cloudfront"
route53 = infrastructureNode "Route 53"
waf = infrastructureNode "AWS WAF"
s3 = infrastructureNode "AWS s3"
eks = infrastructureNode "AWS EKS"
globalaccelerator = infrastructureNode "AWS global Accelerator"
elb = infrastructureNode "Elastic Load Balancer"
deploymentNode "PODS" {
webApplicationInstance = containerInstance PaymentService
}
deploymentNode "Bucket" {
fronendinstance = containerInstance PaymentApp
}
}
deploymentNode "US-West-2" {
cloudfront1 = infrastructureNode "Cloudfront"
route531 = infrastructureNode "Route 53"
waf1 = infrastructureNode "AWS WAF"
s31 = infrastructureNode "AWS s3"
eks1 = infrastructureNode "AWS EKS"
globalaccelerator1 = infrastructureNode "AWS global Accelerator"
elb1 = infrastructureNode "Elastic Load Balancer"
deploymentNode "PODS" {
webApplicationInstance1 = containerInstance PaymentService
}
deploymentNode "Bucket" {
fronendinstance1 = containerInstance PaymentApp
}
}
}
route53 -> globalaccelerator "Alias target to"
globalaccelerator -> elb "redirect https request"
route53 -> cloudfront "alias"
cloudfront -> s3 "s3 static fronend websites"
s3 -> fronendinstance "renders page"
elb -> eks "round robin routing and failover to single region when unhealthy cluster using ELB rule "
eks -> webApplicationInstance "Ingress Forwards requests to" "Container"
route531 -> globalaccelerator1 "Alias target to"
globalaccelerator1 -> elb1 "redirect https request"
route531 -> cloudfront1 "alias"
cloudfront1 -> s31 "s3 static fronend websites"
s31 -> fronendinstance1 "renders page"
elb1 -> eks1 "round robin routing and failover to single region when unhealthy cluster using ELB rule "
eks1 -> webApplicationInstance1 "Ingress Forwards requests to" "Container"
}
}
views {
deployment UserApp live {
include *
autoLayout lr
}
deployment Payment live {
include *
autoLayout lr
}
deployment Course live {
include *
autoLayout lr
}
deployment Quiz live {
include *
autoLayout lr
}
systemContext UserApp {
include Course
autolayout lr
}
container UserApp {
include *
autolayout lr
}
systemContext Course {
include UserApp
autolayout rl
}
container Course {
include *
autolayout rl
}
systemContext project {
include EventStoreDB
include MYSQLDB
autolayout rl
}
systemContext Payment {
include Course
autolayout rl
}
container Payment {
include *
exclude Course
autolayout lr
}
systemContext Quiz {
include *
autolayout lr
}
container Quiz {
include *
autolayout lr
}
container notification {
include *
autolayout lr
}
theme default
}
}