Skip to content

Commit

Permalink
Reverted changes made by saving with VSCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
aregtech committed Nov 8, 2024
1 parent 5c2d96a commit c5e6f6e
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 249 deletions.
291 changes: 98 additions & 193 deletions docs/ServiceInterface.md

Large diffs are not rendered by default.

62 changes: 30 additions & 32 deletions docs/wiki/cmake-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,36 @@ The [functions.cmake](./../../conf/cmake/functions.cmake) file in AREG SDK conta

## Table of Contents

- [AREG SDK CMake Functions and Macros](#areg-sdk-cmake-functions-and-macros)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [CMake Macro Overview](#cmake-macro-overview)
- [`macro_check_fix_areg_cxx_standard`](#macro_check_fix_areg_cxx_standard)
- [`macro_normalize_path`](#macro_normalize_path)
- [`macro_add_service_interface`](#macro_add_service_interface)
- [`macro_find_package`](#macro_find_package)
- [`macro_create_option`](#macro_create_option)
- [`macro_add_source`](#macro_add_source)
- [`macro_parse_arguments`](#macro_parse_arguments)
- [`macro_declare_static_library`](#macro_declare_static_library)
- [`macro_declare_shared_library`](#macro_declare_shared_library)
- [`macro_declare_executable`](#macro_declare_executable)
- [`macro_setup_compilers_data`](#macro_setup_compilers_data)
- [`macro_setup_compilers_data_by_family`](#macro_setup_compilers_data_by_family)
- [CMake Functions Overview](#cmake-functions-overview)
- [`setAppOptions`](#setappoptions)
- [`addExecutableEx`](#addexecutableex)
- [`addExecutable`](#addexecutable)
- [`setStaticLibOptions`](#setstaticliboptions)
- [`addStaticLibEx`](#addstaticlibex)
- [`addStaticLib`](#addstaticlib)
- [`addStaticLibEx_C`](#addstaticlibex_c)
- [`addStaticLib_C`](#addstaticlib_c)
- [`setSharedLibOptions`](#setsharedliboptions)
- [`addSharedLibEx`](#addsharedlibex)
- [`addSharedLib`](#addsharedlib)
- [`addServiceInterfaceEx`](#addserviceinterfaceex)
- [`addServiceInterface`](#addserviceinterface)
- [`removeEmptyDirs`](#removeemptydirs)
- [`printAregConfigStatus`](#printaregconfigstatus)
- [Introduction](#introduction)
- [CMake Macro Overview](#cmake-macro-overview)
- [`macro_check_fix_areg_cxx_standard`](#macro_check_fix_areg_cxx_standard)
- [`macro_normalize_path`](#macro_normalize_path)
- [`macro_add_service_interface`](#macro_add_service_interface)
- [`macro_find_package`](#macro_find_package)
- [`macro_create_option`](#macro_create_option)
- [`macro_add_source`](#macro_add_source)
- [`macro_parse_arguments`](#macro_parse_arguments)
- [`macro_declare_static_library`](#macro_declare_static_library)
- [`macro_declare_shared_library`](#macro_declare_shared_library)
- [`macro_declare_executable`](#macro_declare_executable)
- [`macro_setup_compilers_data`](#macro_setup_compilers_data)
- [`macro_setup_compilers_data_by_family`](#macro_setup_compilers_data_by_family)
- [CMake Functions Overview](#cmake-functions-overview)
- [`setAppOptions`](#setappoptions)
- [`addExecutableEx`](#addexecutableex)
- [`addExecutable`](#addexecutable)
- [`setStaticLibOptions`](#setstaticliboptions)
- [`addStaticLibEx`](#addstaticlibex)
- [`addStaticLib`](#addstaticlib)
- [`addStaticLibEx_C`](#addstaticlibex_c)
- [`addStaticLib_C`](#addstaticlib_c)
- [`setSharedLibOptions`](#setsharedliboptions)
- [`addSharedLibEx`](#addsharedlibex)
- [`addSharedLib`](#addsharedlib)
- [`addServiceInterfaceEx`](#addserviceinterfaceex)
- [`addServiceInterface`](#addserviceinterface)
- [`removeEmptyDirs`](#removeemptydirs)
- [`printAregConfigStatus`](#printaregconfigstatus)

---

Expand Down
2 changes: 1 addition & 1 deletion examples/10_locsvc/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 10_locsvc Project Overview

The **10_locsvc** project demonstrates creating and managing a **Local Service** within the AREG Framework, using the Service Interface document and AREG SDKs code generator. This example shows how to build a service provider and consumer that communicate asynchronously within a single, multithreaded process, without external visibility.
The **10_locsvc** project demonstrates creating and managing a **Local Service** within the AREG Framework, using the Service Interface document and AREG SDKs code generator. This example shows how to build a service provider and consumer that communicate asynchronously within a single, multithreaded process, without external visibility.

The **Local Service** interface is defined in the [HelloWorld.siml](./services/HelloWorld.siml) file, and the corresponding source code is automatically generated during the build process via `codegen.jar`.

Expand Down
8 changes: 5 additions & 3 deletions examples/12_pubsvc/12_generated.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<Extensions>bat;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="services\HelloWorld.siml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(AregGenerateDir)examples\12_pubsvc\services\private\HelloWorldClientBase.cpp">
<Filter>Source Files</Filter>
Expand Down Expand Up @@ -51,4 +48,9 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="services\HelloWorld.siml">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions examples/12_pubsvc/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The **12_pubsvc** project demonstrates the implementation of a *Public Service*
- An application acting as a network-discoverable *Public Service* provider. It listens for remote requests from consumers and processes them. Multiple *Service Consumers* can connect to the provider simultaneously, sending requests to be handled.

3. **[12_pubclient](./pubclient/)**:
- An application that acts as a *Public Service* consumer. The client application automatically discovers the *Public Service* provider using AREG Frameworkss built-in service discovery. It periodically sends remote request calls using a timer, simulating real-world use cases where a service might need regular interactions with the provider.
- An application that acts as a *Public Service* consumer. The client application automatically discovers the *Public Service* provider using AREG Frameworkss built-in service discovery. It periodically sends remote request calls using a timer, simulating real-world use cases where a service might need regular interactions with the provider.

## Communication

Expand All @@ -31,7 +31,7 @@ The **12_pubsvc** project demonstrates the implementation of a *Public Service*

- **Automatic Service Discovery**: AREG Framework automates the discovery of the *Public Service*, so *Service Consumers* can easily connect to the provider without needing explicit configuration. This ensures smooth communication even when the processes are started in any order.

- **Fault Tolerance**: The AREG SDK ensures fault tolerance in service communication, meaning if a service fails, it can recover or restart without affecting the overall systems operation.
- **Fault Tolerance**: The AREG SDK ensures fault tolerance in service communication, meaning if a service fails, it can recover or restart without affecting the overall systems operation.

- **Efficient Communication**: By using **Object RPC** for communication, the system reduces overhead and simplifies the development process. It ensures that requests and responses between the provider and consumers are dispatched efficiently.

Expand Down
2 changes: 1 addition & 1 deletion examples/13_pubmesh/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 13_pubmesh Project Overview

The **13_pubmesh** project demonstrates the AREG Frameworks capability to manage a **meshed network** of **distributed services**, integrating both **Public** and **Local Services**. The project showcases how the framework efficiently connects **Service Providers** and **Service Consumers** to handle **inter-process communication (IPC)** using *Object Remote Procedure Call (Object RPC)*, enabling scalable and reliable communication across the network.
The **13_pubmesh** project demonstrates the AREG Frameworks capability to manage a **meshed network** of **distributed services**, integrating both **Public** and **Local Services**. The project showcases how the framework efficiently connects **Service Providers** and **Service Consumers** to handle **inter-process communication (IPC)** using *Object Remote Procedure Call (Object RPC)*, enabling scalable and reliable communication across the network.

> [!IMPORTANT]
> To test this example, ensure an `mcrouter` process is running on a network-accessible machine to enable message routing. Verify that the `areg.init` configuration file includes the correct IP address and port number for the `mcrouter`.
Expand Down
6 changes: 3 additions & 3 deletions examples/14_pubtraffic/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The **14_pubtraffic** project demonstrates how to dynamically create and manage

## Communication

Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.
Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.

## Key Features

Expand All @@ -36,8 +36,8 @@ Communication between the service provider and consumers is facilitated by **mcr

- **Dynamic Runtime Model Creation**: This project is ideal for applications that require models or objects to be created dynamically during runtime, offering flexibility in service configuration and operation.
- **Real-time Inter-Process Communication (IPC)**: Suitable for systems where real-time communication between distributed services is essential, leveraging **Object RPC** and **IPC** to ensure reliable message exchange.
- **Custom Event-Driven Systems**: Applications that rely on custom event handling can benefit from the projects approach to managing user-triggered events in a multithreaded environment.
- **Custom Event-Driven Systems**: Applications that rely on custom event handling can benefit from the projects approach to managing user-triggered events in a multithreaded environment.

## Conclusion

The **14_pubtraffic** project highlights the AREG SDKs capabilities in managing **dynamic models** and **custom events** within a **multithreaded** and **distributed system**. Through the use of **Object RPC** and **IPC**, the project demonstrates how to achieve real-time communication and event handling, making it a valuable example for developers looking to build scalable, event-driven applications.
The **14_pubtraffic** project highlights the AREG SDKs capabilities in managing **dynamic models** and **custom events** within a **multithreaded** and **distributed system**. Through the use of **Object RPC** and **IPC**, the project demonstrates how to achieve real-time communication and event handling, making it a valuable example for developers looking to build scalable, event-driven applications.
2 changes: 1 addition & 1 deletion examples/15_pubworker/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The **15_pubworker** project demonstrates the use of **Worker Threads** to perfo
- This sub-project includes a **Service Consumer** and a **Worker Thread**. The Worker Thread simulates an output device, performing tasks in the background while the service consumer interacts with the public service provider.

3. **[15_pubservice](./pubservice/)**:
- This sub-project hosts a **Public Service Provider** along with a **Worker Thread** that processes user inputs from the console and updates the services attributes. Both the service and worker thread are part of the static model, which is initialized at startup and unloaded at exit.
- This sub-project hosts a **Public Service Provider** along with a **Worker Thread** that processes user inputs from the console and updates the services attributes. Both the service and worker thread are part of the static model, which is initialized at startup and unloaded at exit.

## Communication

Expand Down
6 changes: 3 additions & 3 deletions examples/16_pubfsm/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 16_pubfsm Project Overview

The **16_pubfsm** project demonstrates how to build and manage a *Finite-State Machine* (**FSM**) using the AREG Frameworks powerful features like *Timers* and *Events*. This project showcases how FSM models can be developed to change the data and the states of Services.
The **16_pubfsm** project demonstrates how to build and manage a *Finite-State Machine* (**FSM**) using the AREG Frameworks powerful features like *Timers* and *Events*. This project showcases how FSM models can be developed to change the data and the states of Services.

> [!IMPORTANT]
> To test this example, ensure an `mcrouter` process is running on a network-accessible machine to enable message routing. Verify that the `areg.init` configuration file includes the correct IP address and port number for the `mcrouter`.
Expand Down Expand Up @@ -33,7 +33,7 @@ The **16_pubfsm** project demonstrates how to build and manage a *Finite-State M

## Communication and Service Discovery

- **mcrouter**: The communication between the *Service Provider* and *Service Consumers* is managed through `mcrouter`, AREGs router for handling RPC message routing and inter-process communication.
- **mcrouter**: The communication between the *Service Provider* and *Service Consumers* is managed through `mcrouter`, AREGs router for handling RPC message routing and inter-process communication.
- **Service Discovery and Fault Tolerance**: The AREG Framework ensures automatic service discovery and fault tolerance, meaning the order in which services start is irrelevant. This makes the system robust and reliable even in unpredictable environments.

## Use Cases
Expand All @@ -44,4 +44,4 @@ The **16_pubfsm** project demonstrates how to build and manage a *Finite-State M

## Conclusion

The **16_pubfsm** project highlights the AREG Frameworks ability to efficiently implement a *Finite-State Machine*. Whether you're developing device application or any event-driven systems, this project provides a scalable, robust solution using FSM, triggers, timers, and events. By leveraging the AREG SDK�s features like service discovery and fault tolerance, developers can focus on building highly reliable, state-based systems with ease.
The **16_pubfsm** project highlights the AREG Frameworks ability to efficiently implement a *Finite-State Machine*. Whether you're developing device application or any event-driven systems, this project provides a scalable, robust solution using FSM, triggers, timers, and events. By leveraging the AREG SDK�s features like service discovery and fault tolerance, developers can focus on building highly reliable, state-based systems with ease.
2 changes: 1 addition & 1 deletion examples/19_pubwatchdog/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The **19_pubwatchdog** project demonstrates the use of a **Watchdog** in an envi

## Communication

Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.
Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.

## Key Features

Expand Down
4 changes: 2 additions & 2 deletions examples/21_pubunblock/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ The **21_pubunblock** project demonstrates how to handle and manually unblock se

## Communication

Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.
Communication between the service provider and consumers is facilitated by **mcrouter** router, which is capable of operating across any networked machine. The AREG Framework automates **service discovery** and ensures **fault tolerance**, enabling reliable **IPC** and ensuring that the order of process startup does not affect the systems functionality. Services are automatically discovered, and messages are forwarded seamlessly to their intended recipients, maintaining robust inter-process communication.

## Key Features

- **Request Manual Unblocking**: The core feature of this project is the ability to manually unblock requests, allowing the service provider to continue processing new requests while waiting to complete ongoing ones. This prevents the system with asynchronous communication from stalling.
- **Non-Blocking Client Responses**: Normally, when a client request is processed and the developer replies with the response, the system automatically prepares the response and sends to the target Consumer. In case of manual request unblocking, the develop needs manually preparing response, then reply with the response. This response preparation mechanism ensures that the right target Consumer receives the response.
- **Fault-Tolerant Communication**: Leveraging `mcrouter` and the AREG SDKs fault-tolerant capabilities, the system can manage communication failures gracefully, ensuring that service providers and consumers can reconnect and resume operations without data loss.
- **Fault-Tolerant Communication**: Leveraging `mcrouter` and the AREG SDKs fault-tolerant capabilities, the system can manage communication failures gracefully, ensuring that service providers and consumers can reconnect and resume operations without data loss.

## Use Cases

Expand Down
Loading

0 comments on commit c5e6f6e

Please sign in to comment.