Persistate

Installing and running the Persistate Server

Hide Navigation Pane

Installing and running the Persistate Server

Previous topic Next topic No directory for this topic  

Installing and running the Persistate Server

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

This walkthrough takes you through the installation, configuration and running of the Persistate Server.  This will install both the windows service which runs the Persistate Server, and the Persistate Configurator application that you use to configure it.  It is recommended that you perform this walkthrough as an administrator user.  You must install this on every server where you want to run this service.  However, you can configure all the servers and, permissions allowing, start and stop them from a single location using the Configurator application.

Caution

This walkthrough assumes that you have a deployed application file available.  You can create one by following the Creating and running the Device Network demonstration walkthrough to produce a working DeviceNetwork package.  Alternatively, you can download the DeviceNetwork_Deploy.ser file from the Downloads page.

1.Download the PersistateServer-.netN.N-v0.6.1.exe file from the Downloads page into a scratch folder.  There are three versions to choose from, where N.N is 2.0, 3.5 or 4.0.  Each version will run only Persistate packages created with the indicated version of the .Net framework, and must be used with the corresponding version of the Persistate Viewer.  If  you followed the previous walkthrough, choose the version for the framework you used to create the Device Network package.
2.Right click the downloaded file and select Install. Follow the on-screen prompts to install the Persistate Server service and the Configurator application.  You may get a prompt from Windows' UAC during this process.
3.Setup should have installed a new item on your start menu.  Use it to start the Configurator program.  If you perform this on a different computer to the one in which you performed the Creating and running the Device Network demonstration walkthrough, an error box may be displayed saying that Persistate could not be initialised.  This is normal, and happens because Persistate could not find any database connection details, or could not connect to the database server.
4.The Create or Connect to Persistate Domain dialogue box appears, unless you cleared the Always Request Details box in a previous walkthrough.  If you have installed the Persistate Generator add-in in the same machine, or installed the server previously, an existing profile will appear.  You can use an existing profile for the server, or create a new one by clicking the New button. For the purposes of this walkthrough, click New, give the new profile a name, and complete the details to create a new root database and domain for the Persistate Server.
Creating the server root database

Creating the server root database

5.Enter details into the box as follows, and click Ok when you have finished.
Database Type.  Select the DBMS that you are using.  For the moment, only the SQL Server or MySQL types are supported.  Be aware that if you choose MySQL, you will be limited to a single database in the Persistate domain.  This is because the .Net connector for MySQL does not as yet support distributed transactions.
Database Server.   Enter the server name as required by your DBMS.  The above example shows the default instance of SQL Server Express on the host "Delilah".
Root Database.  The name of the new Persistate root database (catalog, schema) which will be created.
Integrated Security.  Check this to use integrated security with your database server, or clear it to enter credentials here.
User Name and Password.  If you clear the Integrated Security checkbox, enter appropriate credentials here.  These must have sufficient privileges to create a new database.
Create Root Database.  Set this checkbox here.  When you use this dialogue box to connect to an existing root database, then you leave this blank.
Domain Name.  A name to give to the Persistate domain object.  This is the object at the root of your entire persistent object tree, using potentially many databases, and so should reflect this.
Always Request Details.  If you check this box, then this dialogue will always be displayed when Persistate Configurator starts up.  If you uncheck the box, this dialogue will not be displayed, unless Persistate could not connect for some reason.  If you hold down the shift key when starting Persistate Configurator, then the dialogue will be displayed, regardless of the state of this checkbox.
6.As you can see below, the Configurator application main window looks very like the Generator window.  In fact, they share most of the code, and it is mainly the operations available which differ.  One difference between creating a root database with the Generator and with Configurator is that Generator creates an environment called Development whereas the Configurator creates an environment called Production.  Expand the Environments node and you will see it.

Configurator application showing servers grid

Configurator application showing servers grid

7.The installation process also creates a server object for the machine on which you have installed it - in the case shown above the computer name is "DELILAH".  It also creates a Serviced Package entry for this machine for the Persistate package.  In order for the server to run applications, we need to import them.  To do this, click on the Production environment node to display its environment form, and then select the Import Package operation from either the right click or the Environment menu.

Information

When a Persistate Viewer starts up, it needs first to contact a "portal" server which "services" the Persistate package.  It gets a list of environments and available packages to run from this server.  It can then use any server which services a particular package to run that package - and in fact chooses one at random from all those that do.  You can have any number of Persistate Servers servicing any number of packages.

8.If you followed the Creating and running the Device Network demonstration walkthrough, navigate to the folder where you created the DeviceNetwork solution and select the DeviceNetwork_Deploy.ser file and select it.  If you haven't done this, you can download the file from the Downloads page.  Click Open.  The package is now imported into the Production environment.
9.Now you must make your server service the DeviceNetwork package.  Click the Servers node to put up the Server Grid.  Right click in the Serviced Packages grid and select New.  When the new row appears, select the Production environment and the Device Network package in the drop-downs.  Click Save.
10.This initial version of Persistate has a very simple security facility.  You can make packages secure or not.  If a package is secure, then you have to grant each user permission to run it.  To make DeviceNetwork secure, in the left hand pane expand the Production node, then the Product packages node and click on Device Network to show its form.  Set the Secure Package checkbox.
11.To grant yourself permission to run the package, in the left hand pane click on the Principals node.  In the lookup form, click Search, and you should see your user identification there in the form <domain>\<user name> or <computer>\<user name>.  Click on Show for this principal.  In the Package Grants grid, right click and select New.  Select Production and Device Network in the drop downs.  Click Save.
Stuart can now run the device network package in the production environment

Stuart can now run the device network package in the production environment

12.That's it - the server is ready to roll.  Click on the Servers node to display the Server Grid.  Click on Start Service for your server.  The Service State should show Running almost immediately.  You can if you wish skip the remainder of this walkthrough, which involves creating a second database and a test environment, and go straight to the Installing and running the Persistate Viewer walkthrough to run the DeviceNetwork package from the server.
13.It is generally a good idea to have a test facility for most packages.  Now we will create a test database, and a test environment for our DeviceNetwork package.  To start, in the left hand pane, click the Databases node to put up the Database Grid.  Right click in the grid and select New. The new database dialogue box should appear.

Creating a new database

Creating a new database

14.Enter the details that you want.  Remember that although Persistate supports MySQL, the .Net connector available does not support distributed transactions, so you will be limited to SQL Server for now for this.   Don't put a database or catalog term in the Connect String.  Click Ok.  The new database should appear in the Database Grid.
15.To allow the new database to store objects for the DeviceNetwork package, we must add all the necessary tables, indexes etc..  To do this, put up its Package Form by navigating to it in the left hand pane.  In the Package Form, click the Target Databases button to put up the Target Databases grid.  Right click in this grid and select Add.  Select the new database in the list and click Ok.  The tables and other objects necessary for the package will now be generated and the new database will appear in the grid.

The test database has been added to the device network target databases

The test database has been added to the device network target databases

16.Now we can create a test environment to be held in the test database.  To do this, click the Environments node in the left hand  pane to display the Environment Grid.  Right click in the grid and select New.  Enter a name for the new environment and select the newly created database to hold it.  Click Ok.  Click Yes in the displayed confirmation dialogue box to allow Persistate to create the tables etc. for the Persistate package in the new database.  Creating these objects takes a few moments, and then the new environment will appear in the Environment Grid.

Creating a test environment

Creating a test environment

17.Now we make our DeviceNetwork package available from in the new test environment.  To do this, expand the Environments node and click on the new test environment to display its Environment Form.  In the Available Packages grid, right click and select Add.  In the object selection dialogue, expand the domain, Environments and Production nodes, and click on the Product Packages node.  In the Selectable Objects pane, select Device Network and click Select.  Click Ok. The package appears in the Available Packages grid, and you now have a test facility for the package.
18.The final two steps are to make the server service the DeviceNetwork package in the test environment as well as the production one, and to give yourself permission to run it in that environment.  To do this, repeat steps 9. and 11. above  for the test environment rather than the production one.  You must then restart the server for this to take effect.  Simply click Stop Service, wait until it stops (this can take a while) then click Start Service again.
19.That's the end of this walkthrough.  You can continue now in the Installing and running the Persistate Viewer walkthrough where you will be able to run the DeviceNetwork package in both the production and test environments.