Choosing between Relativity Server and a Custom Server
One decision you need to make when starting a new Data Abstract project is whether you will create a custom Data Abstract Server or use the provided Relativity Server. In this section, we will give you an overview of some of the pros and cons of both options, which will hopefully help to guide your decision.
Note: This decision does not need to be final. If your needs have changed, you can easily migrate from one option to the other at a later point in time.
The main purpose of your middle-tier server is to serve the data to your client and enforce any business rules you have defined, such as controlling how users can query and interact with your data or making sure the users only see and modify data they are authorized to see or modify.
Both Relativity Server and a custom Data Abstract Server are well-suited to this, and both solutions will get you started without requiring you to write any server-side code (aside, of course, from any business rules you need).
The core Data Abstract functionality is the same across both server options. Relativity Server itself is indeed based on the same Data Abstract for .NET binaries that your custom server would use.
The difference between the server types initially comes down to your deployment target and the platform/language that you develop with. If you wish to build your own Data Abstract server, you must have the Delphi or .NET version of Data Abstract. Delphi-based Data Abstract servers must be deployed on Windows machines, whereas the .NET binaries can be deployed on Windows, Mac and Linux machines thanks to Mono. If instead you are a Java or Cocoa developer, you will feel more comfortable using Relativity Server.
Delving a bit deeper into Relativity Server, it is a pre-compiled server that is installed as part of DA (and easily installable on your production servers) that already encompasses the same core functionality your custom server would, but allows you to dynamically upload your schemas and business logic into it as needed. You can interact with Relativity Server via an application or through a web interface.
A custom Data Abstract Server is initially a Visual Studio or Delphi solution generated by the IDE's Wizard, configured for you depending on options you choose in the Wizard. It will run out of the box, all you need to do is define your Schemas and, optionally, add any required business rules - either using Business Rules Scripting or custom .NET or Delphi code.
Let's explore the reasons you would choose one server over the other in more depth.
Reasons to Choose Relativity Server
Here are some of the reasons you should consider using Relativity Server, rather than rolling your own custom Data Abstract server:
No Server Project. Since Relativity Server comes pre-built and ready to use, you do not need to maintain and build your own server project. Deployment can be immediate.
Dynamically configurable. Relativity Server lets you dynamically set up new Domains and Schemas as needed, and edit existing schemas and business rules on the fly. You simply connect Schema Modeler to your instance of Relativity Server, make the changes to your schemas and save them right back into the server. Best of all, your changes are live immediately, no compilation needed.
Design and work with schemas behind a firewall. Relativity exposes a full API for working with Schemas and the back-end database that allows Schema Modeler to give you a RAD design experience, without needing a live connection to your database. You only need to open your firewall to allow access to Relativity itself.
Upgrade without rebuilding. As new versions of Data Abstract come out, you can simply run the Setup to upgrade your Relativity installation(s) and your servers will set to use the latest technologies and features; by contrast, a custom server would need to be manually rebuilt and redeployed, of course.
Reasons to Choose a Custom Server
Looking at why you should consider Relativity Server, you may wonder why you would want to deploy your own custom server. Here are some reasons it's worth considering:
Custom Services. Since a custom server is your own project, you can easily add and customize additional Remoting SDK services that perform functionality other than just providing data access.
Monolithic Deployment. If you are distributing your server application to customers rather than self-hosting, custom Data Abstract Servers can be easier to deploy, because you can link all your schemas, business rules scripts and even connection definitions into your executable, giving you "xcopy deployment". (By contrast, Relativity Server needs to be installed and then configured 1 .)
No deployment fees, ever. While Relativity Server also comes with a Royalty Free edition for low-scale deployment, your custom Data Abstract server will never incur deployment fees. You can install as many instances as you need and connect them to interact and scale out as necessary, under your control.
Should you feel that you made the wrong choice, or find that your needs are different than they were at the beginning of the project, then you can easily switch from Relativity Server to a custom server, or vice versa. Don't feel trapped thinking that you started out with a "wrong" decision.
In Relativity Server, all the configuration for your services (including the business rules scripts) is contained in the Schema(s). At any time, you can simply save the schema files and connection definitions out of your Relativity Server as .daSchema and .daConnections files and add them to a custom Data Abstract server project created in .NET or Delphi.
Similarly, if you started out with a custom server and later realize you don't use any custom code or services, you can simply create a new Domain in Relativity Server, import your .daSchemas 2, and you're all set.
In most cases, the only changes you need to make to your clients when switching between the different types of server, would be to change of the server's address, port number, and maybe the login string.
In addition to configuring Relativity Server manually with the provided tools such as Server Explorer, Relativity Server also exposes Relativity Server Admin APIs that can be used to control and configure it programmatically. You can also export and reimport a full Domain setup to move or propagate it from one server to the other. ↩
In a DA/.NET custom server, .daSchema files are a direct part of your project; in a DA/Delphi server, schemas are usually contained in ↩components — but you can simply right-click and save the schema to disk from those.