Integration: Difference between revisions

From SMath Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
[[Calculation Service]] [[SMath Studio]] API use examples for different programming languages ​​can be found in the open SVN repository: https://smath.com/svn/public/integration.
[[Calculation Service]] [[SMath Studio]] API use examples for different programming languages ​​can be found in the open SVN repository: https://smath.com/svn/public/integration.


== [[Calculation Service]] lifecycle ==
== [[Calculation Service]] Lifecycle ==
Using the provided API, working with [[Calculation Service]] is performed as follows:
Using the provided API, working with [[Calculation Service]] is performed as follows:
# Starting [[Calculation Service]] specifying the port to use.
# Starting [[Calculation Service]] specifying the port to use.

Revision as of 18:48, 18 August 2024

SMath Studio Enterprise, when properly licensed, supports integration with other applications via a Calculation Service. Calculation Service is a process that can be started by the calling application to immediately perform calculations. Running multiple Calculation Services simultaneously supported.

It is important to understand that Calculation Service is not registered in the operating system as a service, and its life cycle completely depends on the calling application. To ensure maximum ease of interaction with Calculation Service for third-party developers, along with SMath Studio Enterprise a convenient API is supplied in the form of a file in the program installation directory:

 SMath.UI.Service.Api.dll

When running on Windows, the Calculation Service API library is registered to interact with COM on SMath Studio installation, which makes it possible to implement integration with SMath Studio to almost any external application.

Calculation Service SMath Studio API use examples for different programming languages ​​can be found in the open SVN repository: https://smath.com/svn/public/integration.

Calculation Service Lifecycle

Using the provided API, working with Calculation Service is performed as follows:

  1. Starting Calculation Service specifying the port to use.
    When the process starts, the application components are loaded. It may take a few seconds, depending on your hardware and installed add-ons amount in SMath Studio Plugins.
  2. Requests to calculate .sm file(s) indicating initial data and returning calculation results.
    Calculation occurs as quickly as possible, because application components are already loaded in memory and ready to make requests.
  3. Terminating the Calculation Service process.
    After Calculation Service process is completed, its process is unloaded from memory and no longer available for any external applications interaction.