Choosing a Custom Data Abstract Server vs. Relativity Server
This is an Article about Data Abstract
One big decision you need to make when starting a new Data Abstract project is whether to go for a custom Data Abstract Server or use Relativity Server. This article aims to give you an overview over some of the pros and cons of both options and will hopefully help to guide your decision.
It is important to know that this decision does not need to be final. It will always be easy to migrate from one option to the other later on, if you find your needs have changed.
Background
The main purpose of your middle-tier server, obviously, will be serving data to your client and enforcing business rules, such as controlling how users can query and interact with your data or making sure users only see and modify the data they are authorized to see or modify.
Both Relativity Server and a custom Data Abstract Server are well-suited to do this, and both solutions will get you started without writing any server-side code (aside, of course, from our actual business rules).
Choosing a custom Data Abstract Server gives you a project in your Visual Studio or Delphi solution that you can build to create your custom server; this server will run and work out of the box just as the wizard created it for you — all you need to do is define your Schemas and, optionally, add business rules — either using Business Rules Scripting or custom .NET or Delphi code.
Relativity Server, instead, is a pre-compiled server 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.
For core Data Abstract functionality, both options will run the exact same code (in fact, Relativity Server is based on the same Data Abstract for .NET binaries that your custom server would use).
Reasons to Choose Relativity Server
No Server Project. Since Relativity Server comes pre-built and ready to use, you do not need to maintain and build your one server project.
No need for Data Abstract for .NET or Delphi license. This is especially relevant if you are an Xcode, Java or JavaScript developer using the respective Data Abstract client libraries. For one thing, you don't need to own the .NET or Delphi edition of Data Abstract to create your own server; for another, you probably don't even want to work in Delphi or .NET just to create a server project.
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 can simply connect Schema Modeler to your Relativity Server, make changes to your schemas and save them right back into the server — and your changes are live immediately.
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 are set to use the latest technologies and features; by contrast a custom server will need to be manually rebuilt and redeployed, of course.
Reasons to Choose a Custom Server
Custom Services. Since a custom server is your own project that you control, you can easily add custom additional RemObjects SDK services to your server that perform functionality other than providing data access.
Custom Code and Business Logic. Also, since you compile your customs server yourself, you can add just about any kind of custom code you may need, and you can implement business logic using your favorite .NET language or Delphi, if you run into scenarios where the APIs exposed by the JavaScript-based Business Rules Scripting do not give you the flexibility you need. (Of course you can, and should, still use JavaScript Business Rules Scripting in your custom server, as well.)
Monolithic Deployment. Especially 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*.)
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 of them as you need and connect them to interact and scale out as necessary, under your control.
Switching
As mentioned before, switching from Relativity Server to a custom server, or vice versa, will be pretty easy, even if you start out with the "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**, and you're set.
In most cases, the only change to your clients when switching between Relativity and a custom server would be a change of the server's address port number, and maybe the login string.
Footnotes
(* 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, schmeas usually are contained in TDASchema components — but you can simply right-click and save the schema to disk form those.)
See Also
Product Articles — Data Abstract — RemObjects SDK — Hydra