Skip to main content

Architectural Patterns

Conscia's DX Engine can be used in a variety of ways within the Organization's tech stack. This will depend on the existing technology infrastructure and architectural patterns in place. Here, we will discuss the most common patterns we have seen.

Using the DX Engine as the Real-time API Gateway

The DX Engine's most prominent feature is its robust capability for real-time API orchestration, making it an ideal solution for complex applications requiring the coordination of data and content from multiple backend systems. When the orchestration process depends on the real-time context of the customer, which cannot be predicted in advance, it becomes necessary to employ real-time calls to the DX Engine.

Nonetheless, the DX Engine provides you with granular control over the specific components of your experience that require its use. You can leverage the DX Engine for any number of components on your page or screen, ranging from a single element to an entire page or screen.

To utilize the DX Engine effectively for real-time API orchestration, consider the following steps:

  • Identify the components or pages in your application that require real-time context-based data and content orchestration across multiple backend systems.
  • Configure the DX Engine to handle the API orchestration for these identified components or pages, taking into account the various real-time contextual factors associated with the customer.
  • Implement real-time calls to the DX Engine API within your frontend implementation, specifying the components or pages that require context-based data and content orchestration.
  • Integrate the received data and content from the DX Engine into your frontend, rendering the orchestrated content based on the real-time context of the customer.
  • Optimize the overall application performance by selectively employing the DX Engine for the components or pages that necessitate real-time context-based API orchestration.

By strategically utilizing the DX Engine's real-time API orchestration capabilities, you can efficiently coordinate data and content from multiple backend systems in a context-sensitive manner. This approach enables you to maintain high-performance frontend experiences while harnessing the power of the DX Engine for targeted components or pages that require real-time contextual information.

Use DX Engine Caching to optimize performance

Using DX Engine level caching can significantly improve the performance of your application by reducing the need for real-time calls to backend systems and processing overhead. Here are some strategies to leverage DX Engine level caching effectively:

Component Caching: Every component in the DX Engine has the option to cache its output for a configurable amount of time. By caching the responses of frequently accessed components, you can reduce the number of real-time calls made to backend systems, improving performance and reducing latency.

Cache Key Configuration: The DX Engine allows you to configure cache keys for each component. By using specific cache keys, you can store and retrieve cached data more effectively, ensuring that the cache is used optimally and only when the data is still valid.

Time-to-Live (TTL) Configuration: You can configure the Time-to-Live (TTL) setting for each cached component response. By setting appropriate TTL values based on the nature of the data and the frequency of updates, you can ensure that the cache remains up-to-date while still providing performance benefits.

Context-Based Caching: The DX Engine allows you to cache component responses based on the real-time context of the query. By using context-based caching, you can store and retrieve personalized data for specific user segments or other contextual parameters, improving the overall user experience.

Dependency Graph Optimization: The DX Engine creates a dependency graph for the components based on the configured logic. By optimizing the calling sequence of components and leveraging caching for independent components, you can further improve the performance of your application.

By implementing these DX Engine level caching strategies, you can significantly enhance the performance of your application, providing a faster and more seamless user experience.

Static generation of pages or content fragments within a JAMstack architecture

In cases where you have implemented a JAMstack architecture for your application to eliminate dependencies on backend systems and enhance frontend performance, the DX Engine can be seamlessly integrated into your static site generation process. This enables you to generate dynamic content fragments or full pages based on context-specific factors such as customer segments, location, and device type, while adhering to JAMstack principles.

To incorporate the DX Engine within your JAMstack architecture for generating content fragments or full pages, follow these steps:

  • Identify the components or pages within your application that require personalization or contextual tailoring based on factors like customer segment, location, device type, etc.
  • Configure the DX Engine to generate dynamic content payloads for the identified components or pages, taking into account the various contextual factors and business rules established by your business teams.
  • During the static site generation process, include calls to the DX Engine API to fetch the context-based dynamic content fragments or full pages.
  • Integrate the dynamic content fragments or full pages into your pre-built application, ensuring that personalized or context-specific content is readily available without the need for on-the-fly generation.
  • Deploy the pre-built application with integrated dynamic content fragments or full pages to your chosen CDN, adhering to the JAMstack principles of decoupling the frontend from the backend and pre-rendering content.

By integrating the DX Engine into your JAMstack architecture for content fragment or full page generation, you can maintain high-performance frontend experiences while benefiting from the dynamic content generation capabilities offered by the DX Engine. This approach allows you to adhere to JAMstack principles and efficiently serve personalized or contextually tailored content fragments or full pages to your users without compromising on performance.

Calling the DX Engine for only some of the experience fragments within your frontend

In scenarios where your frontend implementation is designed to make direct calls to backend APIs, such as a Headless CMS or Commerce Engine, and you have a multitude of experiences dependent on these APIs, it is advisable to adopt an incremental approach to incorporate an orchestration layer into your technology stack.

For instance, a significant portion of your website's pages may contain one or two components that require dynamic content sourcing based on the real-time context of the customer. In such cases, it is prudent to leverage the DX Engine solely for providing context-based, dynamic content payloads specific to those components.

The DX Engine facilitates this selective incorporation by enabling you to request only the components of interest within the Experience API query. This can be achieved through the following steps:

Identify the components on your website that require dynamic, context-based content.

  • Configure the DX Engine to generate content payloads tailored to these specific components, taking into account the real-time context of the customer.
  • Modify your frontend implementation to query the Experience API for the identified components, while maintaining direct calls to backend APIs for other static components.
  • Integrate the received dynamic content payloads into your frontend, rendering the context-based content for the selected components.

By employing this incremental approach, you can seamlessly introduce an orchestration layer into your existing technology stack without disrupting the overall functionality. This method allows you to harness the capabilities of the DX Engine for targeted components, while maintaining the existing direct API calls for other parts of your frontend implementation. As a result, you can optimize the performance and responsiveness of your website's dynamic components without incurring undue complexity or risk.

Pre-generating the DX Engine payloads and push to an operational datastore

The DX Engine can be conceptualized as a sophisticated Rules Engine designed to execute user-defined business rules. These business rules are activated depending on the specific Context passed to the engine during runtime. Conscia provides an integrated utility that facilitates the generation of a comprehensive set of payloads corresponding to various Context combinations relevant to a given application.

In more technical terms, the DX Engine operates as follows:

  • Business users configure a series of business rules, which are essentially logic constructs that dictate the behavior of an application in response to varying input conditions (Contexts).
  • The engine receives a Context as input, which is a structured data object encapsulating the current state of the application and any relevant external factors.
  • The DX Engine evaluates the business rules against the provided Context, determining which rules are applicable and should be executed.
  • Upon execution of the applicable rules, the engine generates a corresponding output, often in the form of an updated Context or application state.

To streamline the deployment and management of payloads, Conscia's out-of-the-box utility performs the following functions:

  • Analyzes the application-specific Contexts and generates an exhaustive set of payload combinations, accounting for all possible permutations.
  • Facilitates the export of these payload combinations to an external datastore of the user's choice, such as Elasticsearch, Redis, MongoDB, or any other compatible data storage system.
  • Ensures seamless integration with existing infrastructure, allowing users to store and manage payloads within their preferred data storage environment.
  • By leveraging the DX Engine and Conscia's integrated utility, organizations can efficiently implement and manage business rules across diverse applications, while simultaneously utilizing their existing data storage infrastructure. *

This approach enables streamlined, context-aware execution of business rules, resulting in improved application performance and enhanced adaptability to dynamic conditions.

Content Delivery Network (CDN) caching

The DX Engine's powerful capability for pre-generating payloads, based on various contextual factors, makes it an ideal solution for applications that require coordination of data and content from multiple backend systems. By pre-generating the DX Engine payloads and pushing them directly to a CDN, you can efficiently serve context-based content without the need for real-time calls or an operational datastore.

To utilize the DX Engine effectively for pre-generating payloads and integrating them with a CDN, consider the following steps:

  • Identify the components or pages in your application that require context-based data and content from multiple backend systems.
  • Configure the DX Engine to pre-generate payloads for these identified components or pages, considering the various contextual factors associated with the customer.
  • Utilize the DX Engine's integrated utility to export the pre-generated payloads and prepare them for distribution through your preferred CDN. This may involve formatting the payloads according to CDN-specific requirements or creating a suitable directory structure.
  • Push the pre-generated payloads directly to your chosen CDN, ensuring that the context-based content is readily available for distribution to end-users.
  • Integrate the pre-generated payloads from the CDN into your frontend implementation, rendering the context-based content for the identified components or pages.

By strategically utilizing the DX Engine's payload pre-generation capabilities and integrating them directly with a CDN, you can efficiently coordinate data and content from multiple backend systems in a context-sensitive manner. This approach enables you to maintain high-performance frontend experiences while harnessing the power of the DX Engine for targeted components or pages that require context-based information, without the need for real-time API calls or an operational datastore.

Server-side caching

This strategy involves storing cached data on the web server, which can help reduce the processing time for dynamic content. Common server-side caching techniques include object caching, full-page caching, and fragment caching. Leveraging server-side caching can help reduce the number of real-time calls made to the DX Engine, resulting in improved performance and reduced latency. You can cache frequently accessed components by analyzing usage patterns and identifying components or combinations that are most frequently requested by users. Caching the payloads for these components on the server-side allows for subsequent requests to be served directly from the cache without making real-time calls to the DX Engine.

Multi-Layered Caching Strategy

Combining various caching strategies described above is essential for optimizing the overall performance of your application that uses the DX Engine as the Orchestration layer. This multi-layered approach ensures that you minimize the need for real-time calls to the DX Engine and backend systems while still providing personalized and up-to-date content to your users. By implementing a multi-layered caching approach, you can efficiently reduce the number of real-time calls to backend systems, lower latency, and provide a more seamless user experience. As a result, you'll be able to offer a faster, more responsive, and seamless user experience across your application.