The DreamServer Process handles messages from the DreamManager clients. This includes queries for browsing the information and change storage and broadcast to connected clients. HSL also has an interface to create new tasks by sending a message to this server.
A unique aspect of this server is that it can be configured to communicate to any number of Worlds. The idea is to use the same DreamServer for all of the worlds that have the same content, so the task, team, and user information is shared.
To view or modify the DreamServer's process, use the Master Control Console. There is generally only one DreamServer process per game.
Building the Dream Server
Non-source code licensees
As a non-source code licensee, this executable will be provided.
Source code licensees
For source code licensees, this executable is built by the HJServers solution in $/hjservers/ where "$" represents the root of the branch.
Deploying the Dream Server
Unless you are upgrading a pre-1.19 installation of HeroEngine, skip this step.
There are two steps to prepare for a deploy of the new servers.
The first is to edit the WISE install script. The script to be edited is probably HJServersHE2.wse. There are 2 registry keys that may not be present. The fireup daemon requires these registry keys to locate the server executables it can start up. There will be a section in the install script that edits registry keys. That line can be copied, and pasted into a notepad window. Search the text for the registry keys listed below. If they are not there, they can be added just before the end. Make sure to also edit the total keys line to be 2 larger than it was previously. After making these edits, select the entire contents of the notepad, and copy and paste that back into the install script. The install script should now have a new line of text that indicates it should edit 26 total registry keys. The previous line that only edited 24 registry keys can be removed.
----Beginning of notepad buffer---- item: Edit Registry Total Keys=26 <---- I changed this from 24 to 26 ... ---- These two keys could be missing, and can be added just before the last end in the notepad buffer---- item: Key Key=SOFTWARE\Simutronics\Applications\DREAM_SERVER New Value=DreamServer.exe Value Name=Executable_name Root=2 end item: Key Key=SOFTWARE\Simutronics\Applications\DREAM_SERVER New Value=%MAINDIR%\ Value Name=Executable_path Root=2 end
The second step is to reconfigure the Deploy Server so that it will deploy the new files. Open up the Deploy Server Client, and edit the deploy configuration for the server deploy corresponding to the WISE file that was edited. Select the FILES configuration value and edit the values, making sure they include the following files:
DreamServer.exe DreamServer.pdb -o
Then, edit the REVERSION_EXES configuration to include the new server executable, DreamServer.exe.
Configuring a World to Use the Dream Server
These instructions apply to HeroEngine version 1.19 and above.
There are 2 situations here. You can either setup a new independent DreamServer (and associated database) or configure an existing DreamServer to service additional worlds.
A New Independent DreamServer
The database schema will need to be imported.
In SqlPlus, connect to HE_ADMIN, and run the following code (replacing the value strings with strings appropriate for your installation):
The longer version, if you need more control over the import is:
exec setup.import_dream_manager(to_prefix_in => 'OPTIONAL_PREFIX', filename_in => 'filename', from_prefix_in => null, jobname_in => 'IMPORT_DREAM_MANAGER', directory_in => 'DATA_PUMP_DIR', overwrite_in => FALSE, debug_in => FALSE);
- to_prefix_in will be prepended to DREAM_MANAGER to determine the schema name in the database, e.g. TEST will produce a schema of TEST_DREAM_MANAGER. A null or empty string will produce simply DREAM_MANAGER.
- filename_in is the filename of the import data, minus the .dat extension.
- from_prefix_in will be prepended to the source schema name. In most cases, this should be null, which is the default.
- jobname_in defaults to IMPORT_DREAM_MANAGER. The default is fine unless there is already a job by this name, in which case it can be overridden.
- directory_in specifies the directory object that points to the filesystem directory where the import file resides.
- overwrite_in defaults to false. Setting it true will cause any existing user that matches the to_prefix, as well as the associated tablespace to be dropped and recreated. Be VERY careful about setting this to true.
- debug_in defaults to false, setting to true echoes some additional debug messaging during the import.
The new server needs to be configured:
In SqlPlus, connect to FS_SERVICE, and run the following code (replacing the value strings with strings appropriate for your installation): set serveroutput on declare v_status varchar2(8); v_msg varchar2(32767); begin quick_setup.dream_manager(status_out => v_status, msg_out => v_msg, universe_name_in => '<universe name>', service_name_in => 'DREAM_SERVER', fireup_name_in => '<fireup name>', server_fullname_in => '<host machine name>', connectstring_in => 'firstname.lastname@example.org/hedb', ignore_warnings => false); dbms_output.put_line('Status: ' || v_status); dbms_output.put_line('Message: ' || v_msg); end;
- universe_name_in is the name of the second-tier leaf in master control, under the "FireStorm" root, that you want to locate the dream manager service. If it doesn't already exist, it will be created.
- service_name_in is the name you want to use for the third-tier leaf in master control. Again, if it doesn't exist, it will be created.
- fireup_name_in is the name of the fireup daemon where you want the dream manager server to run. If it doesn't already exist, this procedure will create it, using the server_fullname_in parameter.
- server_fullname_in the fully qualified hostname of the machine where the dream manager executable will be running.
- connectstring_in the connect string used to connect to the database, substitute your specific schema name, password, and database server hostname.
- ignore_warnings should, unless specifically instructed otherwise, be left as false. It tells the procedure to abort if certain items are not already defined in master control.
After all the configuration changes, issue a /shutdown command to Master Control to reload the configurations from the database.
Configuring to Service Additional Worlds
The process supports an optional parameter specifying a list of connect strings for additional worlds it will service. The parameter name is DreamManagerMatrixTransports. The connect strings are something like tcp:machine.company.com:63333, and should match the world's defaultPORouterTransport parameter. Multiple connect strings must be separated by a pipe character (|).
After making the configuration change, issue a /reset command to Master Control to pick up the new value.
The process must be restarted to read the configuration.