Location: PHPKode > projects > Laffer > modules/server/docs/horeMAG-tables.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
  <title>horeMAG-tables.html</title>
</head>
<body>
<img src="file:///home/s_karadjov/Documents/forn_server.jpeg"
 title="Front Server" alt="" style="width: 83px; height: 98px;"
 align="left">The first server that the client meets is the <span
 style="font-weight: bold;">Front Server</span>. This server holds
information about users and message servers.<br>
The information for the user is: <br>
<ul>
  <li><span style="font-weight: bold;">IM_USER</span> - id, login,
password</li>
  <li><span style="font-weight: bold;">IM_USER_PERMISSION - </span>user,
permission_id</li>
  <li><span style="font-weight: bold;">IM_USER_SETUP</span> - user_id,
name, value<br>
  </li>
</ul>
<br>
Contact List information<br>
<ul>
  <li><span style="font-weight: bold;">IM_USER_GROUP</span> - owner_id,
group_id, group_name, user_list</li>
  <li><span style="font-weight: bold;">IM_USER_USER</span> - owner_id,
user_id, screen_name, xbit</li>
</ul>
The information about the servers is:<br>
<ul>
  <li><span style="font-weight: bold;">IM_SERVER</span> - type,
address:port, load, status, private_key, suported_protocols =
0.1,0.2,...,X<br>
  </li>
</ul>
When user is served by some server the information i written down to:<br>
<ul>
  <li><span style="font-weight: bold;">IM_USER_LOCATION - </span>user_id,
connected = 0,1, created, served_by = server:port, magic_cookie,
protocol_ver, program_initials, user_ip<br>
  </li>
</ul>
<br>
<br>
<img src="message_server.jpeg" title="Message Server" alt=""
 style="width: 88px; height: 89px;" align="left">The Message Server is
the second server that the client meets. This is the server that is
responsible of redirecting instant messages through the whole network.
This server keeps information about the users served by it:<br>
<ul>
  <li><span style="font-weight: bold;">IM_SERVER_USER</span> - user_id,
screen_name, magic_cookie, user_ip, contact_list =
encoding;[Group_name1,Group_ID1|Group_name2,Group_ID2..];[User_Name1,
User_ID_1, {Group_ID1,Group_ID2,..}], user_permission, created<br>
  </li>
</ul>
Also every MS server keeps information about the users in the contact
list of the client it is serving<br>
<ul>
  <li><span style="font-weight: bold;">IM_USER_LOCATION </span>-
user_id, server:port, status=ONL, IDL, OFF, BSY, last_action = time of
the last event received from this user</li>
</ul>
This server holds information about the messages and the sessions<br>
<ul>
  <li><span style="font-weight: bold;">IM_EVENT</span> - unique_id,
TYPE, CMD, TO_ID, FROM_ID, ATTRIBUTE, time</li>
  <li><span style="font-weight: bold;">IM_SESS</span> - unique_ID,&nbsp;
USeR_ID, CREATED, LASTACTION, IN_BOX, USR_PERMISSION, USER_AGENT = , STAT</li>
</ul>
When the client tries to enter MS the MS server checks his/her
credentials and it they are ok it creates IM_SESS record and deletes
IM_SERVER_USER record<br>
<br>
</body>
</html>
Return current item: Laffer