aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/nelns/HOWTO?rev=1.2&content-type=text/x-cvsweb-markup&only_with_tag=HEAD/index.html
blob: bf411e02797637886c9da806d1c5cc18215a7ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD><style>		A { color:black }</style>
<!-- hennerik CVSweb $Revision: 1.93 $ -->
<TITLE>code/nelns/HOWTO - view - 1.2</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee">
<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="HOWTO?only_with_tag=HEAD"><IMG SRC="/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="HOWTO?only_with_tag=HEAD">HOWTO</A>
 CVS log</b> <IMG SRC="/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to  <a href="/cvs/cvsweb.cgi/?only_with_tag=HEAD">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=HEAD">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=HEAD">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File:  <a href="/cvs/cvsweb.cgi/?only_with_tag=HEAD">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=HEAD">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=HEAD">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/HOWTO?only_with_tag=HEAD">HOWTO</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/HOWTO?rev=1.2&amp;only_with_tag=HEAD" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/HOWTO?rev=1.2','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
Revision <B>1.2</B>, <i>Thu Oct  4 15:49:12 2001 UTC</i> (9 months, 2 weeks ago) by <i>lecroart</i>
<BR>Branch: <b>MAIN</b>
<BR>CVS Tags: <b>HEAD</b><BR>Changes since <b>1.1: +3 -5
 lines</b><PRE>
CHANGED: must be updated again
</PRE>
</td></tr></table><HR noshade><PRE>NEVRAX NeL Network Services Howto
23/01/2001 <A HREF="mailto:cado@nevrax.com">cado@nevrax.com</A>
$Id: HOWTO,v 1.2 2001/10/04 15:49:12 lecroart Exp $
----------

The NEVRAX NeL Network Services is made up of one unique login service, one or
several shards (aka game servers), and a few utility services.
In this document, we'll assume you want to run your login service
and one shard on the same machine.

You can't launch more than one shard on a computer.

Services are compiled in debug mode by default.

Once you have compiled the servers, you should have the following files
(shown in Unix naming scheme, for Windows add &quot;.exe&quot;) in a single
directory (let's call it homedir/bin):
naming_service &nbsp;-&gt; used to find a specific service by its name
time_service &nbsp; &nbsp;-&gt; centralized time reference manager
login_service &nbsp; -&gt; centralized user account manager for all shards
(admin_executor_service -&gt; collects system stats 
(agent_service &nbsp;-&gt; agent message router


1. In the working directory (e.g. homedir), create the following files
(don't type the lines beginning with &quot;-&quot;)

-- ns.cfg --
Host = &quot;hostname_of_your_machine_where_naming_service_will_run&quot;;
Port = 50000;
------------
(This file is used by all services)

-- ls.txt --
Shards = {
 &quot;hostname_of_your_machine_where_game_service_will_run&quot;, &quot;Name of the shard as it will appear on the client&quot;
};
------------
(This file is used by login_service)


2. Launch the servers.
Here is a sample batch file, where you can find the right ordering :

-- starts --
nohup ~/bin/naming_service &gt;/dev/null
nohup ~/bin/time_service &gt;/dev/null
nohup ~/bin/login_service &gt;/dev/null
echo &quot;Active services:&quot;
ps -edf | grep _service | grep -v grep
echo &quot;End services&quot;
------------

3. To connect a client to your new shard, set
LSHost = &quot;hostname_of_your_machine_where_login_service_runs&quot;;
in its client.cfg
and create ns.cfg with the same contents as for the servers.
Then launch the client and enjoy :-)


4. The services create/modify the following config or log files:
- unitime.cfg (time_service)
 &nbsp;Contains the time reference
- ls.txt (login_service)
 &nbsp;Every time a new user (not registered before) logs in, its login
 &nbsp;and password are saved into ls.txt
- ls.log (login_service)
 &nbsp;Every time someone logs in, its configuration information is
 &nbsp;saved into ls.log
- log.log (very big especially if you have compiled the servers
 &nbsp;with NL_DEBUG defined)
 &nbsp;Contains all debug information sent by the services.


5. How to shutdown the services
Here is a sample batch file:

-- kills --
kill -INT `ps -edf | grep bin/login_service | grep -v grep &nbsp;| tr -s &quot; &quot; | cut -d' ' -f2`
sleep 1
kill -INT `ps -edf | grep bin/time_service | grep -v grep &nbsp;| tr -s &quot; &quot; | cut -d' ' -f2`
sleep 1
kill -INT `ps -edf | grep bin/log_service | grep -v grep &nbsp;| tr -s &quot; &quot; | cut -d' ' -f2`
sleep 1
kill -INT `ps -edf | grep bin/naming_service | grep -v grep &nbsp;| tr -s &quot; &quot; | cut -d' ' -f2`
-- kills --

</PRE>