DA Server sample (Delphi)
DA Server is a standalone executable server provided with Data Abstract for Delphi. DA Server can be run as a standalone application or as a Windows Service that provides the Simple and PCTrade schemas from the DASamples domain for sample applications to connect to. When started on port 7099, it can stand in for the Relativity Server that the other Delphi samples connect to.
The sample ships in two versions that behave identically at runtime and differ only in how the server contract is defined: a RODL-based version, where the service interface is described in a .RODL file, and a CodeFirst-based version, where the same server is defined directly in code using Code-First attributes.
Getting Started
The RODL-based version is located in C:\Users\Public\Documents\RemObjects Samples\Data Abstract for Delphi\DAServer, and the CodeFirst-based version in C:\Users\Public\Documents\RemObjects Samples\Data Abstract for Delphi\DAServer (CodeFirst).
To build it, you will need Delphi RAD Studio.
Running the Sample
When you start DA Server as a standalone application (DAServer.exe), it looks like this and provides a means to change the port that it listens on:
Pick a port and click Start server. The button changes to Stop server while the server is listening:
When DA Server is started on port 7099, it can stand in for the Relativity Server that the other Delphi samples connect to.
To instead run DA Server as a Windows Service, simply install it by running "DAServer.exe /install" from the command line on a prompt that was run as Administrator. Once that is done, you can start and stop DA Server like any other Windows Service, using the Services Management Console, or the "net start/stop" command line tool. It can also be uninstalled by running "DAServer.exe /uninstall".
When running as a Windows Service, DA Server of course will not display a GUI and will use 7099 port by default.