Skip to content

Commit 1a889de

Browse files
committed
Updating README.rst .
1 parent f1ab654 commit 1a889de

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

README.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,3 +409,74 @@ Sample User Apps/Modules/Scripts
409409
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.
410410
From the perspective of each individual service, it seems that every configuration item is necessary; but from the perspective of the whole system,
411411
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

docs/SchematicDiagram.docx

9.26 KB
Binary file not shown.

docs/example-services-grouping.png

12.9 KB
Loading

0 commit comments

Comments
 (0)