Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Various entities carry type stamps. A goal for instance has a creation time and an optional end time, an activity has a start and end time, etc. The convention is that all times are in UTC, except for activities. The design aims to support users that travel through different time zones. To enable that, the entities IntervalActivity and Activity carry a time zone. The start and end of day or week is thus time zone specific.

Cluster architecture

The cluster architecture of the system (both web traffic classification server and Yona server) is covered on a separate page.

Yona consists of 4 different services with different purposes:

  • App service – This is the sole point of contact for the app, providing all backing functions for it.
  • Analysis service – This service analyses the activities of the user and depending on the activity and the goals of the user creates entries in the activity log and/or sends messages to the user and their buddies. These activities are passed on to this service by either the Perl script on the Smoothwall server (in case of network activities) or the app service (in case of app activities)
  • Batch service – Runs scheduled tasks and longer running tasks. Longer running tasks can be triggered by the app service and the admin service.
  • Admin service – This is the point of contact for administrative access to Yona. This service exposes a rudimentary web UI.

The relationships between the services can be depicted as follows:

Image Added

All Yona services use the same database schema and they share a cache, synchronized through Hazelcast. Communication between the services (e.g. from the app service to the analysis service or the batch service) is always through HTTP.

To prevent concurrency issues, the requests of a single user cannot be spread over multiple instances of the analysis service. In case of a multinode cluster, we will need to have a load balancer in front of all services (to take care of load balancing and fail over) and in case of the analysis service, sticky sessions are needed. This is visualized in the below diagram:

Image Added

Note that the admin service talks to the batch service, so that should also be linked to the middle load balancer, but that's omitted from the diagram to prevent too much clutter.