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: docs/content/2.general/3.basics/4.data-flow.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Each API Client and method exposes hooks that allow you to change the initial co
42
42
43
43
<imgalt="General Data Flow"src="/img/data-flow/middleware.svg"class="mx-auto"/>
44
44
45
-
:card{to="/middleware"title="Middleware"description="Middleware is an integration and orchestration layer of Alokai stack. It connects different third-party vendors and exposes one API to the Storefront (or other touchpoints) to increase performance and scalability of your application."icon="fa6-solid:layer-group"}
45
+
:card{to="/middleware"title="Middleware"description="Middleware is an integration layer of Alokai stack. It connects different third-party vendors and exposes one API to the Storefront (or other touchpoints) to increase performance and scalability of your application."icon="fa6-solid:layer-group"}
Copy file name to clipboardExpand all lines: docs/content/3.middleware/2.guides/4.federation.md
+22-19Lines changed: 22 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,16 @@
1
-
# Data Integration and Orchestration
1
+
# Data Federation
2
2
3
-
Optimizing server requests through data integration and orchestration is essential for frontend performance. This guide introduces the orchestration feature, highlighting its role in integrating extensions and streamlining frontend code.
3
+
Optimizing server requests through data federation is a common technique used within composable architectures that improves performance and reduces coupling between frotnend and backend API's. This guide shows how to use the `getApiClient` method to retrieve and interact with integrations within the context of another integration to mix them together in one request.
4
4
5
-
## Enhancing Frontend Performance through Data Orchestration
6
-
7
-
Data orchestration allows for consolidating multiple server requests into a single endpoint, which significantly eases the burden on the frontend. This is particularly beneficial in scenarios involving numerous simultaneous server requests.
8
-
9
-
### Advantages:
5
+
## Why?
10
6
11
7
-**Minimized Network Traffic**: Fewer server calls lead to reduced latency and enhanced responsiveness.
12
-
-**Simplified Frontend Architecture**: By grouping related server requests, the frontend logic becomes less complex.
13
-
-**Uniform Data Collection**: Ensures that data fetched from different sources is consistent and provided in a standard format.
8
+
-**Simplified Frontend Architecture**: By grouping related server requests, the frontend logic becomes less complex and less coupled.
9
+
-**Data Unification**: You can retrieve data from multiple sources and unify it in one response under common data model unrelated to the details of underlying API's.
14
10
15
-
### Implementation:
11
+
##How?
16
12
17
-
## The`getApiClient` Method
13
+
## Uisng`getApiClient` Method to access different API client
18
14
19
15
If you want to retrieve a loaded integration within the context of another, you can use the `getApiClient` method. This method serves as a bridge between various integrations, ensuring seamless data flow and interaction.
20
16
@@ -78,13 +74,13 @@ export const integrations = {
78
74
79
75
4. Return Unified Response: Send a consolidated response back to the frontend.
80
76
81
-
### Using orchestration methods in the frontend
77
+
### Using federation methods in the frontend
82
78
83
-
To call the orchestration endpoint, you can follow the [Using extension methods in the frontend guide](/middleware/guides/extensions#using-extension-methods-in-the-frontend).
79
+
To call the federation endpoint, you can follow the [Using extension methods in the frontend guide](/middleware/guides/extensions#using-extension-methods-in-the-frontend).
84
80
85
81
## Real-World Examples
86
82
87
-
The examples provided demonstrate practical uses of data orchestration:
83
+
The examples provided demonstrate practical uses of data federation:
88
84
89
85
### Example 1: Fetching Custom Product Properties from Legacy Systems
Sometimes, the `Endpoints` type is not exported by the integration. If that's the case, you can import the `XyzIntegrationContext` type from the integration package. For example, the `sapcc` integration exports the `SapccIntegrationContext` type, which contains the following:
148
+
Sometimes, the `Endpoints` type is not exported by the integration. If that's the case, you can import the `{xyz}IntegrationContext` type from the integration package.
153
149
154
-
-`SapccIntegrationContext['api']` - the endpoints type
155
-
-`SapccIntegrationContext['config']` - the configuration object type
156
-
-`SapccIntegrationContext['client']` - the HTTP client object type
150
+
For example, the `sapcc` integration exports the `SapccIntegrationContext` type, which contains the following:
0 commit comments