-
Notifications
You must be signed in to change notification settings - Fork 23
Add a section explaining server configurations #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d588482
48f2d62
3492011
64845a5
b44e6a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| .. _user_guide_server_types: | ||
|
|
||
| =========================== | ||
| Client-server communication | ||
| =========================== | ||
|
|
||
| DPF is based on a client-server architecture. | ||
|
|
||
| The DPF Server acts as a server, while the different client APIs (CPython, IronPython, C++...) | ||
| act as clients connecting to it. | ||
| PyDPF is for example a term encompassing both the CPython client | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PyDPF is a term encompassing both.... |
||
| (the Python packages such as ansys-dpf-core or ansys-dpf-post, available on PyPI) | ||
| and the IronPython client (available within Ansys Mechanical). | ||
|
|
||
| The communication logic with a DPF server is defined when starting it using | ||
| an instance of the :class:`ServerConfig <ansys.dpf.core.server_factory>` class. | ||
| Different predefined server configurations are available in DPF, | ||
| each answering a different use-case | ||
| (See the :class:`AvailableServerConfigs <ansys.dpf.core.server_factory>` class). | ||
|
|
||
| - The :class:`GrpcServer <ansys.dpf.core.server_types>` configuration is available starting with server version 4.0 (Ansys 2022R2). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2022 R2 |
||
| It allows for remote connections to a DPF Server across a network by telling the client | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It allows you to remotely connect to a DPF server.... |
||
| to communicate with this server via the gRPC communication protocol. | ||
| Although it can be used to communicate with a DPF server running on the same local machine, | ||
| in that case the next configuration should be preferred. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the next configuration is better for this option. |
||
| - The :class:`InProcess <ansys.dpf.core.server_types>` configuration is available starting with server version 4.0 (Ansys 2022R2). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2022 R2 |
||
| It indicates to the client that a DPF server is installed on the local machine, enabling direct calls | ||
| to the server binaries from within the client's own Python process. | ||
| This removes the need to copy and send data between the client and server, and makes calls | ||
| to the server functionalities much faster as well as using less memory. | ||
| - The :class:`LegacyGrpcServer <ansys.dpf.core.server_types>` configuration is the only one available for server versions below 4.0 | ||
| (Ansys 2022R1, Ansys 2021R2 and Ansys 2021R1). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2022 R1, 2021 R2, 2021 R1 |
||
| The client communicates with a local or remote DPF server via the gRPC communication protocol. | ||
|
|
||
| For DPF with Ansys 2023 R1 and newer, the default configuration is set to :class:`InProcess <ansys.dpf.core.server_types>`, | ||
| meaning that servers are launched on the local machine. | ||
| To launch a DPF server on a remote machine and communicate with it using gRPC, one should use | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using gRPC, use the.... |
||
| the :class:`GrpcServer <ansys.dpf.core.server_types>` configuration as shown in :ref:`_ref_server_types_example`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PProfizi would it be possible to have code examples on how to use the server configurations? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++, and so on)