EzyFox Server Architecture

EzyFox Server target to support to run multi services in one server so It will contain multi zones, multi apps and multi plugins

1. Overview

  1. A EzyFox Server will contain multi zones
  2. A zone will contain zone's user manager mutl apps and multi plugins
  3. An App will contain app's user manager
  4. A Plugin just handle events and client's requests

2. Server

A server contains:
1. A list of EventControllers
The list of events include:
You can config like this:
2. Session Manager to manage all sessions.
A session is one client connect to server. A session must be authenticated vi a LoginRequest and it also keep Ping Pong to keep the connection. EzyFox server will disconnect all unauthenciated and idle sessions.
An user can has one or many sessions and you can config this. If you allow an user has only one session you also config to kick current connected session and replace by new session (by config allow-change-session in zone's config)
You can config SessionManager like this:
3. A list of zone
You can use a zone to represent for a company or a list of your services. Example your company has many games and applications, maybe you want to create 2 zones, first one for games and second one for applications
To add a zone to ezyfox-server, you need create a zone's setting file like this and add it to ezyfox-server/settings/zones, let's say the file name is: your_zone_ettings.xml, now you need open file ezyfox-server/settings/ezy-settings.xml and add to zones tag:
You can read ezyfox-serer-setting.xsd to get list of ezyfox-server settings or read ezy-settings.xml to get an example

3. Zone

A zone contains:
1. A list of EventControllers
The list of events include:
you can config like this:
2. UserManager to manage authenticated users. You can setup user manager like this:
3. A list of Apps
Because app managed users so you should handle client's request here, but you should not call to an app from another app
You can add an app like this:
4. A list of Plugins
A zone should have at least one plugin to authenticate via USER_LOGIN controller (example), because there is only plugin can handle USER_LOGIN event and app can not.
Because plugin is started before app. It did not manage any user but it can access zone's information (user manager, list of apps) so it's suitable for:
  • Handle zone's event
  • Run background task like schedule or batch
  • Run task effect to all apps of zone
  • Broadcast message to all apps of zone
  • Get zone's information to collect statistics or do admin tools
You can add a plugin like this:
You can read ezyfox-server-zone--settings.xsd to get list of zone settings or read ezy-zone-settings.xml to get an example

Next step

We can try to use embedded server