This repository has been archived by the owner on Mar 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcloudstate-solution.html
764 lines (737 loc) · 32.9 KB
/
cloudstate-solution.html
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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Cloudstate solution :: Cloudstate Documentation</title>
<link rel="stylesheet" href="./_/css/site.css?v-01">
<link rel="shortcut icon" href="./_/img/favicon.ico" />
<meta itemprop="name" content="The Cloudstate solution | Cloudstate Documentation">
<meta name="twitter:title" content="The Cloudstate solution | Cloudstate Documentation">
<meta property="og:title" content="The Cloudstate solution | Cloudstate Documentation" />
<meta property="og:type" content="website" />
<meta name="generator" content="Antora 2.3.3">
<link rel="canonical" href="https://cloudstate.io/docs/cloudstate-solution.html">
<meta property="og:url" content="https://cloudstate.io/docs/cloudstate-solution.html" />
<meta property="og:site_name" content="Cloudstate Documentation" />
<meta name="author" content="Cloudstate Documentation">
<meta itemprop="image" content="https://cloudstate.io/dist/images/cloudstate-distributed-state-management-for-serverless.png">
<meta name="twitter:image:src" content="https://cloudstate.io/dist/images/cloudstate-distributed-state-management-for-serverless.png">
<meta property="og:image" content="https://cloudstate.io/dist/images/cloudstate-distributed-state-management-for-serverless.png" />
<meta property="og:image:secure_url" content="https://cloudstate.io/dist/images/cloudstate-distributed-state-management-for-serverless.png" />
<!--Head Scripts -->
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="c3a30abe-4934-45a2-ba48-823fa026fc64" ></script>
<!--Head Scripts YouTube Embed-->
<script type="text/javascript">
var ytID;
function OptanonWrapper() {
//find each YouTube embed and only load if cookies have been approved
$( "a.yt-widget" ).each(function( index ) {
var anchor = $(this);
var ytURL = $(this).attr("href");
var queryString = anchor[0].search;
let params = new URLSearchParams(queryString);
ytID = params.get("v");
$(this).before('<div class="flex-video-wrapper"><div class="flex-video"><div id="yt-'+ytID+'" class="cookie-warning youtube-warning"><a class="optanon-allow-all" onclick="OneTrust.AllowAll();">Accept cookies to view video</a><span>Alternatively you can watch the video <a href="'+ytURL+'" target="_blank">here on YouTube</a></span></div></div></div>');
$(this).removeAttr("href").removeClass("yt-widget").addClass("yt-widget-hide");
});
$( ".youtube-warning" ).each(function( index ) {
OneTrust.InsertHtml('<iframe id="player" class="youtube-embed-player" src="//www.youtube.com/embed/'+ytID+'?rel=0&modestbranding=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>', 'yt-'+ytID, null, {deleteSelectorContent: true}, '4');
});
}
</script> </head>
<body class="article cloudstate">
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item" href="https://cloudstate.io">
<img class="header-logo" src="./_/img/cloudstate-reverse.svg">
</a>
<a href="https://cloudstate.io/docs/" id="site-id" class="site-id">Documentation</a>
</div>
<div id="topbar-nav" class="navbar-menu">
<div class="navbar-end">
<div id="lightbend-banner" class="lightbend-banner cloudstate full-width" data-category="OSS Lightbend Banner Impression" data-label="Cloudstate Banner Impression">
<div class="wrapper">
<div class="nav">
<a class="banner-btn oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Enhance your apps with Lightbend [Button] - Cloudstate Banner" href="https://www.lightbend.com/lightbend-subscription?r=oss-banner-cloudstate" target="_blank">
<span class="banner-btn-text">Enhance your apps with</span>
<img class="lightbend-logo" src="./_/img/lightbend-logos/lightbend-reverse.svg" alt="Lightbend" title="Lightbend">
</a>
<div class="drop-down">
<svg class="svg-chevon-circle-down" version="1.1" id="Chevron_circled_down" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<g>
<circle cx="10" cy="10" r="9" />
<path d="M12.505,8.698L10,11L7.494,8.698c-0.198-0.196-0.518-0.196-0.718,0c-0.197,0.196-0.197,0.515,0,0.71l2.864,2.807
c0.199,0.196,0.52,0.196,0.717,0l2.864-2.807c0.199-0.195,0.198-0.514,0-0.71C13.024,8.502,12.704,8.502,12.505,8.698z" />
</g>
</svg>
<div class="drop-down-content">
<div class="lightbend-family">
<a href="https://akka.io" class="akka oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Akka - Logo Tag Line - Cloudstate Banner">
<img class="akka-full-color-logo" src="./_/img/lightbend-logos/akka-full-color.svg" alt="Akka by Lightbend" title="Akka by Lightbend">
</a>
<a href="https://cloudflow.io" class="cloudflow oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Cloudflow - Logo Tag Line - Cloudstate Banner">
<img class="cloudflow-full-color-logo" src="./_/img/lightbend-logos/cloudflow-full-color.svg" alt="Cloudflow by Lightbend" title="Cloudflow by Lightbend">
</a>
<a href="https://www.lagomframework.com" class="lagom oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Lagom - Logo Tag Line - Cloudstate Banner">
<img class="lagom-full-color-logo" src="./_/img/lightbend-logos/lagom-full-color.svg" alt="Lagom Framework by Lightbend" title="Lagom Framework by Lightbend">
</a>
<a href="https://www.playframework.com" class="play oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Play - Logo Tag Line - Cloudstate Banner">
<img class="play-full-color-logo" src="./_/img/lightbend-logos/play-full-color.svg" alt="Play Framework by Lightbend" title="Play Framework by Lightbend">
</a>
<a href="https://www.scala-lang.org" class="scala oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Scala - Logo Tag Line - Cloudstate Banner">
<img class="scala-full-color-logo" src="./_/img/lightbend-logos/scala-full-color.svg" alt="Scala by Lightbend" title="Scala by Lightbend">
</a>
<div class="cloudstate current">
<img class="cloudstate-full-color-logo" src="./_/img/lightbend-logos/cloudstate-full-color.svg" alt="Cloudstate by Lightbend" title="Cloudstate by Lightbend">
<span>Get developer assistance and expert support from Lightbend.</span>
<a class="oss-track-link-label" data-category="OSS Lightbend Banner Clicks" data-label="Learn More [Button] - Cloudstate Banner" href="https://www.lightbend.com/lightbend-subscription?r=oss-banner-cloudstate" target="_blank">Learn More</a>
</div>
</div>
<div class="title">The Lightbend Family</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="main-wrapper">
<div class="navigation-container" data-component="" data-version="master">
<aside class="navigation">
<div class="panels">
<div class="navigation-menu is-active" data-panel="menu">
<nav class="nav-menu">
<ul class="nav-list">
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="index.html">Introduction</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="stateless-limitations.html">Current limitations of Serverless platforms</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="crud-limitations.html">Rethinking CRUD</a>
</li>
<li class="nav-item is-current-page" data-depth="2">
<a class="nav-link" href="cloudstate-solution.html">The Cloudstate solution</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="working.html">Working with Cloudstate</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="examples.html">Example Applications</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="concepts/index.html">Important concepts</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="concepts/glossary.html">Glossary</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="concepts/grpc.html">gRPC</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="concepts/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="concepts/crdts.html">Conflict-free replicated data types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="concepts/effects.html">Forwarding and effects</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="develop/index.html">Developing Cloudstate services</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="develop/prerequisites.html">Prerequisites</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="develop/install.html">Installing Cloudstate</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="develop/gke.html">Run on GKE</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="develop/examples.html">Available Cloudstate examples</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="develop/tutorial.html">The shopping cart tutorial</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="dart/index.html">Implementing in Dart</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/gettingstarted.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/actions.html">Actions</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/examples.html">Examples</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dart/serialization.html">Serialization</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="go/index.html">Implementing in Go</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/gettingstarted.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/effects.html">Forwarding and effects</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/serialization.html">Serialization</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="go/api.html">API docs</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="java/index.html">Implementing in Java</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/getting-started.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/effects.html">Forwarding and effects</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/serialization.html">Serialization</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="java/api.html">Java API docs</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="javascript/index.html">Implementing in JavaScript</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/getting-started.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/effects.html">Forwarding and effects</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/serialization.html">Serialization</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="javascript/api.html">JavaScript API docs</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="kotlin/index.html">Implementing in Kotlin</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="kotlin/gettingstarted.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="kotlin/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="kotlin/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<button class="nav-toggle"></button>
<a class="nav-link" href="kotlin/dsl.html">DSL</a>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<a class="nav-link" href="kotlin/eventsourceddsl.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="3">
<a class="nav-link" href="kotlin/crdtdsl.html">Conflict-free Replicated Data Types</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="kotlin/examples.html">Examples</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="kotlin/serialization.html">Serialization</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="python/index.html">Implementing in Python</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="python/gettingstarted.html">Getting started</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="springboot/index.html">Implementing in Spring Boot</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="springboot/gettingstarted.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="springboot/configuration.html">Configuration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="springboot/cdi.html">Context Injection</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="springboot/conventions.html">Conventions and Restrictions</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="springboot/examples.html">Examples</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="dotnet/index.html">Implementing in .Net</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/gettingstarted.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/eventsourced.html">Event sourcing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/crdt.html">Conflict-free Replicated Data Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/actions.html">Actions</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/examples.html">Examples</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="dotnet/serialization.html">Serialization</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="deploy/index.html">Deploying to production systems</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="deploy/install-production.html">Setting up a production cluster</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="deploy/deploying.html">Deploying stateful services</a>
</li>
<li class="nav-item" data-depth="2">
<button class="nav-toggle"></button>
<a class="nav-link" href="deploy/stateful-stores.html">Stateful stores</a>
<ul class="nav-list">
<li class="nav-item" data-depth="3">
<a class="nav-link" href="deploy/cassandra.html">Cassandra</a>
</li>
<li class="nav-item" data-depth="3">
<a class="nav-link" href="deploy/postgresql.html">PostgresSQL</a>
</li>
<li class="nav-item" data-depth="3">
<a class="nav-link" href="deploy/inmemory.html">In memory store</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="deploy/monitoring.html">Monitoring</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="deploy/autoscaling.html">Autoscaling</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="deploy/security.html">Security</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-toggle"></button>
<a class="nav-link" href="contribute/index.html">Contributing to the project</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/architecture.html">Architecture</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/getting-started.html">Getting started</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/build-native.html">Building native images</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/serialization.html">Serialization conventions</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/language-support.html">Language support</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/knative-integration.html">Knative integration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/graalvm-integration.html">GraalVM integration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="contribute/testing.html">Testing</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="navigation-explore" data-panel="explore">
<div class="context">
<span class="title">Cloudstate</span>
<span class="version">master</span>
</div>
<ul class="components">
<li class="component is-current">
<span class="title">Cloudstate</span>
<ul class="versions">
<li class="version is-current is-latest">
<a href="index.html">master</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</div>
<main class="main">
<div class="toolbar" role="navigation">
<button class="navigation-toggle"></button>
<nav class="crumbs" aria-label="breadcrumbs">
<ul>
<li class="crumb"><a href="index.html">Introduction</a></li>
<li class="crumb"><a href="cloudstate-solution.html">The Cloudstate solution</a></li>
</ul>
</nav>
</div>
<div class="col-content">
<article id="page-content" class="doc">
<h1>The Cloudstate solution</h1>
<fieldset class="supergroup-switch">
</fieldset>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>As discussed in previous pages, the motivation for Cloudstate is based on the following:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The Serverless Developer Experience, from development to production, is revolutionary and will grow to dominate the future of Cloud Computing</p>
</li>
<li>
<p>FaaS is—with its ephemeral, stateless, and short-lived functions—merely the first step and implementation of the Serverless Developer Experience.</p>
</li>
<li>
<p>FaaS is great for processing intensive, parallelizable workloads, moving data from A to B providing enrichment and transformation along the way. But it is quite limited and constrained in terms of the use-cases it addresses well, which makes it difficult and inefficient to carry out traditional application development and to implement distributed systems protocols.</p>
</li>
<li>
<p>What’s needed is a next-generation Serverless platform (Serverless 2.0) and programming model for general-purpose application development (e.g. microservices, streaming pipelines, AI/ML, etc.).</p>
</li>
<li>
<p>One that lets us implement common use-cases such as: shopping carts, user sessions, transactions, ML models training, low-latency prediction serving, job scheduling, and much more.</p>
</li>
<li>
<p>What is missing is support for long-lived virtual stateful services, a way to manage distributed state in a scalable and available fashion, and options for choosing the right consistency model for the job.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Cloudstate addresses these problems with a next-generation Serverless platform based on on Knative/Kubernetes, gRPC, and Akka (Cluster, Persistence, etc.), with a rich set of client APIs (JavaScript, Go, Python, Java, Scala, PHP, etc.) <a href="https://cloudstate.io">Cloudstate</a> is a standards effort defining a specification, protocol, and reference implementation, aiming to extend the promise of Serverless and its Developer Experience to general-purpose application development.</p>
</div>
<div class="paragraph">
<p>Cloudstate builds on and extends the traditional stateless FaaS model, by adding support for long-lived addressable stateful services and a way of accessing mapped well-formed data via <a href="https://grpc.io/">gRPC</a>, while allowing for a range of different consistency model—from strong to eventual consistency—based on the nature of the data and how it should be processed, managed, and stored.</p>
</div>
<div class="paragraph">
<p>You define your data model, choose its consistency mode and resolution method, and access both your data, data-centric operations, streaming pipelines, and events via a well-formed protocol of gRPC command and read channels.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="new-use-cases-that-cloudstate-enables"><a class="anchor" href="#new-use-cases-that-cloudstate-enables"></a>New use-Cases that Cloudstate enables</h2>
<div class="sectionbody">
<div class="paragraph">
<p>As discussed previously, implementing traditional application development, microservices, stateful data pipelines, and general-purpose distributed system problems using stateless functions (FaaS) is very hard to do in a low-latency, performant, reliable way.</p>
</div>
<div class="paragraph">
<p>Cloudstate is designed to extend the model and make it straightforward to implement use-cases such as:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><strong>Training and Serving of Machine Learning Models</strong></p>
<div class="paragraph">
<p>Any use-case that needs to build up, and provide low latency serving of, dynamic models</p>
</div>
</li>
<li>
<p><strong>Low-latency Real-time Prediction/Recommendation Serving</strong></p>
</li>
<li>
<p><strong>Low-latency Real-time Fraud Detection</strong></p>
</li>
<li>
<p><strong>Low-latency Real-time Anomaly Detection</strong></p>
</li>
<li>
<p><strong>User Session, Shopping Cart, and similar</strong></p>
<div class="paragraph">
<p>Managing in-memory (but potentially durable) session state across the lifecycle of individual requests. A very common use-case, e.g. retail, online gaming, real-time betting, etc.</p>
</div>
</li>
<li>
<p><strong>Transaction and Workflow Management</strong></p>
<div class="paragraph">
<p>Transactional distributed workflow management, such as the Saga Pattern. Manage each step in the workflow including rollback/compensating actions in the case of failure, while offering options in terms of consistency guarantees.</p>
</div>
</li>
<li>
<p><strong>Shared Collaborative Workspaces</strong> E.g. Collaborative Document Editing and Chat Rooms.</p>
</li>
<li>
<p><strong>Distributed counting, voting, etc.</strong></p>
</li>
<li>
<p><strong>Leader Election, and other distributed systems protocols for coordination</strong></p>
<div class="paragraph">
<p>Trivial to implement with Akka Cluster/Distributed Data, while always coordinating over a distributed storage (such as DynamoDB in the case of Lambda) is too costly, slow, and can become a single point of failure.</p>
</div>
</li>
</ul>
</div>
<div class="paragraph">
<p>The goal of Cloudstate is to provide a way for implementing these use-cases in a scalable and available way, working in concert with the application itself, all the while providing end-to-end correctness, consistency, and safety.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="design-overview"><a class="anchor" href="#design-overview"></a>Design overview</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The Cloudstate reference implementation is built on top of Kubernetes, <a href="https://cloud.google.com/knative">Knative</a>, <a href="https://www.graalvm.org">Graal VM</a>, <a href="https://grpc.io">gRPC</a>, and <a href="https://akka.io">Akka</a>, with a growing set of client API libraries for different languages. Inbound and outbound communication goes through <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar#:~:text=Sidecars%20are%20supporting%20processes%20or,fate%20of%20its%20parent%20application">sidecars</a> over a gRPC channel using a constrained and well-defined protocol, in which the user defines commands in, events in, command replies out, and events out. A gRPC channel is at most one per service/entity, allowing the infrastructure to safely cache entity state in memory in the context of the gRPC stream. Communicating over a gRPC allows the user code to be implemented in different languages (JavaScript, Java, Go, Scala, Python, etc.).</p>
</div>
<div class="imageblock">
<div class="content">
<img src="_images/serving_stateful_functions.png" alt="Serving of polyglot stateful functions">
</div>
</div>
<div class="paragraph">
<p>Each stateful service is backed by an Akka cluster of durable Akka actors (supporting several data models, storage techniques, and databases). The user, however, is shielded from these complexities through a set of sidecars bridging the user code to the backend state and cluster management.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="_images/powered_by_akka_sidecars.png" alt="Powered by gRPC and Akka sidecars">
</div>
</div>
<div class="paragraph">
<p>Managing distributed state isn’t just about pushing data from A to B in a reliable fashion. It’s about selecting a model that reflects the real world use of the data, and its convergence on usable consistency, not artificially enforced consistency. Being able to have data span clusters, data centers, availability zones, and continents, and maintain a useful coherent state is something that the combination of Kubernetes and Akka excel at. Additionally, repetitive work that is better executed in the stateful cluster, or needs to maintain long-running state can be embedded via command channels.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="whats-next"><a class="anchor" href="#whats-next"></a>What’s next</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Learn more about <a href="working.html" class="page">Working with Cloudstate</a>.</p>
</div>
</div>
</div>
<nav class="pagination">
<span class="prev"><a href="crud-limitations.html">Rethinking CRUD</a></span>
<span class="next"><a href="working.html">Working with Cloudstate</a></span>
</nav>
</article>
<aside class="toc sidebar">
<div class="toc-menu"></div>
</aside>
</div>
<div class="main-footer">
<div class="page-source">
Found an error in this documentation? Please feel free to <a href="https://github.com/cloudstateio/cloudstate/edit/master/docs/src/modules/ROOT/pages/cloudstate-solution.adoc">edit this page</a> and contribute a pull request.
</div>
<div class="footer-box">
<footer class="footer">
<div class="footer-logo"><a href="https://cloudstate.io"><img src="./_/img/cloudstate-color.svg"></a></div>
<div class="footer-content">© Cloudstate <script>document.write(new Date().getFullYear());</script> | <a href="https://www.lightbend.com/legal/privacy" target="_blank">Privacy Policy</a> | <a href="https://cloudstate.io/cookie">Cookie Listing</a> | <a class="optanon-toggle-display">Cookie Settings</a></div>
</footer>
</div>
</div> </main>
</div>
<!--Footer Scripts Global-->
<script src="./_/js/site.js"></script>
<script src="./_/js/vendor/highlight.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="./_/js/vendor/groups.js"></script>
<script>hljs.initHighlighting()</script>
<script src="./_/js/vendor/jquery.waypoints.min.js"></script>
<script src="./_/js/vendor/inview.min.js"></script>
<script>
(function($) {
$(function() {
var pageViewedTriggerElement = '#page-content';
//override #page-content if a custom trigger is present in page
if($("#page-viewed-trigger").length){
pageViewedTriggerElement = '#page-viewed-trigger';
}
var inview = new Waypoint.Inview({
element: $(pageViewedTriggerElement)[0],
entered: function(direction) {
//fire custom Jquery event that Marketo can listen for
$.event.trigger({
type: "pageContentViewed"
});
}
})
});
})(jQuery);
</script>
<!--Marketo-->
<script>
//store munchkin status to use in other functions
var munchkinLive = false;
//marketo munchkin
(function() {
var didInit = false;
function initMunchkin() {
if(didInit === false) {
didInit = true;
Munchkin.init('558-NCX-702', { 'asyncOnly': true, 'disableClickDelay': true });
munchkinLive = true;
}
}
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = '//munchkin.marketo.net/munchkin.js';
s.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
initMunchkin();
}
};
s.onload = initMunchkin;
document.getElementsByTagName('head')[0].appendChild(s);
})();
//wait for jquery as we use a custom jquery event, triggered by waypoint.
(function($) {
$(function() {
var pageViewed = false;
$(document).on("pageContentViewed", handlePageContentViewed);
function handlePageContentViewed(e) {
var viewedPagePath = "/viewed"+window.location.pathname;
if(!pageViewed && munchkinLive){
Munchkin.munchkinFunction('visitWebPage', {
'url': viewedPagePath
}
);
pageViewed = true;
}
};
});
})(jQuery);
</script><!--Footer Scripts Cloudstate-->
<!-- Google Tag Manager -->
<script type="text/plain" class="optanon-category-2">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WWL9BXX');</script>
<!-- End Google Tag Manager -->
</body>
</html>