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
/
working.html
736 lines (709 loc) · 30.6 KB
/
working.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Working with Cloudstate :: Cloudstate Documentation</title>
<link rel="stylesheet" href="./_/css/site.css?v-01">
<link rel="shortcut icon" href="./_/img/favicon.ico" />
<meta itemprop="name" content="Working with Cloudstate | Cloudstate Documentation">
<meta name="twitter:title" content="Working with Cloudstate | Cloudstate Documentation">
<meta property="og:title" content="Working with Cloudstate | Cloudstate Documentation" />
<meta property="og:type" content="website" />
<meta name="generator" content="Antora 2.3.3">
<link rel="canonical" href="https://cloudstate.io/docs/working.html">
<meta property="og:url" content="https://cloudstate.io/docs/working.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" data-depth="2">
<a class="nav-link" href="cloudstate-solution.html">The Cloudstate solution</a>
</li>
<li class="nav-item is-current-page" 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="working.html">Working with Cloudstate</a></li>
</ul>
</nav>
</div>
<div class="col-content">
<article id="page-content" class="doc">
<h1>Working with Cloudstate</h1>
<fieldset class="supergroup-switch">
</fieldset>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>Cloudstate provides a good developer experience by implementing the low level details that allow you to focus on your business logic. When using Cloudstate open source, you need to provide your own Kubernetes environment and provision Cloudstate to run in it. Lightbend also provides a <a href="https://www.lightbend.com/akka-serverless">Cloudstate service</a> that manages the Kubernetes environment for you.</p>
</div>
<div class="paragraph">
<p>This page introduces the basics of working with Cloudstate open source.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="use-the-programming-language-of-choice"><a class="anchor" href="#use-the-programming-language-of-choice"></a>Use the programming language of choice</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Cloudstate uses <a href="https://grpc.io/">gRPC</a>, which is not tied to any programming language, for communication between services. Cloudstate includes connectors to gRPC for a growing number of programming languages. And, any language with reasonable support for gRPC can have a connector written for it in short order. If you don’t see your chosen language, don’t be concerned, just let us know, it may already be in the works!</p>
</div>
<div class="paragraph">
<p>Currently, Cloudstate supports:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Dart</p>
</li>
<li>
<p>Go</p>
</li>
<li>
<p>Java</p>
</li>
<li>
<p>Javascript</p>
</li>
<li>
<p>Kotlin</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>To write your Cloudstate services, you of course will need to know how to code in your chosen language. However, you will not need to learn a substantially different paradigm for using that language: The API for Cloudstate itself is short and straightfoward. And, you won’t need anything else to be productive, unlike many other platforms that have a long and steep learning curve.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cloudstate-projects"><a class="anchor" href="#cloudstate-projects"></a>Cloudstate projects</h2>
<div class="sectionbody">
<div class="paragraph">
<p>A Cloudstate project contains one or more <em>services</em> that can be deployed, which can all communicate with each other. Services in different projects cannot directly call each other except through defined ingresses.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cloudstate-services"><a class="anchor" href="#cloudstate-services"></a>Cloudstate services</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Cloudstate services contain your business logic. Each service is a unit of functionality that (typically) relates to a single entity and can consume and operate on various messages relating to that entity. For instance, a <code>shopping cart</code> entity might have messages that operate on it such as <code>addItem</code>, <code>removeItem</code> and <code>getCart</code>. A Cloudstate project can contain multiple services.</p>
</div>
<div class="paragraph">
<p>A Cloudstate service looks like this:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="_images/high-level-design.svg" alt="high level design">
</div>
</div>
<div class="ulist">
<ul>
<li>
<p><strong>Ingress</strong> - This can be Istio, Knative, or just regular ClusterIP service communication in Kubernetes. Whatever service approach is used, Cloudstate expects traffic to be load balanced across its pods randomly and evenly.</p>
</li>
<li>
<p><strong>Akka Sidecar</strong> - This sidecar is injected by the Cloudstate operator. All requests go through it. The sidecars of a single Cloudstate service form a cluster, communicating directly with each other using Akka remoting. This cluster, and the communication links between the sidecars, allows for sharding and replication of state, along with addressed P2P messaging between pods.</p>
</li>
<li>
<p><strong>Code</strong> - This is the function implemented by the developer. It can be written in any language that supports gRPC. The Akka sidecars communicate with the user functions using a predefined gRPC protocol. This protocol carries both incoming requests and outgoing responses, as well as messages conveying the current state of the system. Typically, Cloudstate will provide support libraries for each language that adapt the gRPC protocol to an idiomatic API for that language.</p>
</li>
<li>
<p><strong>Distributed Datastore</strong> - When a service needs to persist state (such as when implementing Event Sourced entities), this state will be persisted to a distributed datastore. It is important to note, the user code does not interact directly with the datastore - it interacts with the Akka sidecars, and the Akka sidecars communicate with the datastore. This way, all database communication can be directly managed and monitored by the Akka sidecar. And since this is done through the provision of high level patterns, assumptions can be made that allow the sidecars to safely cache, shard, and replicate data across the cluster.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="the-cloudstate-development-process"><a class="anchor" href="#the-cloudstate-development-process"></a>The Cloudstate development process</h2>
<div class="sectionbody">
<div class="paragraph">
<p>TBW.</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>After verifying <a href="develop/prerequisites.html" class="page">Prerequisites</a> and <a href="develop/install.html" class="page">Installing Cloudstate</a>, we recommend that you start with a <a href="develop/tutorial.html" class="page">Tutorial</a> to learn Cloudstate basics.</p>
</div>
</div>
</div>
<nav class="pagination">
<span class="prev"><a href="cloudstate-solution.html">The Cloudstate solution</a></span>
<span class="next"><a href="examples.html">Example Applications</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/working.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>