    

 ## On this page

  

 

 # Dynamic Visualization Store

 Last update: 16.07.2025 

API for high-performance post processing visualization. [More...](#details)

## <a id="groups" name="groups"></a>Modules

 [DVS URIs](group__group__dvs__uri.xhtml) Description of URIs used in DVS API.   
  [DVS Files](group__group__dvs__file.xhtml) Description of URIs used in DVS API.   
  [DVS Filtering](group__group__dvs__filtering.xhtml) Description of filters used in the DVS API.   
  [DVS Cache](group__group__dvs__cache.xhtml) DVS Cache to store post processing data.   
  [DVS Features](group__group__dvs__features.xhtml) Description of various features of the DVS API.   
  [DVS Reader](group__group__dvs__reader.xhtml) DVS Reader API to read cache data.   
  [DVS Data Model](group__group__dvs__data__model.xhtml) DVS Data Model.   
  [DVS Metadata](group__group__dvs__metadata.xhtml) Description of supported metadata for the DVS API.   
  [DVS Server](group__group__dvs__server.xhtml) DVS Server used to receive data from DVS Clients.   
 <a id="details" name="details"></a>## Detailed Description

API for high-performance post processing visualization.

# Dynamic Visualization Store API

The Dynamic Visualization Store (DVS) API is a parallel capable, high performance API for post processing data. This can be used to implement one API in a solver to send data to a post processor in parallel (in this case EnSight) while the solver is running  
High Level Features:- In-situ investigation of data from solver while solver is running.
    - Auto reconnect if post processor is shutdown and restarted during simulation.
- Scalable design allows for distrubuted parallel solver &lt;-&gt; distributed parallel post processor if needed (not required).
- Data can be cached if needed. Adding sources behind the API so no change to solver code.
- Does not need post processor to be running to cache data
- Read API to interrogate caches.
- Out of the box C/C++/Python APIs for Windows/Linux
    - Currently only C++ API for Read API available in 2022R2, Python API being developed for 2023R2

---

# Table of Contents

---

- [What's new in 2023 R1?](#Whats-new-in-2023R1)
- [What's new in 2022 R2?](#Whats-new-in-2022R2)
- [What's new in 2022 R1?](#Whats-new-in-2022R1)
- [What's new in 2021 R1?](#Whats-new-in-2021R1)
- [What's new in 2020 R2?](#Whats-new-in-2020R2)
- [Current Limitations](#Current-Limitations)
- [Download Latest Install](#Download-Latest-Install)
- [What is Available](#What-is-Available)
- [Building the Code](#Building-the-Code)
- [Available APIs](#Available-APIs)
    - [Using the C Writer API](#Using-the-C-Writer-API)
    - [Using the C++ Writer API](#Using-the-Cplusplus-Writer-API)
    - [Using the Python Writer API](#Using-the-Python-Writer-API)
    - [Using the C++ Reader API](#Using-the-Cplusplus-Reader-API)
    - [Using the .proto file](#Using-the-proto-file)
- [Starting the Dynamic Visualization Store reader with EnSight](#Starting-the-dynamic-visualization-store-reader-with-EnSight)
- [Starting a Dynamic Visualization Store server without EnSight Running](#Starting-a-dynamic-visualization-store-server-without-EnSight-running)
- [Running a simple demo](#Running-a-simple-demo)
- [Running a demo with multiple EnSight servers and test clients](#Simple-demo-with-multi-server)
- [Running a demo without EnSight running](#Simple-demo-without-EnSight-running)
- [Using secret keys](#Using-secret-keys)

---

 <a class="anchor" id="Whats-new-in-2023R1"></a>

# What's new in 2023 R1

- Static libraries
    - There are now static libraries built and located in the static/{arch} directories for Windows and Linux
- Dataset metadata API
    - New [dvs\_add\_metadata()](dynamic__visualization__store__api_8h.xhtml#ac5c67fdc3806bf89eebbe49e6daea5c2 "Add metadata for the current dataset.") (C and Python) and [DVS::IClient::add\_metadata()](class_d_v_s_1_1_i_client.xhtml#ab4144e59bfdcf9c095c6510c4298d160 "Add metadata for the current dataset.") (C++) API added to allow the setting of key/value pairs on the dataset object
- EnSight DVS Reader Element Filtering
    - See [EnSight DVS Element Filtering](group__group__dvs__metadata.xhtml#dvs_element_filtering)
- Manual server control
    - Some users had a need for more explicit server control so they could handle shutdown more cleanly and better handle threading for their applications. Previously there was one call to [DVS::IServer::startup()](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c "Start the server.") which would start a server in a thread and run it until [DVS::IServer::shutdown()](class_d_v_s_1_1_i_server.xhtml#a7ce6bb49a2d383b0821267415a93802d "Shutdown the server, also called on server destruction by DVS::DESTROY_SERVER_INSTANCE()") was invoked. Now there are new methods exposed [DVS::IServer::startup\_unthreaded()](class_d_v_s_1_1_i_server.xhtml#ac61ce2698eec1adb521bbbf60cb78756 "Startup a server manually without threads."), [DVS::IServer::update()](class_d_v_s_1_1_i_server.xhtml#add6fcb530763dc217f5b3c17b25093c0 "Perform a server update."), and [DVS::IServer::terminating()](class_d_v_s_1_1_i_server.xhtml#a6cb1f69ad4b9213dde48d4cd5b3f2111 "Call to begin terminating the server.") to allow for more manual control. For an example of the usage of these methods please see [test\_dvs\_server.cpp](test__dvs__server_8cpp.xhtml "Test server to provide example of create a simple server application.").
- Merged Reader API and Client API libraries into one library named libdvsapi
    - The old libraries for libdvsclient and libdvsreader are now removed
- Merge Utility
    - The dvs\_utility app now can merge a dataset from one cache into another. The main use for this is to merge data from a restart run into the original dataset. Because of this it right now finds the earliest timestep in the dataset it is merging from and removes all timesteps &gt;= to it from the dataset it is merging to. This is available via dvs\_utility.exe -merge {from Cache URI} {to Cache URI}.
- Delete Item API change
    - Delete item calls now take an update number similar to the begin\_update calls. This is to have delete item calls act more like a timestep update so they are asynchronous and happen in lock step with completed timesteps. The update number should be in the same "update timeline" as the begin\_update calls (eg begin\_update (update 0), begin\_update (update 1), delete\_item (update 2), begin\_update (update 3))
    - See [dvs\_delete\_item()](dynamic__visualization__store__api_8h.xhtml#a5237ada583b0cb7817d12d1135f9349e "Delete an item."), [DVS::IClient::delete\_item()](class_d_v_s_1_1_i_client.xhtml#a5e8f192f5c683a8265dd94020506a0aa "Delete an item.")
- Ability to modify existing timesteps
    - It is now possible to modify existing timesteps in a DVS cache. Previously this was only available when running in situ. To do this a begin\_update call is made (with a monotonically increasing update number) and a time value that matches a previously sent time. When the update has completed across all ranks it will be merged into the current timestep. It is important to note that the update is merged in and does not overwrite the previously sent data. So only changes are needed to be sent. So if a part mesh has been completely removed an empty update\_nodes call must be made. Changes to the coordinates will automatically remove all nodal/element variables for that part. Changes to the connectivity will automatically remove all elemental variables for that part.
- Reader API fully released
    - The Reader API (See [DVS Reader](group__group__dvs__reader.xhtml)) has gone through much more extensive usage and testing.
- UTF8 Support Fixed
    - The DVS library was improperly handling UTF8 strings. The initial intent was that all strings sent to DVS were UTF8. However with a lack of testing in that area that did not work correctly. As of version 1.2 UTF8 support should be working.

---

 <a class="anchor" id="Whats-new-in-2022R2"></a>

# What's new in 2022 R2

- DVS Reader API
    - There is now a full external C++ Reader API available (See [DVS Reader](group__group__dvs__reader.xhtml))
- New logger example
    - Added a LoggerVerbose class in [logger\_verbose.h](logger__verbose_8h.xhtml "Verbosity based logger for DVS.") as an example of logging based on verbosity instead of flags. The flag method wasn't really working well so we will be moving to using verbosity on the client and server in future versions to make logging more consistent.
- Logging
    - Added a lot more logging into the server to diagnose potential problems with a DVS Server. Set the server option "VERBOSE" to 0-3 (0 being none or 3 being max).
- Notable Bug fixes
    - Server logging verbosity was broken in 2022 R1, this has been fixed so setting server verbosity should start outputting more information.

---

 <a class="anchor" id="Whats-new-in-2022R1"></a>

# What's new in 2022 R1

- Versioning
    - There is now a [dynamic\_visualization\_store\_version.h](dynamic__visualization__store__version_8h.xhtml "C API for using Dynamic Visualization Store.") file which has a DVS\_CURRENT\_API\_VERSION defined in it. It follows the normal semantic versioning convention of X.Y.Z where any changes to Z are deemed compatible with the previous version but a change in X or Y is not.
    - This same versioning is built into the gRPC API as well and an error of DVS\_VERSION\_MISMATCH or DVS\_VERSION\_UNKNOWN will be returned if there is an issue.
    - To find the version the library was built with a user can call [dvs\_get\_version()](dynamic__visualization__store__api_8h.xhtml#a28251ae7be1ab3bb5c527f03b009615b "Get the current version of the built library.") or [DVS::IClient::get\_version()](class_d_v_s_1_1_i_client.xhtml#ac65e50e425b440f4b84dd1decc3478c9 "Get the version of the client API."). The python version is available via the "version" attribute on the module.
- Code Restructuring
    - A lot of code refactoring is ongoing to support the DVS Reader API, the code is beginning to be split into include and src directories. This work will be finished next release so that all headers needed to be included for use of the libraries will be within the include directory.
- DVS Reader API
    - An alpha version of the DVS Reader API has been implemented. This can be access via the [include/dvs\_query\_interface.h](dvs__query__interface_8h.xhtml "DVS Reader API Query Interface.") header file. Example usage of the API can be seen in the [test\_dvs\_reader.cpp](test__dvs__reader_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store Reader API."). Full documentation will be added when the API is complete in 2022R2. Currently you can only open a dataset and read all of the part/plot/variable definitions and some basic information. Actual access to data will be exposed in the full release.
- Deletion Item API
    - A user can now call the delete item API to remove a single or collection of timesteps from the dataset after initialization. See [Delete Item API Overview](group__group__dvs__features.xhtml#dvs_delete_item_api) for more information.
- DVS File Location Server Options
    - A user can now specify a different location for the .dvs files to be created for datasets that is separate from the cache location. See [Server Options](group__group__dvs__server.xhtml#dvs_server_options) for more information.

---

<a class="anchor" id="Whats-new-in-2021R1"></a># What's new in 2021 R1

- Structured Meshes
    - New APIs for parallelepiped and curvilinear structured meshes, see [dvs\_update\_nodes\_parallelepiped()](dynamic__visualization__store__api_8h.xhtml#a0d0312c5143eb8de2e08a903c929d8c3 "Update the nodes for a parallelepiped structured part."), [dvs\_update\_nodes\_curvilinear()](dynamic__visualization__store__api_8h.xhtml#af69daaa5a2ac63f7ce31a2e8e3d66332 "Update the nodes for a curvilinear structured part."), [DVS::IClient::update\_nodes\_structured()](class_d_v_s_1_1_i_client.xhtml#a1588c437020e0ba5702ec48460a792a9 "Update the nodes for a parallelepiped structured part.") for more information. See [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API.") and [test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API.") for example usage.
        - Sending iblanking information is done through calls to [dvs\_update\_var\_node\_scalar()](dynamic__visualization__store__api_8h.xhtml#aea17a7bbdc6ac8c2cdd4e6c35c1a8578 "Update a field of scalars on nodes."), [DVS::IClient::update\_var\_node()](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3 "Update nodal variable values.") using [DVS\_STRUCTURED\_IBLANKED\_NODES](dynamic__visualization__store__enums_8h.xhtml#aa405c87964a066405de5426a3089702b) (see [dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml "Contains enums used in C/C++ API.")) as the variable id. Variable type for C++ API is [SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68 "Scalar."). See [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API.") for examples.
            - Valid iblanking values are [DVS\_IBLANK\_EXTERIOR](dynamic__visualization__store__enums_8h.xhtml#a0e0ee6900f90f933e57cae688b6d9af3), [DVS\_IBLANK\_INTERIOR](dynamic__visualization__store__enums_8h.xhtml#ac8f987404e3eba989ee90e4a1ffb955b), [DVS\_IBLANK\_BOUNDARY](dynamic__visualization__store__enums_8h.xhtml#a72b07503916fc120112f00b07a2a5ed1), [DVS\_IBLANK\_INTERNAL\_BOUNDARY](dynamic__visualization__store__enums_8h.xhtml#aacf7a4e385cf72ee26356af937b3c609), [DVS\_IBLANK\_SYMMETRY](dynamic__visualization__store__enums_8h.xhtml#abab4ad5aaffe16664aaacb0850994cf7)
        - Sending ghost element information is done through calls to [dvs\_update\_var\_element\_scalar()](dynamic__visualization__store__api_8h.xhtml#aae3c0a5237c193d05266fba6e6798a4c "Update a field of scalars on elements."), [DVS::IClient::update\_var\_element()](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f "Update elemental scalar variable values.") using [DVS\_STRUCTURED\_GHOST\_ELEMENTS](dynamic__visualization__store__enums_8h.xhtml#a5f85a0e808c3bad9b9b616e62f5724c0) (see [dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml "Contains enums used in C/C++ API.")) as the variable id. Variable type for C++ API is [SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68 "Scalar."). See [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API.") for examples.
- Dynamically add new part/variable/plot definitions between updates (doesn't remove definitions since they may be used by previously sent timesteps)
    - After any update has finished you may call the [dvs\_begin\_init()](dynamic__visualization__store__api_8h.xhtml#a3744408f15cd4a36d19880d24d442a0d "begin setup of rank") / [dvs\_end\_init()](dynamic__visualization__store__api_8h.xhtml#ac4d82529053c964b76bd42916c51835e "end the initialization of the rank") or [DVS::IClient::begin\_init()](class_d_v_s_1_1_i_client.xhtml#aff782ecd341fddd87a22a15107efeb3b "Begins initialization for this rank.") / [DVS::IClient::end\_init()](class_d_v_s_1_1_i_client.xhtml#aaf1641a1afbf8bb6257940be28dd94b2 "Finish initialization for this rank.") sequence to add new parts/variables/plots.
    - **Note:** This does not allow you to change the dataset name or the unit system.
- Overwrite in-situ timesteps
    - You may now send a new update for a previously sent timestep to completely overwrite which data is there. If EnSight is currently reading the data may require a reload\_data python call to view the newly received timestep information (please contact Veronica team on how to do this).
    - **Note:** Trying to overwrite a previously sent timestep while saving data to a cache will return an error. This is not yet allowed.
- Added Client API to retrieve already sent definitions, see [dvs\_get\_num\_part\_info()](dynamic__visualization__store__api_8h.xhtml#a5a6cd68f61a53bce6780d3ef95038277 "Get the number of dvs_part_info objects for this client session."), [dvs\_get\_part\_info()](dynamic__visualization__store__api_8h.xhtml#ab0ca08777e27d7ea82a52f05c96f1d19 "Get the dvs_part_info object for this index."), [DVS::IClient::get\_num\_parts()](class_d_v_s_1_1_i_client.xhtml#af609f80df51a124a137c6476b7d3c958 "Get the number of dvs_part_info objects this client has stored."), [DVS::IClient::get\_part\_info()](class_d_v_s_1_1_i_client.xhtml#af96a3f9cef0204d8c04032e9ce3e3f59 "Get the dvs_part_info object for a specific index."), [dvs\_get\_num\_var\_info()](dynamic__visualization__store__api_8h.xhtml#ad75625cedecbcd365c868c9893c6c2d8 "Get the number of dvs_var_info objects for this client session."), [dvs\_get\_var\_info()](dynamic__visualization__store__api_8h.xhtml#a024c618b9ade76a4b74e3dd8dca8e54b "Get the dvs_var_info object for this index."), [DVS::IClient::get\_num\_vars()](class_d_v_s_1_1_i_client.xhtml#a85adbf75ade9d0ffc6d258c34dae1eb3 "Get the number of dvs_var_info objects this client has stored."), [DVS::IClient::get\_var\_info()](class_d_v_s_1_1_i_client.xhtml#a2749739390de2501b4ae4de0ad878703 "Get the dvs_var_info object for a specific index."), [dvs\_get\_num\_plot\_info()](dynamic__visualization__store__api_8h.xhtml#aa44dcb6596c7833d2b9fe2a0435bb4c4 "Get the number of dvs_plot_info objects for this client session."), [dvs\_get\_plot\_info()](dynamic__visualization__store__api_8h.xhtml#a10f2e9f29af128af92f1e09c986ab0a5 "Get the dvs_plot_info object for this index."), [DVS::IClient::get\_num\_plots()](class_d_v_s_1_1_i_client.xhtml#a80325aaa83f2d2f27f1aa8e5f167c4c6 "Get the number of dvs_plot_info objects this client has stored."), [DVS::IClient::get\_plot\_info()](class_d_v_s_1_1_i_client.xhtml#ac9690e1df7282cfde97d8a27a1438bb2 "Get the dvs_plot_info object for a specific index.")
- Added Server API calls to retrieve the number of pending / complete timesteps to allow a user created server to know when all timesteps were flushed to disk so it could shutdown without losing data. See [dvs\_server\_timestep\_count()](dynamic__visualization__store__api_8h.xhtml#adeb64f5db63b08a79f2a59a85c5d9683 "Query a Dynamic Visualization Store server as to the number of timesteps it contains."), [DVS::IServer::get\_timestep\_count()](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37 "return the current number of pending and complete timesteps in the server").
- Improved read performance of cache
- Improved performance of reading large numbers of parts/variables/plots when using multiple servers in EnSight
- Improved memory usage

---

 <a class="anchor" id="Whats-new-in-2020R2"></a>

# What's new in 2020 R2

- Major API Overhaul
    - In getting ready for releasing the API for other teams to use we have gone ahead and redone much of the API to facilitate future changes. Please refer to documentation for new usage.
- Official API Name
    - We made an official name for the API of Dynamic Visualization Store (DVS) as we are starting to officially roll this out to external applications. This affects both the C/C++ and Python APIs as we renamed the namespaces to match the new name, renamed headers, libraries and classes. The details of which are described below.
    - **Note:** All files in the EnSight install now located in CEI/ensightXXX/src/readers/dvs where XXX is version 211 or greater.
- Major Client/Server connection API paradigm changed. Now you need to always create at least a shell server for the client to connect to. This change is to make API calls the same no matter what type of communication you are using, whether it be grpc or direct method calls (null protocol) currently or MPI etc. in the future.
    - C API: Call the new [dvs\_server\_create()](dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd "Create a Dynamic Visualization Store server instance for the client to connect.") (see docs) with a uri, which returns the created server\_id as a param, calling [dvs\_server\_start()](dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d "Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.") if running the server locally, then use [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server.") passing in that server\_id to connect to it.
        - If the server is being locally started you can call [dvs\_server\_start()](dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d "Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.") with the server\_id, server\_number and local\_ranks count to start it running in a separate thread. Otherwise it will just act as an interface for the dvs client to communicate with.
        - **Note:** If a server is started it MUST be started before connecting with a client.
    - C++ API: Create a server instance [DVS::CREATE\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#a947baebb085bb6a390f64b3a814934f0 "Create a DVS::IServer instance for clients to connect to.") (see docs) with a uri. If running the server locally call [DVS::IServer::startup()](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c "Start the server.") on the instance. Then pass that server instance into the [DVS::CREATE\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14 "Factory method to create a dynamic data client interface instance.") call to connect to that server.
        - If the server is being locally started you can call [DVS::IServer::startup()](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c "Start the server.") on the server to begin running it in a separate thread.
        - **Note:** If a server is started it MUST be started before connecting with a client.
- C API Changes
    - Renamed ensight\_dynamic\_data\_api.h to [dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml "C API for using Dynamic Visualization Store.")
        - Renamed all prefixed methods and strucs from edd\_ to dvs\_ (i.e. edd\_connect() to [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server."))
    - Renamed ensight\_dynamic\_data\_enums.h to [dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml "Contains enums used in C/C++ API.")
        - Renamed all prefixes of enums from edd\_ to dvs\_ (i.e. edd\_var\_location to dvs\_var\_location)
    - Shared library renamed from libdynamicdataclient to libdvsclient (extension varies depending on platform)
    - A server must always be created now for the client to connect to. This is done via [dvs\_server\_create()](dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd "Create a Dynamic Visualization Store server instance for the client to connect.") which as a param returns a server\_id. This server\_id is then used for other dvs\_server\_\* methods and more importantly in the [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server.") call.
        - Starting a server is done via [dvs\_server\_start()](dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d "Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.") which takes the server\_id as a param. Only need to start a server if running locally.
        - **Note:** A locally run server must be started via [dvs\_server\_start()](dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d "Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.") before calling [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server.").
    - [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server.") now takes a server\_id (which is created from [dvs\_server\_create()](dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd "Create a Dynamic Visualization Store server instance for the client to connect.")) and returns a session\_id as a param. This session\_id is used as the first param in all other client calls, [dvs\_begin\_init()](dynamic__visualization__store__api_8h.xhtml#a3744408f15cd4a36d19880d24d442a0d "begin setup of rank"), [dvs\_add\_part\_info()](dynamic__visualization__store__api_8h.xhtml#a4e8a904ae19fd7f2b0c300543bc42576 "Add part info for simulation."), etc.
        - **Note:** A locally run server must be started before calling [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server.").
    - All client calls ([dvs\_begin\_init()](dynamic__visualization__store__api_8h.xhtml#a3744408f15cd4a36d19880d24d442a0d "begin setup of rank"), [dvs\_add\_part\_info()](dynamic__visualization__store__api_8h.xhtml#a4e8a904ae19fd7f2b0c300543bc42576 "Add part info for simulation."), etc.) now take a session\_id (which is created from [dvs\_connect()](dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9 "Connect to dvs server."))
- C++ API Changes
    - Renamed namespaces of classes from EDD to DVS. (i.e. [EDD::CREATE\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14 "Factory method to create a dynamic data client interface instance.") to [DVS::CREATE\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14 "Factory method to create a dynamic data client interface instance."))
    - Renamed dynamic\_data\_client\_interface.h to [dvs\_client\_interface.h](dvs__client__interface_8h.xhtml "C++ Client API for using the Dynamic Visualization Store.")
        - Interface class now [DVS::IClient](class_d_v_s_1_1_i_client.xhtml "API for solvers to use to send data to EnSight servers.") instead of EDD::IDynamicDataClient
    - Created [dvs\_server\_interface.h](dvs__server__interface_8h.xhtml "C++ Server API for using Dynamic Visualization Store Server.") header for C++ Server API
        - Access with [DVS::IServer](class_d_v_s_1_1_i_server.xhtml "Interface class used to run a dynamic data server in a thread accepting incoming client connections.")\* [DVS::CREATE\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#a947baebb085bb6a390f64b3a814934f0 "Create a DVS::IServer instance for clients to connect to.") and [DVS::DESTROY\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8 "Destroy the server instance (also shutting it down if needed)") methods
    - Shared library renamed from libdynamicdataclient to libdvsclient (extension varies depending on platform)
- Python API Changes
    - Package now named dynamic\_visualization\_store (file dynamic\_visualization\_store.pyd)
    - Example usage in [test\_dvs\_client\_simple.py](test__dvs__client__simple_8py.xhtml)
- C/C++ Clients
    - Renamed client binaries from test\_edd\_client\* to test\_dvs\_client\*
        - See [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API.") for updated example using new API
    - Added C++ client example using C++ API, see [test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API.")
- New protocol available for use. It uses what we are calling the NULL transport. Meaning it doesn't use the network to transport data the data goes directly over method calls within this process. Previously all dvs servers used network communication via grpc, now it is possible to go directly to a dvs server without needing a network connection, letting you directly write into the DVS cache if needed.
- DVS File Changes
    - Files read by EnSight now use the .dvs extension instead of .edd
    - Keyword option GRPC\_SERVER\_PORT\_BASE renamed to SERVER\_PORT\_BASE
    - Keyword option GRPC\_SERVER\_PORT\_MULT renamed to SERVER\_PORT\_MULT
- Cache Changes
    - When using a cache a .dvs file will be auto created in the root cache folder named based on the dataset name which can be loaded by EnSight
    - Multiple datasets can now be stored and loaded from the same cache
    - Basic queries are enabled for .dvs files to allow the selection of specific datasets, parts, plots, and variables. See the [Cache URIs](group__group__dvs__uri.xhtml#dvs_cache_uri) section for more info.
    - Disk caches now use sqlite databases for metadata for both hdf5:// disk:// caches.
    - Case and part constants now stored in cache

---

 <a class="anchor" id="Current-Limitations"></a>

# Current Limitations

Version 2022 R1- Plots
    - If using plots and sending data in parallel all plot data needs to be sent to Server 0. This requirement will be removed in future iterations.
- Caches
    - The number of ranks being used needs to stay consistent and consistently connect to the same data servers when writing and appending data to a cache. I.E. You start writing a dataset in parallel with 5 nodes/ranks to 2 dynamic connections/servers. The first 3 nodes connect to server 0 and the second 2 nodes connect to server 1. You send 2 timesteps/updates to the API and then shut the DVS servers down. If you start them up again to write another timestep then you need to connect the same number of nodes/ranks to the servers in the same configuration to write another update. This requirement will be removed in future iterations and the number of nodes/ranks can change per timestep once calling a reinitialize method or restarting the DVS servers.

---

 <a class="anchor" id="Download-Latest-Install"></a>

# Download Latest Install

Download and install the latest [ANSYS](namespace_a_n_s_y_s.xhtml "GLTFWriter API Documentation.") suite (21.1 or greater). EnSight (or CEI) products are installed by default.Most files needed are located within :[InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs (XXX refers to the version number, i.e. 211, 212 etc.)**Note:** This document will refer to directories and scripts with numbers in them, these values change with versions. In 21.1 the directories/scripts will use 211. For newer versions such as 21.2 replace 211 with 212 etc.---

 <a class="anchor" id="What-is-Available"></a>

# What is Available

The dvs directory includes all of the code needed to build a C/C++ library to use within another code base as well as some pre-built binaries for C/Python for use on Windows and Linux. Files of Interest:   
- [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API."): An example of how to use the C API. It's used as our test client.
- [test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API."): An example of how to use the C++ API. Used in testing.
- [test\_dvs\_client\_simple.py](test__dvs__client__simple_8py.xhtml): An example of how to use the Python API
- [dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml "C API for using Dynamic Visualization Store."): This is our exposed C-API
- [dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml "Contains enums used in C/C++ API."): Enums used in the API
- [dynamic\_visualization\_store\_error\_codes.h](dynamic__visualization__store__error__codes_8h.xhtml "Contains errors used in the DVS C/C++ API."): Error codes returned from API calls
- [dvs\_client\_interface.h](dvs__client__interface_8h.xhtml "C++ Client API for using the Dynamic Visualization Store."): This is our exposed C++ Client API
- [dvs\_server\_interface.h](dvs__server__interface_8h.xhtml "C++ Server API for using Dynamic Visualization Store Server."): This is our exposed C++ Server API

Pre-built Code: If you wish to take advantage of the pre-built C API or C++ API, the built libraries (libdvsapi) are included in the dvs/linux_2.6_63 or dvs/win64 directories depending on the platform. For C and C++ you should be able to link against the libdvsapi library and use it directly.For more information on building the code if you need to please reach out to the Veronica team.More information on the usage of [C/C++/Python APIs](#Available-APIs)---

 <a class="anchor" id="Available-APIs"></a>

# Available APIs

<a class="anchor" id="Using-the-C-Writer-API"></a>## Using the C Writer API

The main header for the C Client Writer API is in [dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml "C API for using Dynamic Visualization Store."). At the top of the API header is a brief overview of the order to make the calls in. The methods are all documented here as well.   
  
 A full example of using the API can be found in [test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API."). See the "Simple Demo" section for running this application. A pre-built binary for the test_dvs_client can be found in the linux_2.6_64 or win64 sub folders of the dvs directory.   
  
 A pre-built library (libdvsapi.*) to link against for windows and linux can be found under: [InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs/[ARCH] where arch will be win64 or linux_2.6_64 based on your current os (XXX refers to the version number, i.e. 211, 212 etc.). Just include the [dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml "C API for using Dynamic Visualization Store.") header and link to the library and away you go.<a class="anchor" id="Using-the-Cplusplus-Writer-API"></a>## Using the C++ Writer API

The main header for the C++ Client Writer API is in the [dvs\_client\_interface.h](dvs__client__interface_8h.xhtml "C++ Client API for using the Dynamic Visualization Store."). To create an instance of the [DVS::IClient](class_d_v_s_1_1_i_client.xhtml "API for solvers to use to send data to EnSight servers.") class use the factory method [DVS::CREATE\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14 "Factory method to create a dynamic data client interface instance."). This instance should be destroyed via [DVS::DESTROY\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#a3f13d009a9a07278cbca3449113d78fc "Destruction method for a client created with CREATE_CLIENT_INSTANCE."). An example using this API is in [test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API.").   
  
 The C++ server API is in [dvs\_server\_interface.h](dvs__server__interface_8h.xhtml "C++ Server API for using Dynamic Visualization Store Server."). To create an instance of the [DVS::IServer](class_d_v_s_1_1_i_server.xhtml "Interface class used to run a dynamic data server in a thread accepting incoming client connections.") class use the factory method [DVS::CREATE\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#a947baebb085bb6a390f64b3a814934f0 "Create a DVS::IServer instance for clients to connect to."). This instance should be destroyed using [DVS::DESTROY\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8 "Destroy the server instance (also shutting it down if needed)").An example using this API is in [test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API.").   
  
 A pre-built library (libdvsapi.*) to link against for windows and linux can be found under: [InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs/[ARCH] where arch will be win64 or linux_2.6_64 based on your current os (XXX refers to the version number, i.e. 211, 212 etc.). Just include the appropriate headers and link to the library and away you go.<a class="anchor" id="Using-the-Python-Writer-API"></a>## Using the Python Writer API

A prebuilt library for Python3 exists for Windows ([InstallDir]/vXXX/CEI/apexXXX/machines/win64/Python-3.7.4/DLLs/dynamic_visualization_store.pyd) and Linux ([InstallDir]/vXXX/CEI/apexXXX/machines/linux_2.6_64/Python-3.7.4/lib/python3.7/dynamic_visualization_store.so). You will also need the libdvsapi library along side it (located [InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs/[ARCH]/libdvsapi.*). XXX refers to the version number, i.e. 211, 212 etc.A simple example in python using this module is in the source code for [test\_dvs\_client\_simple.py](test__dvs__client__simple_8py.xhtml).<a class="anchor" id="Using-the-proto-file"></a>## Using the .proto file

If you have need for use of the API in a language other than C++/C/Python the dynamic_visualization_store.proto file is included so you can auto gen code to talk to the EnSight server's via GRPC. For now it isn't recommended since the it's not yet well documented and there are a lot of free benefits for using the already developed clients such as automatic logging, data-deduplication and auto-reconnect if the post processor is such down or restarted for any reason.If you have need to use GRPC in another language please contact the EnSight team and we can provide more guidance on the .proto GRPC calls. ---

 <a class="anchor" id="Starting-the-dynamic-visualization-store-reader-with-EnSight"></a>

# Starting the Dynamic Visualization Store (DVS) reader with EnSight

EnSight readers are loaded when loading a file specific for that reader via the file open dialog or from command language. The EnSight Dynamic Visualization Store (DVS) reader's file type is .dvs.The below text can be put into a .dvs file and loaded via the file-&gt;open dialog in EnSight. You can also go through the [Running a simple demo](#Running-a-simple-demo) section which will run an EnSight command file that auto loads the simple_demo.dvs file provided in dvs/demo_files/simple_demo.dvs**Note:** By default EnSight will not recognize .dvs files. You must first enable the DVS reader in EnSight by going to Edit-&gt;Preferences. Then click on Data. Then in the bottom pane scroll down till you see the DVS reader and check it on.> \#!DVS\_CASE 1.0  
>  SERVER\_PORT\_BASE=50055  
>  SERVER\_PORT\_MULT=1  
>  #CACHE\_URI=hdf5://localhost//home/jcheuvro/demo/data  
>  #CACHE\_URI=hdf5://localhost/D:/temp/ahmed\_body\_no\_compression

The '#'symbol is used to comment lines out of the file.   
**SERVER\_PORT\_BASE**: This specifies the starting port number for servers to use. If running EnSight in SoS mode with 3 servers these servers would use ports 50055, 50056, and 50057   
**SERVER\_PORT\_MULT**: This tells the EnSight servers how to scale the port numbers. If this was set to 2, and the port base was the same as the above example ports used would be 50055, 50057, 50059, etc.   
**CACHE\_URI**: This defines what kind of a cache to use and the location. The above examples both say to use hdf5 files on the localhost in different locations. If the path isn't fully qualified (doesn't start with '/' on Linux/Mac or a drive letter on windows) then it will be assumed to be relative to the location of the .dvs file.

---

# Starting a Dynamic Visualization Store (DVS) server without EnSight Running

<a class="anchor" id="Starting-a-dynamic-visualization-store-server-without-EnSight-running"></a>## Using the C API (for C++ see section below)

For a working C example please refer to the [dvs/test\_dvs\_client.c](test__dvs__client_8c.xhtml "Test client to exercise the C API of the Dynamic Visualization Store API.") file. The Running a demo without EnSight running section goes through which command line options to use to trigger a DVS server to be ran without EnSight running.Currently the C API allows for the startup DVS servers without running EnSight by using 5 methods, `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd" title="Create a Dynamic Visualization Store server instance for the client to connect.">dvs_server_create()</a>`, `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ae8abdb8455cea44bbd9f509c1a063516" title="Add an option to the server.">dvs_server_set_option()</a>`, `dvs_server_clear_options()`, `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d" title="Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.">dvs_server_start()</a>`, `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#a996a1d0e1696ad7f991e44357d78a422" title="Check to see if a server was started with this server_num.">dvs_server_started()</a>`, `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ad16ba277108c7187b0a11f461b1477ca" title="Shutdown this server thread.">dvs_server_shutdown()</a>`, and `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ac16a3c06bb1968ddba06d83f5e2a1f56" title="Shutdown all server threads.">dvs_server_shutdown_all()</a>`.1. Create a server using `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd" title="Create a Dynamic Visualization Store server instance for the client to connect.">dvs_server_create()</a>`. This method takes a `uri`, a `server_number` and `local_ranks`.
    1. `URI`: The URI param specifies the protocol, machine, and port of the server. The URI is of the form `protcol://hostname:port`.
        1. `protocol`: Valid protocol value are `grpc` (which uses grpc communication) or `null` which uses direct method calls and no network communications. Examples: grpc://localhost:50055, grpc://person.ansys.com:56789, null://
    2. `server_id`: A return value of a dynamically created handle to the server that was created. -1 if it failed to create.
2. Server Options: The `dvs_server_set_options()` and `dvs_server_clear_options()` calls allow you to set specific server key/value pairs before calling `dvs_server_start`. The current options are:
    1. `VERBOSE` : Sets the verbosity of the server, set to 3 for decent debug info.
    2. `CACHE_URI` : Set this to specify the cache type, machine, and location of the cache. An example uri would be : `hdf5://localhost/D:/temp/testing_no_ensight` This tells the cache to use hdf5 files, the cache is on the localhost, and on windows the location of the cache is D:/temp/testing\_no\_ensight. An example on a linux filesystem would be: `hdf5://localhost//home/user/demo/my_dataset`. The data for this dataset will be stored in that folder under DVS server created folders.
3. Starting the server: The method `dvs_ret <a class="el" href="dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d" title="Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.">dvs_server_start(int32_t server_id, uint32_t server_num, uint32_t local_ranks)</a>` will start a DVS server in a separate thread. The details of the parameters can be found in [dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml "C API for using Dynamic Visualization Store."). `server_num` is a monotonically increasing number 0 for first, 1 second, 2 third etc. `local_ranks` specifies how many ranks/ solver nodes will be connecting to this server. Each server is started in its own thread so it can be ran in a separate process from the server node or within the same process.
    1. `server_id`: The id of the server, dynamically created from the [dvs\_server\_create()](dynamic__visualization__store__api_8h.xhtml#a06196ff56fe7f270172239c1be4ce0cd "Create a Dynamic Visualization Store server instance for the client to connect.") call.
    2. `server_number`: A unique (zero based) number for the server. Each server's server number should be monotonically increasing. Only needed to be set if starting this server locally. Otherwise can be zero.
    3. `local_ranks`: Tells the server how many local ranks this server will be expecting. If using a null tranport protocol this number will probably be 1 unless multi-threading. Only needed to be set if starting the server locally. Otherwise can be zero.
4. Shutting down the server: The methods `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ad16ba277108c7187b0a11f461b1477ca" title="Shutdown this server thread.">dvs_server_shutdown(int32_t server_id)</a>` and `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ac16a3c06bb1968ddba06d83f5e2a1f56" title="Shutdown all server threads.">dvs_server_shutdown_all()</a>` are used to shutdown specific servers or all servers started by the current process respectively. This should be called before the process shuts down.

The overall order of calls is to call `dvs_server_set_options()` for each server you want to start, then call `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#aa5722a5316ee73bdd998c9a327e8cb3d" title="Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.">dvs_server_start()</a>` for each server you'd like to start. After that all calls are as normal detailed in "Using the C API" section. Before shutting down the process you should call `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ad16ba277108c7187b0a11f461b1477ca" title="Shutdown this server thread.">dvs_server_shutdown()</a>` on specific servers or `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ac16a3c06bb1968ddba06d83f5e2a1f56" title="Shutdown all server threads.">dvs_server_shutdown_all()</a>` to cleanup the servers properly. `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#a815bb1d2251e35e3bfd3c44a4a338052" title="Shuts down the api, performing any necessary cleanup, also calls dvs_server_shutdown_all() if any ser...">dvs_shutdown()</a>` will also shutdown all of the servers.**Note:** Shutting down a server directly after sending an update might cause a loss in data if the data hasn't been written to the cache. Currently giving a few seconds delay should be sufficient. In a future update a call will be available to ask if it is safe to shutdown or not.## Using the C++ API

Currently the C++ API allows for creating a [DVS::IServer](class_d_v_s_1_1_i_server.xhtml "Interface class used to run a dynamic data server in a thread accepting incoming client connections.") instance which then runs in a separate thread accepting incoming server connections. For a working C++ example please refer to the [dvs/test\_dvs\_client\_cxx.cpp](test__dvs__client__cxx_8cpp.xhtml "Test client to exercise the C++ API of the Dynamic Visualization Store API.") file.Server Usage:1. Instantiate [DVS::IServer](class_d_v_s_1_1_i_server.xhtml "Interface class used to run a dynamic data server in a thread accepting incoming client connections.") using [DVS::CREATE\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#a947baebb085bb6a390f64b3a814934f0 "Create a DVS::IServer instance for clients to connect to.") method   
    
    1. `uri`: The URI param specifies the protocol, machine, and port of the server. The URI is of the form `protcol://hostname:port`.
        1. `protocol`: Valid protocol value are `grpc` (which uses grpc communication) or `null` which uses direct method calls and no network communications. Examples: grpc://localhost:50055, grpc://person.ansys.com:56789, null://
2. Set options using [DVS::IServer::set\_options()](class_d_v_s_1_1_i_server.xhtml#a964b0420773ec5f47dbcea04334ba0d3 "Set a collection of options on the server. Overwrites previous options See. See Server Options.") or [DVS::IServer::set\_option()](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c "Set a specific option on the server, these are used during startup See See Server Options."), current options are:   
    
    1. `VERBOSE` : Sets the verbosity of the server, set to 3 for decent debug info.
    2. `CACHE_URI` : Set this to specify the cache type, machine, and location of the cache. An example uri would be : `hdf5://localhost/D:/temp/testing_no_ensight` This tells the cache to use hdf5 files, the cache is on the localhost, and on windows the location of the cache is D:/temp/testing\_no\_ensight. An example on a linux filesystem would be: `hdf5://localhost//home/user/demo/my_dataset`. The data for this dataset will be stored in that folder under DVS server created folders.
3. Startup server using [DVS::IServer::startup()](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c "Start the server."). A locally run server must be started before creating a client to connect to it. A non local server should not be started.   
    
    1. `server_number`: A unique (zero based) number for the server. Each server's server number should be monotonically increasing. Only needed to be set if starting this server locally. Otherwise can be zero.
    2. `local_ranks`: Tells the server how many local ranks this server will be expecting. If using a null tranport protocol this number will probably be 1 unless multi-threading. Only needed to be set if starting the server locally. Otherwise can be zero.
4. If needed see if it's running via [DVS::IServer::running()](class_d_v_s_1_1_i_server.xhtml#a5fdee3f663dbe7b7dab11621f76737e2 "Check to see if the server is running.")
5. Create a client instance using [DVS::CREATE\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14 "Factory method to create a dynamic data client interface instance.")
6. Use [DVS::IClient](class_d_v_s_1_1_i_client.xhtml "API for solvers to use to send data to EnSight servers.") instance to send data to dvs server.
7. Destroy any client instances using [DVS::DESTROY\_CLIENT\_INSTANCE()](dvs__client__interface_8h.xhtml#a3f13d009a9a07278cbca3449113d78fc "Destruction method for a client created with CREATE_CLIENT_INSTANCE.") before destroying the server.
8. Shutdown server using [DVS::IServer::shutdown()](class_d_v_s_1_1_i_server.xhtml#a7ce6bb49a2d383b0821267415a93802d "Shutdown the server, also called on server destruction by DVS::DESTROY_SERVER_INSTANCE()")
9. Destroy instance using [DVS::DESTROY\_SERVER\_INSTANCE()](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8 "Destroy the server instance (also shutting it down if needed)") (this will also shutdown the server)

**Note:** Shutting down a server directly after sending an update might cause a loss in data if the data hasn't been written to the cache. Currently giving a few seconds delay should be sufficient. In a future update a call will be available to ask if it is safe to shutdown or not.---

 <a class="anchor" id="Running-a-simple-demo"></a>

# Running a simple demo

For this example we will be working out of the folder: [InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs (XXX refers to the version number, i.e. 211, 212 etc.). Inside of the dvs directory there is a folder called demo_files. These will be used for this demo.**Note:** Directories/scripts with 212 in their name will change to 212 etc. in newer versions.1. From a command/cygwin prompt go into the dvs/demo\_files directory.
2. Run ensight `[ANSYS_INSTALL_DIR]/vXXX/CEI/bin/ensight -p simple_demo.enc` (XXX refers to the version number, i.e. 211, 212 etc.)
    1. You should see a command prompt open from EnSight that has a line similar to: `gRPC Server: APXJCHEUVRO2.win.ansys.com(0.0.0.0):50055`, this means the EnSight server is waiting for a DVS server connection.
3. In a second command/cygwin prompt cd into the dvs/{arch} directory, where {arch} will be linux\_2.6\_64 or win64 depending on your OS
4. Run the `test_dvs_client` (or `test_dvs_client.exe` on Windows). It should connect and after sending a few timesteps EnSight should display a large cube and now be interactable.
    1. Use the command line option `-h` for a list of options to use with the test client.

---

 <a class="anchor" id="Simple-demo-with-multi-server"></a>

# Running a simple demo (multiple EnSight Servers, multiple test clients)

1. Using the same directories as the simple demo example above start EnSight but this time with the command line `[ANSYS_INSTALL_DIR]/vXXX/CEI/bin/ensight -p simple_demo.enc -sos -res sos_3.res` (XXX refers to the version number, i.e. 211, 212 etc.)
    1. This will run EnSight with 3 servers. You'll see multiple command prompts pop up showing similar grpc Server lines, with the ports varying from 50055-50057.
2. Now run the shell script `run_6_solver_demo.sh`. This will spawn 6 test\_dvs\_client processes sending data to the different EnSight servers.
    1. For a list of command line options run `./test_dvs_client -h`. These can used on the run\_6\_solver\_demo.sh script as well.
3. After a few timesteps are sent EnSight should be interactable and look the same as when 1 server was used.
    1. If you click on the Variable tab on the bottom of the lower left pane you should see a list of Variables/Scalars/Vectors etc.
    2. Expand the Scalars list, and drag the ServerNumber variable into the 3D window and release.
    3. You should now see the geometry colored by which EnSight server handled the geometry
    4. If you drag the elem\_scalar\_rank variable into the 3D scene the geometry will be colored by which client/rank sent the data.

---

 <a class="anchor" id="Simple-demo-without-EnSight-running"></a>

# Running a demo without EnSight running

For this example we will be working out of the folder: [InstallDir]/vXXX/CEI/ensightXXX/src/readers/dvs (XXX refers to the version number, i.e. 211, 212 etc.)**Note:** Directories/scripts with 211 in their name will change to 221 etc. in newer versions.1. From a command/cygwin into the dvs/{arch} directory, where {arch} will be linux\_2.6\_64 or win64 depending on your OS
2. Run the test\_dvs\_client using `test_dvs_client.exe -start 0 -t 2 -server 0 1 3 -cache_uri hdf5://localhost/D:/temp/testing_no_ensight` replacing the D:/temp/testing\_no\_ensight in the -server\_uri option with the location of the dataset you want to save
    1. **Note:** The directory structure needs to exist up to the last folder for now. (D:/temp/ must exist in the example, testing\_no\_ensight will be created if it doesn't exist). This will recursively create the directory structure in the future.
3. Now copy the dvs/demo\_files/simple\_demo.dvs file and edit it
    1. Uncomment one of the CACHE\_URI lines (remove the # from the front) and modify the directory portion of the URI to point to the location of the dataset.
4. Run EnSight
    1. Cancel the Welcome dialogue
    2. If this is your first time running this version of EnSight you will need to turn on the DVS reader. Go to Edit-&gt;Preferences, Select Data, then in the bottom pane is a list of visible user defined readers. Scroll down till you see the DVS reader and check it on if it is not already. Then hit close.
    3. Now in the menu run File-&gt;Open and select the copy of the simple\_demo.dvs file you modified.
    4. You should now see a large cube of spheres and 2 timesteps.
        1. In the Parts pane fully expand the groupings (these are set via metadata from the test\_dvs\_client for test purposes).
        2. Uncheck the "Show" column box for Part 2, Part3-TriQuad and inlet\_1.
        3. In the Variables pane you should see a scalar variable called nodal\_scalar. Drag and drop this variable onto the 3D window and you should see some interesting colors.
        4. Change timesteps to see the variable change values.
    5. Close EnSight
5. Now run the test\_dvs\_client using `test_dvs_client.exe -start 2 -t 4 -server 0 1 3 -cache_uri hdf5://localhost/D:/temp/testing_no_ensight`, again replacing the D:/temp/testing\_no\_ensight in the -server\_uri option with the location of the dataset you saved. This will append 2 additional timesteps to the dataset.
6. Re-run step 4 'Run EnSight' above and you should now see 4 timesteps loaded.

---

 <a class="anchor" id="Using-secret-keys"></a>

# Using secret keys

To protect access to Dynamic Visualization Store (DVS) servers we provide the use of a secret keys.When starting EnSight there are 2 ways to accomplish this:1. Set an environment variable `ENSIGHT_SECURITY_TOKEN=my-super-secret-key` (set to any string you'd like)
2. (Not recommended) Run ensight with -s command line option i.e. `[ANSYS_INSTALL_DIR]/vXXX/CEI/bin/ensight -s 101` (XXX refers to the version number, i.e. 211, 212 etc.)
    1. This method only accepts a number as input

**This security token will be used for the C&amp;C interface as well as the DVS interfaces to allow connections**Now applications using the DVS interface will need to specify the key given to EnSight within the `<a class="el" href="dynamic__visualization__store__api_8h.xhtml#ab96812d4412a9af10e7e7924c572a7c9" title="Connect to dvs server.">dvs_connect()</a>` call or in the `<a class="el" href="dvs__client__interface_8h.xhtml#ab009ac80464841b8563982bafba05f14" title="Factory method to create a dynamic data client interface instance.">DVS::CREATE_CLIENT_INSTANCE()</a>` factory method. See `<a class="el" href="dynamic__visualization__store__api_8h.xhtml" title="C API for using Dynamic Visualization Store.">dynamic_visualization_store_api.h</a>` or `<a class="el" href="dvs__client__interface_8h.xhtml" title="C++ Client API for using the Dynamic Visualization Store.">dvs_client_interface.h</a>` for details.