Skip to content

Commit b551f77

Browse files
authored
docs: change integrations orchestration to federation (#7289)
1 parent bf2deff commit b551f77

File tree

6 files changed

+32
-23
lines changed

6 files changed

+32
-23
lines changed

docs/content/2.general/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Alokai is not just one product. **We provide an ecosystem of independent develop
2323
::list{type="success"}
2424
- Building a scalable **Design System** with accessible components to keep consistency between different user interface elements.
2525
- Building a fast and reliable **storefront** that delivers excellent User Experience to your customers.
26-
- **Integrating third-party vendors** into your API orchestration and storefront.
26+
- **Integrating third-party vendors** into your integration layer and storefront.
2727
- **Managing infrastructure, CI/CD pipelines, and deployments** to keep the application fast and reliable even under heavy loads.
2828
- **Implementing engineering and architecture best practices** ensures that the project remains flexible and maintainable even on a large scale.
2929
- **Decoupling frontend from underlying backend systems** so you don't have to reinvest into it every time you update or change some of them.

docs/content/2.general/3.basics/2.philosophy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Alokai is not just one product. **We provide an ecosystem of independent develop
1111
::list{type="success"}
1212
- Building a scalable **Design System** with accessible components to keep consistency between different user interface elements.
1313
- Building a fast and reliable **storefront** that delivers excellent User Experience to your customers.
14-
- **Integrating third-party vendors** into your API orchestration and storefront.
14+
- **Integrating third-party vendors** into your integration layer and storefront.
1515
- **Managing infrastructure, CI/CD pipelines, and deployments** to keep the application fast and reliable even under heavy loads.
1616
- **Implementing engineering and architecture best practices** ensures that the project remains flexible and maintainable even on a large scale.
1717
::

docs/content/2.general/3.basics/4.data-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Each API Client and method exposes hooks that allow you to change the initial co
4242

4343
<img alt="General Data Flow" src="/img/data-flow/middleware.svg" class="mx-auto"/>
4444

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"}
4646

4747
## Using GraphQL
4848

docs/content/3.middleware/2.guides/4.orchestration.md renamed to docs/content/3.middleware/2.guides/4.federation.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
# Data Integration and Orchestration
1+
# Data Federation
22

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.
44

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?
106

117
- **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.
1410

15-
### Implementation:
11+
## How?
1612

17-
## The `getApiClient` Method
13+
## Uisng `getApiClient` Method to access different API client
1814

1915
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.
2016

@@ -78,13 +74,13 @@ export const integrations = {
7874

7975
4. Return Unified Response: Send a consolidated response back to the frontend.
8076

81-
### Using orchestration methods in the frontend
77+
### Using federation methods in the frontend
8278

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).
8480

8581
## Real-World Examples
8682

87-
The examples provided demonstrate practical uses of data orchestration:
83+
The examples provided demonstrate practical uses of data federation:
8884

8985
### Example 1: Fetching Custom Product Properties from Legacy Systems
9086

@@ -99,7 +95,7 @@ export const integrations = {
9995
extensions: (extensions) => [
10096
...extensions,
10197
{
102-
name: "orchestration-extension",
98+
name: "federation-extension",
10399
extendApiMethods: {
104100
enrichedSearch: async (context, params: { productId: string }) => {
105101
const sapccApi = context.api;
@@ -149,11 +145,18 @@ import {
149145

150146
:::tip Type of endpoints
151147

152-
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.
153149

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:
151+
152+
```typescript
153+
import { SapccIntegrationContext } from "@vsf-enterprise/sapcc-api";
154+
155+
SapccIntegrationContext.api // the endpoints type
156+
SapccIntegrationContext.config // the configuration object type
157+
SapccIntegrationContext.client // the HTTP client object type
158+
159+
```
157160

158161
This applies to all integrations.
159162
:::

docs/content/guides/4.customization-next-js/6.method-overriding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ navigation:
77

88
# Overriding API methods / Getting product reviews from an external source
99

10-
Alokai Middleware is called an orchestration layer - it's responsible for combining data from different sources and
10+
Alokai Middleware is called an integration layer - it's responsible for combining data from different sources and
1111
presenting it to the front end in a simple form. In this chapter, we will tackle a common business case - fetching reviews
1212
from an external system. It is a common scenario that product reviews are managed by a dedicated service rather than the
1313
eCommerce platform.

docs/nuxt.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
33
extends: ["sf-docs-base"],
4+
routeRules: {
5+
"/middleware/guides/orchestration": {
6+
redirect: "/middleware/guides/federation",
7+
},
8+
},
49
});
10+

0 commit comments

Comments
 (0)