RAD Server and the included Data Storage for RAD Server Users
Embarcadero’s RAD Server Enterprise Mobility Server (EMS) is a turn-key application foundation for rapidly building and deploying services based applications. RAD Server’s core offerings include automated Delphi and C++ REST/JSON API publishing and management, Enterprise database integration middleware, IoT Edgeware and an array of application services such as User Directory and Authentication services, Push Notifications, Indoor/Outdoor Geolocation and JSON data storage. RAD Server enables developers to quickly build new application back-ends or migrate existing Delphi or C++ client/server business logic to a modern services based architecture that is open, stateless, secure and scalable. RAD Server is easy to develop, deploy and operate making it ideally suited for ISVs and OEMs building re-deployable solutions. Two important and useful features included with RAD Server are: 1. It’s important to note that a RAD Server single site license (included in Enterprise Edition) still allows you to deploy a solution based on multiple instances of the RAD Server engine, on multiple physical or virtual servers, for fail-over and load balancing, as long as they are backed by a single instance of the RAD Server database (the included InterBase database instance) which manages the RAD Server license itself. 2. It’s also important to note that Data Storage for Users in the form of JSON name/value pairs is part of the core RAD Server offering. But the use of the included RAD Server InterBase database as a relational DB is subject to a separate license (and also the installation of a separate InterBase server instance). This post focuses on how to use RAD Server to add JSON data storage, to create some Custom Fields to store additional JSON name-value information for your RAD Server Users. The included RAD Server InterBase database creates a USERS table. The RAD Server USERS Table allows you to manage the RAD Server Users data that are stored in your RAD Server Engine (EMS Server). The USERS Table stores information about RAD Server Users in the RAD Server Engine (EMS Server): The RAD Server USERS table columns are listed here: /* Table: USERS, Owner: SYSDBA */ CREATE TABLE USERS ( UID INTEGER NOT NULL, TID INTEGER NOT NULL, USERID CHAR(36) NOT NULL, USERNAME VARCHAR(32) NOT NULL, HPASSWORD CHAR(32), SALT CHAR(6), SESSIONID CHAR(32), SESSIONTIME TIMESTAMP, ISACTIVE BOOLEAN DEFAULT TRUE, CREATED TIMESTAMP, LASTMODIFIED TIMESTAMP, CREATOR CHAR(36), UNIQUE (USERID), PRIMARY KEY (UID), CONSTRAINT USERS_UNIQ UNIQUE (USERNAME, TID) ); ALTER TABLE USERS ADD CONSTRAINT TUSERS FOREIGN KEY (TID) REFERENCES TENANTS (TID); /* Meta data descriptions. This syntax requires InterBase 2020 or higher. Some tables require ODS18 and higher */ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 /* Table: USERS, Owner: SYSDBA */ CREATE TABLE USERS ( UID INTEGER NOT NULL, TID INTEGER NOT NULL, USERID CHAR(36) NOT NULL, USERNAME VARCHAR(32) NOT NULL, HPASSWORD CHAR(32), SALT CHAR(6), SESSIONID CHAR(32), SESSIONTIME TIMESTAMP, ISACTIVE BOOLEAN DEFAULT TRUE, CREATED TIMESTAMP, LASTMODIFIED TIMESTAMP, CREATOR CHAR(36), UNIQUE (USERID), PRIMARY KEY (UID), CONSTRAINT USERS_UNIQ UNIQUE (USERNAME, TID) ); ALTER TABLE USERS ADD CONSTRAINT TUSERS FOREIGN KEY (TID) REFERENCES TENANTS (TID); /* Meta data descriptions. This syntax requires InterBase 2020 or higher. Some tables require ODS18 and higher */ The UID is the USERID is a Unique identifier of a RAD Server User (UserID) in the RAD Server […]
