FotoWeb services and system architecture
This article explains what the FotoWeb services are and how they work.
FotoWeb architecture
FotoWeb has an architecture designed from the bottom up for stability and performance. The main logic in FotoWeb takes place inside four different services that are installed on your server. These services are started automatically by the operating system after a restart of the server. These services depend on each other in the following manner:
You can control these services through the Service Control Manager (SCM), a part of Windows. You can find it under Administrative Tools in the control panel, or hit the Windows key and type Services to locate it.
The main tasks in FotoWeb have been divided over this set of services. This ensures that only one component is affected in the event of an unexpected failure. The other will continue to run normally.
FotoWeb Server Service
The FotoWeb Server service is the main service where the page processing takes place. This service is responsible for handling every request that is made by users through a web browser and return appropriate HTML code to interact with the user. The FotoWeb Server service depends on all the other services to be able to perform its tasks.
FotoWeb Session Manager Service
The FotoWeb Session Manager Service is responsible for keeping track of user sessions. All sessions are created, handled, and deleted by this service. It holds information about the number of guest and user sessions created, the number of requests made per session, session expiry times, and the maximum number of allowed sessions per site and user. All other services communicate with Session Manager to get session information and request updates.
FotoWeb MongoDB Server service
MongoDB is the database that FotoWeb uses to persistently store most data, such as asset metadata, users, and albums. It is required for FotoWeb to function.
FotoWeb Workflow Service
The Workflow service handles all workflow and contact sheet requests. Once a user creates a workflow request, the FotoWeb Server service posts this request to Workflow service and continues processing other user requests. The Workflow service picks up the request in the background and processes it at its own pace.
This separation is created to allow processing of ‘heavy’ workflow requests in the background without affecting the performance of FotoWeb Server.
FotoWeb Service Engine
The FotoWeb Service Engine consists of several sub-services continuously performing different tasks in the background. The sub-services started by the Service Engine are as follows:
System log service
This service handles all status events posted by FotoWeb modules and writes them to their designated locations, such as FotoWeb system log, Fotoware log server, and Windows Event log.
Event log service
This service handles all activity events posted by FotoWeb modules and writes them to their designated locations and formats, such as FotoWeb log files and FotoWeb database. The events this service handles are defined in Site | Properties | Activity logging.
Mail service
This service is responsible for processing email requests made by different FotoWeb modules.
Task scheduler
This service is responsible for executing and processing different tasks defined in FotoWeb, such as cache cleanup, keyword extraction, log flushing etc at their scheduled times.
Crash report handler
This is an on-demand sub-service that automatically starts whenever a crash occurs in any of ‘exe’ based FotoWeb modules. The service collects the required information about the crash, creates XML files describing the crash, and compresses these files into a final ZIP file along with the ‘minidump’ written by the crashing module. Finally, the service sends email notifications (if enabled) and uploads the crash report to Fotoware (if enabled, requires a unique system ID from Fotoware). If the crash report is successfully uploaded, it is deleted from the system. A maximum of 20 newest (not uploaded) crash reports are kept on the disk to minimize disk usage, while the oldest ones are deleted automatically.
The crash reporter utility is located at C:\Program Files (x86)\Common Files\Fotoware\Crash Reporter 1.0
Process monitoring
To ensure that the system can recover in the event of failures, a ‘mother process’ is watching all the processes. This mother process will check that the processes are running as expected through various checks. If a process fails to respond or stops unexpectedly, it will automatically be restarted.
If a process fails repeatedly, FotoWeb will eventually stop the service. This makes it possible for the administrator to take action or ask the operating system to automatically perform an action, e.g. restarting the server.
This can be set up through the Services application in Administrative Tools. Find the service you want to control, right-click, and select Properties. The Recovery tab lets you control these options.
FotoWeb and Internet Information Services
FotoWeb is dependent upon the Microsoft Internet Information Services. IIS provides the web service functionality for FotoWeb. All requests to FotoWeb are routed through the FotoWeb ISAPI18 modules. An ISAPI module can be compared to a CGI program, but an ISAPI module stays in memory as long as the web server is running. This means the FotoWeb modules have less overhead than a traditional CGI program and will work with much higher performance due to the close integration with IIS. The FotoWeb ISAPI modules are placed in the ‘bin’ folder.
When a request to a FotoWeb page is received by IIS, the request is sent to the ‘fotoweb_isapi.dll’ module. This module will then open a connection to the FotoWeb Server service, which handles all the requests to FotoWeb. This architecture means that in the case of a failure in FotoWeb, IIS is not affected and vice versa.