Web ClayStation is a Web application, a Web version of the ClayStation client which provides the most important features of a Clay client through a standard Web-browser. It consists of:
Web ClayStation is a complementary solution and technology to the desktop version of Digital-Clay clients, offering the advantages of a Web client for those that need it. See the article Desktop vs. Web Clients for an in-depth discussion on the advantages and disadvantages of both approaches, and the specific uses, scenarios and goals that apply to each solution.
The Web ClayStation is meant to be used by employees and managers but not administrators. As such, it provides all the Digital-Clay tools necessary for viewing and changing data, but no administration, system and profile customization tools.
The following Digital-Clay tools and features are missing or limited and should be accessed using ClayStudio/ClayStation desktop clients:
This section is for administrators and integrators wishing to get a deeper understanding of the design and architecture of the Web client for troubleshooting purposes.
The diagram on the right presents the layered architecture stack of the Digital-Clay platform and the exact positioning of the Web Clay module and server. Note that:
FastCGI is a standard and widespread extension of CGI available since 1996 that corrects some issues and limitations of CGI:
Which all adds up to greatly increased performance. In addition, the FastCGI specifications allow for the following communication enhancements:
In reality, different Web-servers implemented varying levels of the specifications, so although the Clay FastCGI module supports all of the above mechanisms, its capabilities depend on the specific Web-server that was installed.
Note that technically, it is a separate web module that enables FastCGI on the Web-server therefore there may be several available options for one Web-server (e.g. Apache), or it may even be installed automatically with the Web-server (e.g. IIS7). See the FastCGI Site for more details.
This is the simplest scenario most suitable for a company that hosts everything internally and that usually doesn't have too many concurrent requests or heavy CPU usage on the server:
If the Web-server supports FastCGI multiplexing or multiple Pipe connections, then this configuration can handle concurrent requests. However, some Web-servers in practice (including IIS and Apache) can only only handle one request/Pipe connection per process therefore multiple requests will be queued and handled one at a time in this scenario.
This scenario is for better performance as well as for handling concurrent requests on any Web-server:
This scenario demonstrates a case where the Web-server is running on a separate (hosted? Unix?) server and therefore must communicate with Clay remotely.
Note that some Web-servers like Microsoft IIS do NOT support remote FastCGI via TCP/IP!
The quick overview to installing Web ClayStation is as follows:
Configuring the Web-server and its FastCGI module is very specific to the server in question as well as the configuration scenario. The typical approach is to add a (virtual or physical) file that is redirected to the claycgi.exe executable. This is usually done by mapping a specific file extension (e.g. .dcw) to the claycgi.exe executable using the FastCGI or Web-server configuration file or tool. Other key points that may arise are:
Permissions:
Configuration settings:
This is the latest and fastest official FASTCGI module that is included in Apache 2.4+. It supports only TCP/Remote connections (which are faster).
Sample/recommended configuration of httpd.conf file with full comments/explanations (Windows)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
<Proxy "balancer://clay">
BalancerMember "fcgi://127.0.0.1:2010/" retry=0 timeout=180 acquire=30000 connectiontimeout=30
ProxySet maxattempts=30 forcerecovery=On timeout=30
</Proxy>
<IfModule mod_proxy_fcgi.c>
<Location /clay.dcw>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass balancer://clay
</Location>
<Location /claysso.dcw>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass balancer://clay
</Location>
</IfModule>
Explanation for ProxyPass or BalancerMember settings:
Proxy balancer settings set globally via ProxySet:
See mod_proxy_fcgi and mod_proxy for configuration options.
To configure the claycgi module itself running independently in TCP mode as a Windows service, see Clay Configuration below.
mod_fcgid is a fastcgi module developed by the Apache project team but currently it does not yet support TCP/remote mode and it performs slower than the other modules. It works with Apache 2.4+.
Pipe/local mode with four spawned processes:
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>
FcgidMaxProcesses 4
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidIdleTimeout 0
FcgidIOTimeout 60
FcgidConnectTimeout 60
FcgidInitialEnv CLAYCGI_MODE Pipe
FcgidInitialEnv CLAYCGI_MULTIPROCESS 1
<Location /clay.dcw>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
SetHandler fcgid-script
FcgidWrapper "C:/Program Files/Digital-Clay/Web/claycgi.exe" .dcw virtual
Options +ExecCGI
Order allow,deny
Allow from all
</Location>
</IfModule>
See mod_fcgid Reference.
IIS7 and up includes the FastCGI module as part of the Web Server and must be configured using the built-in configuration tools. See the following links for general guidelines:
If the FastCGI Settings module does not appear, you must install the Administration Pack for IIS7.
The general steps are:
A Web Clay FastCGI process is configured using either command line parameters, or environment variables, or both. Command-line settings override environment variables but can use an environment variable to temporarily set a setting for the WebClay service, such as the loglevel. These two options are provided to accommodate different Web-servers' capabilities.
Command-line variables can be added to the WebClay service by editing the registry value for the 'Command' entry under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClayStation\Parameters
Any configuration setting listed below can be converted to an environment variable by prepending CLAYCGI_ and converting it to uppercase (e.g. -mode becomes CLAYCGI_MODE).
-mode (Required)
Values: Either 'TCP' or 'Pipe'. This defines what method the Web-server will use to communicate to the Web Clay FastCGI module.
If this parameter is missing, the process will exit.
-multiprocess
Defines whether this module is running in a multiprocess scenario and is one of many processes and should therefore use a singleton server process for handling requests. See Sample Configurations above for an explanation of this scenario.
Default: (off)
-port
The port to listen on if using TCP communications only.
Default: 2010
-resurl
The URL path/location on the web site where the Clay resource files are located.
Default: /clayres/
-addonurl
The URL path/location on the web site where addon html files are located. This is only needed if addon html files are used inside layouts, etc. that use the default addon location parameter in their URL (see Add-Ons/External GUI).
Default: /clayaddons/
-clayserver
The IP of the ClayCentral machine.
Default: 127.0.0.1
-clayport
The port used by ClayCentral.
Default: 1007
-deflang
The default language to use (e.g. 'EN') for the login screen and as a default for all users (note that each user can override this setting with his own language in the options).
Default: The default language set in the Windows Regional Settings.
-reqtimeout
The maximum amount of seconds to wait for responses from ClayCentral before timing out and returning an error to the user.
Default: 50 seconds
-conntimeout
The maximum amount of idle minutes to allow a user before he is disconnected from ClayCentral. This is necessary in case the user forgets to logout before he closes the Web-browser.
Default: 30 minutes
-maxthreads
The maximum amount of internal threads to spawn for handling multiple concurrent requests. Keep in mind that too many threads may impede performance but many threads may be simply waiting for responses from ClayCentral.
Default: 10
-ssokey
This is mandatory if using Windows Single-Sign On as the authentication method for WebClay clients (web browsers). This is a secret key that is only shared between ClayCentral and WebClay. The same value must be configured both in ClayCentral settings ('WebClay SSO Key'), and in WebClay using the ssokey setting. It can be any value the admin chooses.
-webips
A security setting for limiting which IPs can connect to this FastCGI process via TCP. This is to block any connection/hacking attempts from outside the web server. The value is a semi-colon separated list of IPs.
Default: (Empty - i.e. all can connect)
The users logging in through the Web ClayStation will receive either default profiles, or the profiles configured and saved using Profile Management tools in ClayStudio, or the profile the user himself saved in a desktop client using 'Save My Profile'.
For more details on customizing a user's toolbar, homepage, settings and layouts, see Profile Management.
Errors while running the Clay WebStation must be differentiated as follows:
This means that the expected response is received without any errors, but the response was exceedingly slow. As explained below, this usually should be distinguished from time-out errors which may be due to bugs or non-performance related problems. With performance issues, the bottleneck must be found which may be due to a variety of sources including: The client machine or operating system, the internet connection, the bandwidth, the web server, faulty network cards, routers or cables, the server hardware, slow network software such as firewalls, VPNs and QOS/packet shapers, and finally, an overloaded FastCGI module, ClayCentral or database. Each of these can be ruled out by a process of elimination or by using standard network and hardware troubleshooting techniques.
An application error should be differentiated from a time-out error: A time-out response usually takes a long time (40 seconds or more) and may be mistaken for a performance issue if the user doesn't wait for the time-out to occur (e.g. he hits refresh before the time-out error appears); An application error is usually received within a few seconds.
Both of these errors may come from different sources. It is important to understand each the following elements so that the proper source is troubleshooted and the appropriate administrator called. The elements that may return errors are: Browser→Web Server→FastCGI→ClayCGI→ClayCentral:
Summary: A time-out error only appears if the user waits for it, and it may be either due to bugs, OR performance problems. An application error is almost always due to misconfigurations or bugs. Slow responses are almost never bugs.
When checking the web-server or ClayCGI log files (\Program Files\Digital-Clay\Web\ClayCGI.log), always compare the timestamp of the errors to the time the problem occured to ensure that the log entries are relevant.
Due to the fact that every Web-server and FastCGI module is different, troubleshooting the FastCGI configuration is usually a system-dependent matter. But try the following checklist:
The workload of a Web Claystation request is typically distributed over 4 levels and each one of these levels (or the networking speed between them) may become a bottleneck:
Obviously, the better the underlying hardware such as CPU, memory speed, and FSB speed, the better the response times from ClayCGI. It is also important to have fast networking speed between ClayCGI and ClayCentral since large amounts of data are transferred between them. For this reason, it is not a good idea to host the ClayCGI externally and have it connect to a ClayCentral on a LAN, unless performance is not a concern.
On systems with many concurrent requests, increased performance can be achieved by separating ClayCGI and ClayCentral to two machines, and possibly also separating the Web Server and ClayCGI to different machines (using TCP FastCGI comms with Apache for example), as long as the network between these machines is sufficiently fast.
Besides hardware and machine topology, an important factor for performance is the amount of processes and threads. Note that there are three elements that define the amount of concurrent requests that can be handled:
The ideal amount of ClayCGI processes/threads obviously depends on too many variables, but a recommended starting point is as follows:
Minimum 3, maximum 2 more than the amount of CPUs. So, for example, if you have a Quad-CPU system, and maximum concurrency is important, set the processes/threads setting to 6.
For assistance with fine-tuning these settings, some very basic statistics are collected and placed in the C:\DigitalClay\ClayCGI\ folder as .csv files. These files may be used to monitor average response times after adjustments are made. Contained in these files (one file per month) are the following columns for analysis:
To get the total response time, calculate Activity Duration + Central Duration. To get the average response time, calculate Total / Activities. To test performance for example, make adjustments, and compare the average response times before and after.