Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/source/user_guide/dpf_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DPF concepts
concepts.rst
waysofusing.rst
stepbystep.rst
server_types.rst


.. card-carousel:: 2
Expand Down Expand Up @@ -36,3 +37,11 @@ DPF concepts
:text-align: center

.. image:: ../images/drawings/checklist.png

.. card:: Using DPF: locally/remotely
:link: user_guide_server_types
:link-type: ref
:width: 25%
:text-align: center

.. image:: ../images/drawings/using-dpf.png
2 changes: 1 addition & 1 deletion docs/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This section has the following goals:
- Provide simple how-tos for tackling most common use cases.

Other sections of this guide include :ref:`ref_api_section`, :ref:`ref_dpf_operators_reference`,
and :ref:`sphx_glr_examples`.
and :ref:`_gallery`.

.. include::
dpf_concepts.rst
Expand Down
38 changes: 38 additions & 0 deletions docs/source/user_guide/server_types.rst
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++...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++, and so on)

act as clients connecting to it.
PyDPF is for example a term encompassing both the CPython client
Copy link
Contributor

Choose a reason for hiding this comment

The 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).
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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).
Copy link
Contributor

Choose a reason for hiding this comment

The 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).
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The 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?