You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -409,3 +409,74 @@ Sample User Apps/Modules/Scripts
409
409
The new configuration files/tables and the new setup and deployment brought by the new services keep increasing the maintenance complexity of the entire system.
410
410
From the perspective of each individual service, it seems that every configuration item is necessary; but from the perspective of the whole system,
411
411
too many configuration items are repeated in different service nodes. The more redundant configuration, the more messy.
412
+
413
+
This sample user app offers a different new option that dynamically integrates a group of RESTful services as a **virtual service** through a descriptive JSON.
414
+
415
+
The following example integrates 6 REST services into a virtual service:
416
+
417
+
.. code-block:: JSON
418
+
419
+
{
420
+
"rest": {
421
+
"[+++]": [
422
+
{
423
+
"(://)": "http://service1",
424
+
"(...)": {"svc1-arg1": "arg1 of service1 payload ..." }
425
+
},
426
+
{
427
+
"(://)": "http://service2",
428
+
"(.|.)": {"svc2-arg1": "arg1 of service2 payload ..." }
429
+
},
430
+
{
431
+
"[###]": [
432
+
{
433
+
"(://)": "http://service3",
434
+
"(...)": {"svc3-arg1": "arg1 of service3 payload ..." }
435
+
},
436
+
{
437
+
"(://)": "http://service4",
438
+
"(...)": {"svc4-arg1": "arg1 of service4 payload ..." }
439
+
},
440
+
{
441
+
"(://)": "http://service5",
442
+
"(...)": {"svc5-arg1": "arg1 of service5 payload ..." }
443
+
}
444
+
]
445
+
},
446
+
{
447
+
"(://)": "http://service6",
448
+
"(...)": {"svc6-arg1": "arg1 of service6 payload ..." }
449
+
}
450
+
]
451
+
}
452
+
}
453
+
454
+
And the corresponding schematic diagram for above example:
455
+
456
+
.. image:: docs/example-services-grouping.png
457
+
458
+
|
459
+
460
+
- **Syntax**:
461
+
462
+
#. Single Service (Leaf Service)
463
+
464
+
.. code-block:: JSON
465
+
466
+
{
467
+
"(://)": "http://service1",
468
+
"(...)": {"svc1-arg1": "arg1 of service1 payload ..." }
469
+
}
470
+
471
+
Or
472
+
473
+
.. code-block:: JSON
474
+
475
+
{
476
+
"(://)": "http://service2",
477
+
"(.|.)": {"svc2-arg1": "arg1 of service2 payload ..." }
478
+
}
479
+
480
+
+ "``(://)``": URL of the service call
481
+
+ "``(...)``": a dictionary of arguments (payload) to the service call
482
+
+ "``(.|.)``": merge the results of the previous service as pipeline arguments into the current arguments
0 commit comments