README.md

DDServer2

New version of the DDServer program that uses an SQL server for storing datasets and user information. Current version uses SQLite which is not optimal for large scale applications (it's management of concurrent access is lacking, PostgreSQL would be better suited for production).

Compilation

In the project root directory :

$ cmake .
$ make

These commands will build all targets, the executable files can be found in src under the appropriate directory.

  • src/server/server
  • src/vimgr/vimgr
  • etc...

Documentation

A documentation generated with doxygen can be found in the doc subfolder.

Components

Source code files are found in the src folder. The code is composed of a couple modules with different tasks:

  • server: main implementation, produces the executable
    • ddserver: server implementation; manages the socket listener and serves data to connected users.
  • ddservice: leaner implementation of the original DDService library. Redifined structures for current version of the code (older version of DDService includes obsolete functionality such as managing the concurrent access of ressources).
    • newddvar: declaration of the DDVar structure used to store information regarding the users request. Older versions managed requesting and releasing locks and caching mechanisms that are no longer needed in the current version.
    • ddtime: DDTime format management.
    • str_utils: string related utility functions.
    • str_array: string list implementation.
    • settings: global server settings, constants (database name, ports, table names, etc...).
    • request: manages the decoding and encoding of various user requests.
    • query : SQL query implementation.
    • varinfo: Variable information container.
    • db: Database connection management, user session creation and deletion, ticket allocation, instrument management, user authentication, data retrieval. (Should be the focus if trying to implement an PostgreSQL version).
    • logger: logging support.
  • add_user, rm_user: user creation and deletion programs. Not currently implemented as can be done using an SQL client connected to the database.
  • add_vi, rm_vi: virtual instrument creation and deletion. Not currently implemented as can be done using an SQL client connected to the database.
  • vimgr: virtual instrument management program. Allows listing, creating and deleting virtual instruments and users. Not yet fully implemented.
  • test_getdata: testing program, executes a request on the server for the m10:synth:a dataset ("synthetic" dataset created for testing purposes. Adapt this code for further testing.

Tests

The test subfolder contains a collection of testing routines.