blace.ai
IPC (Inter Process Communication) version

Motivation

The motivation behind offering an IPC version of the library is to avoid dependency conflicts and increase stability by running all ai computations in a separate process.

Consider the following setup (non-ipc version of the library):

Your application directly links against blace_ai.dll which in turns has some dependencies on third-party libraries. They all will be resolved into the same process space. If your application already has dependencies on some of those libraries, conflicts will occur:

Solution

In order to solve this problem, we offer an ipc workflow:

With this setup your application will link against a blace_ai_ipc.dll which offers exact same classes and methods, except that it spawns a new process for graph evaluation. All input data and results are serialized and communicated between the application process and the blace.ai IPC process. Note that you don't have to write additional code, just replace the CMake command target_link_libraries(<your_target> PRIVATE 3rdparty::BlaceAI) with target_link_libraries(<your_target> PRIVATE 3rdparty::BlaceAIIPC) to use the IPC workflow.

An additional benefits of this approach is increased stability (e.g. on a gpu drivers crash the main application will be unaffected).