proschi 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,6 +187,18 @@
187
187
  {
188
188
  "include": "#comment"
189
189
  },
190
+ {
191
+ "comment": "`x200` (fan-out) and `~2MB` (payload size) at the start of a step label, in either order.",
192
+ "match": "\\G\\s*(x\\d+|~\\d+(?:\\.\\d+)?[KMGT]?B)(?=\\s|$)(?:\\s+(x\\d+|~\\d+(?:\\.\\d+)?[KMGT]?B)(?=\\s|$))?",
193
+ "captures": {
194
+ "1": {
195
+ "name": "constant.numeric.label-prefix.proschi"
196
+ },
197
+ "2": {
198
+ "name": "constant.numeric.label-prefix.proschi"
199
+ }
200
+ }
201
+ },
190
202
  {
191
203
  "include": "#payload"
192
204
  },
@@ -384,12 +396,12 @@
384
396
  },
385
397
  "section-keyword": {
386
398
  "name": "keyword.other.proschi",
387
- "match": "\\b(?:traffic|requirements|capacity|entity|decision|test|mix|durable|volatile|survive|because|rejected|calls|before|never|every|responds|writes|responding|handles|failure|path|replicas|any|in|scenario|latency|availability|cost|no|from|to|has|of|node|key|index|unique|optional|p50|p90|p95|p99|p999)\\b"
399
+ "match": "\\b(?:traffic|requirements|capacity|entity|decision|test|mix|durable|volatile|survive|because|rejected|calls|before|after|never|every|waits|for|starts|at|or|responds|writes|reads|responding|handles|failure|path|replicas|any|strong|eventual|store|in|scenario|latency|availability|cost|shards|consistency|bandwidth|egress|no|from|to|has|of|node|key|index|unique|optional|p50|p90|p95|p99|p999)\\b"
388
400
  },
389
401
  "quantity": {
390
- "comment": "A number with an optional fraction, magnitude and unit, attached or one space away: 120, 2.5, 50ms, 100k rps, 99.9%, 4xx.",
402
+ "comment": "A number with an optional fraction, magnitude and unit, attached or one space away: 120, 2.5, 50ms, 100k rps, 99.9%, 4xx, 500 MB/s, 0.05 usd/GB.",
391
403
  "name": "constant.numeric.proschi",
392
- "match": "\\b\\d+(?:\\.\\d+)?(?:[A-Za-z]+(?:/[A-Za-z]+)?|%)?(?: (?:rps|rpm|rpd|ms|s|usd/month)\\b| %)?"
404
+ "match": "\\b\\d+(?:\\.\\d+)?(?:[A-Za-z]+(?:/[A-Za-z]+)?|%)?(?: (?:rps|rpm|rpd|ms|s|usd/month|usd/GB|MB/s|GB/s)\\b| %)?"
393
405
  }
394
406
  }
395
407
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proschi",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Command-line checker and language server for Proschi architecture diagrams",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -593,6 +593,23 @@
593
593
  "responseLoc": {
594
594
  "$ref": "#/$defs/loc",
595
595
  "description": "The `-->` line that answered the request."
596
+ },
597
+ "multiplier": {
598
+ "type": "integer",
599
+ "minimum": 1,
600
+ "description": "`x200` at the start of the label: the step happens this many times per request (fan-out). Absent means 1."
601
+ },
602
+ "sizeBytes": {
603
+ "type": "integer",
604
+ "minimum": 1,
605
+ "description": "`~2MB` at the start of the label: payload size in bytes (decimal units)."
606
+ },
607
+ "access": {
608
+ "enum": [
609
+ "read",
610
+ "write"
611
+ ],
612
+ "description": "From the HTTP method, or the first word of the label (INSERT, SET, PUBLISH, … write); every request step has one."
596
613
  }
597
614
  },
598
615
  "required": [
@@ -608,12 +625,13 @@
608
625
  "executionType",
609
626
  "isParallel",
610
627
  "isConditional",
628
+ "access",
611
629
  "loc"
612
630
  ],
613
631
  "additionalProperties": false
614
632
  },
615
633
  "selector": {
616
- "description": "A node id, an exact tech stack, or every node of a kind (`any cache`).",
634
+ "description": "A node id, an exact tech stack, every node of a kind (`any cache`), every data store of a consistency (`any strong store`), or a union (`X or Y`).",
617
635
  "oneOf": [
618
636
  {
619
637
  "type": "object",
@@ -646,6 +664,10 @@
646
664
  "enum": [
647
665
  "client",
648
666
  "edge",
667
+ "cdn",
668
+ "loadbalancer",
669
+ "gateway",
670
+ "dns",
649
671
  "service",
650
672
  "function",
651
673
  "cache",
@@ -663,6 +685,37 @@
663
685
  "kind"
664
686
  ],
665
687
  "additionalProperties": false
688
+ },
689
+ {
690
+ "type": "object",
691
+ "properties": {
692
+ "consistency": {
693
+ "enum": [
694
+ "strong",
695
+ "eventual"
696
+ ]
697
+ }
698
+ },
699
+ "required": [
700
+ "consistency"
701
+ ],
702
+ "additionalProperties": false
703
+ },
704
+ {
705
+ "type": "object",
706
+ "properties": {
707
+ "anyOf": {
708
+ "type": "array",
709
+ "items": {
710
+ "$ref": "#/$defs/selector"
711
+ },
712
+ "minItems": 2
713
+ }
714
+ },
715
+ "required": [
716
+ "anyOf"
717
+ ],
718
+ "additionalProperties": false
666
719
  }
667
720
  ]
668
721
  },
@@ -732,6 +785,10 @@
732
785
  "type": "string",
733
786
  "description": "Left out: every use case with traffic."
734
787
  },
788
+ "scenario": {
789
+ "type": "string",
790
+ "description": "`scenario \"S\"`: the latency of one scenario of the use case."
791
+ },
735
792
  "maxMs": {
736
793
  "type": "number"
737
794
  },
@@ -867,6 +924,35 @@
867
924
  "type": "boolean",
868
925
  "description": "`durable` (true) or `volatile` (false)."
869
926
  },
927
+ "readRps": {
928
+ "type": "number",
929
+ "description": "`reads`: read requests per second per replica."
930
+ },
931
+ "writeRps": {
932
+ "type": "number",
933
+ "description": "`writes`: write requests per second per replica."
934
+ },
935
+ "shards": {
936
+ "type": "integer",
937
+ "minimum": 1,
938
+ "description": "Write capacity of single-primary stores scales with shards."
939
+ },
940
+ "consistency": {
941
+ "enum": [
942
+ "strong",
943
+ "eventual"
944
+ ]
945
+ },
946
+ "bandwidthMBps": {
947
+ "type": "number",
948
+ "exclusiveMinimum": 0,
949
+ "description": "`bandwidth`: megabytes per second per replica."
950
+ },
951
+ "egressUsdPerGb": {
952
+ "type": "number",
953
+ "minimum": 0,
954
+ "description": "`egress`: price of data leaving the node, in USD per GB."
955
+ },
870
956
  "loc": {
871
957
  "$ref": "#/$defs/loc"
872
958
  }
@@ -1214,6 +1300,122 @@
1214
1300
  "loc"
1215
1301
  ],
1216
1302
  "additionalProperties": false
1303
+ },
1304
+ {
1305
+ "type": "object",
1306
+ "properties": {
1307
+ "kind": {
1308
+ "const": "neverWaits"
1309
+ },
1310
+ "useCase": {
1311
+ "type": "string"
1312
+ },
1313
+ "scenario": {
1314
+ "type": "string"
1315
+ },
1316
+ "target": {
1317
+ "$ref": "#/$defs/selector"
1318
+ },
1319
+ "loc": {
1320
+ "$ref": "#/$defs/loc"
1321
+ }
1322
+ },
1323
+ "required": [
1324
+ "kind",
1325
+ "useCase",
1326
+ "target",
1327
+ "loc"
1328
+ ],
1329
+ "additionalProperties": false
1330
+ },
1331
+ {
1332
+ "type": "object",
1333
+ "properties": {
1334
+ "kind": {
1335
+ "const": "after"
1336
+ },
1337
+ "useCase": {
1338
+ "type": "string"
1339
+ },
1340
+ "scenario": {
1341
+ "type": "string"
1342
+ },
1343
+ "target": {
1344
+ "$ref": "#/$defs/selector"
1345
+ },
1346
+ "after": {
1347
+ "$ref": "#/$defs/selector"
1348
+ },
1349
+ "loc": {
1350
+ "$ref": "#/$defs/loc"
1351
+ }
1352
+ },
1353
+ "required": [
1354
+ "kind",
1355
+ "useCase",
1356
+ "target",
1357
+ "after",
1358
+ "loc"
1359
+ ],
1360
+ "additionalProperties": false
1361
+ },
1362
+ {
1363
+ "type": "object",
1364
+ "properties": {
1365
+ "kind": {
1366
+ "const": "senderCalls"
1367
+ },
1368
+ "useCase": {
1369
+ "type": "string"
1370
+ },
1371
+ "from": {
1372
+ "$ref": "#/$defs/selector"
1373
+ },
1374
+ "to": {
1375
+ "$ref": "#/$defs/selector"
1376
+ },
1377
+ "quantifier": {
1378
+ "enum": [
1379
+ "some",
1380
+ "never"
1381
+ ]
1382
+ },
1383
+ "loc": {
1384
+ "$ref": "#/$defs/loc"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "kind",
1389
+ "from",
1390
+ "to",
1391
+ "quantifier",
1392
+ "loc"
1393
+ ],
1394
+ "additionalProperties": false
1395
+ },
1396
+ {
1397
+ "type": "object",
1398
+ "properties": {
1399
+ "kind": {
1400
+ "const": "startsAt"
1401
+ },
1402
+ "useCase": {
1403
+ "type": "string"
1404
+ },
1405
+ "target": {
1406
+ "$ref": "#/$defs/selector"
1407
+ },
1408
+ "loc": {
1409
+ "$ref": "#/$defs/loc"
1410
+ }
1411
+ },
1412
+ "required": [
1413
+ "kind",
1414
+ "useCase",
1415
+ "target",
1416
+ "loc"
1417
+ ],
1418
+ "additionalProperties": false
1217
1419
  }
1218
1420
  ]
1219
1421
  }