3.3.4CMSCore service

The CMS service called CMSCore is the service managing all CMS resources. Those resources are the documents, folders, user, usergroups and usage privileges. This service should be the only one using the database service to store into and read from the database. It implements a change event API to allow change listeners to receive messages about changes in documents and folders. So a SearchCollector service can receive a document changed event and update the search index. Also the WebUI service listens to changes and updates the editors desktop.

For the best performance the CMS service holds the mostly needed resources in different memory caches so the access to them is as fast as possible. But there is never enough RAM compared to the capacities of database storage so the caches have to be restricted by the count of entries or memory usage. Some of the configuration keys are there to configure those cache sizes.

Property file and property key paths are:

Service properties file

<cmsWorks-installdir>/run/properties/cms.properties

Service property key paths

/app/cmsworks/service/cms/CMSCore/

 

Entry

(Standard) Value

Description

CMSDBName

CMSDB

The name of the database service.

AllowedSpecialCharsForNamingFolders

../htdocs/generator.std/

Folder names and document names are basically just some strings. But using them in URLs is restricting them to standard characters of the alphabet plus digits and the special characters '-._' without spaces which is mostly SEO relevant. With this list parameter more special characters may be allowed for folder names.

LangMessagesFilePath

../langmsg/

The CMSService provides translations for labels, terms and phrases that are used in the editors desktop or in content scripts. So this is the location of the translation files This is the name of the service that provides access to CMS documents

ResourceCacheSize

100000

The maximum count of cached documents. Reading a document from the database is quite expensive (it is slow and produces load on the database). The delivery of a document from cache is done is almost no time. But document contents sizes are very different so the count of documents in the cache has to be limited. There is no mechanism implemented yet that calculates the memory usage of a document so we have to stay with the entry count of the cache as limitation. While generating a website many documents will be used (many links for header- and footer-navigation, components, searchresults, configuration documents in category trees, ...) The documents of the most often called websites will stay long in the cache while other rarely used documents will be kicked from the cache.

ResourceCacheTypeLimits

 

Only these root paths are enabled as CMS folders where documents can be found to be generated. These paths have to be absolute beginning from root /

PublishedResourcesCacheSize

1024

The maximum count of cached published versions of documents that have additionally edited versions on top.

ResourceNameCacheSize

1000000

The query to retrieve all documents from a folder is quite expensive. Mostly not all documents are need just the names of those documents when accessing one by name or creating a new or renaming. The access to names of documents of a folder is supported by a ResourceNameCache. This key sets the maximum count of cached document names of folders. This cache is also quite often used when finding the document for an URL request.

BlobCacheSize

10000

The maximum count of cached blob values from documents blob properties. In most cases this cache provides fast access to pictures of the currently most called pages of the website. This cache uses by far the most RAM. Just limiting the RAM usage by the count of entries is not good enough when the cache entries are of different sizes. The key BlobCacheMemory also limits the BlobCache size.

BlobCacheMemory

1500

The maximum memory usage in Megabyte the BlobCache can hold in memory.

Customer

mywebsite

This name is used for subfolder names for editors desktop configuration (<WebUIs Htdocs path>/cmsdesk.custom/<Customer>) and content scripts (<ScriptServers Htdocs path>/<Customer>).

ParallelStoreReadingCount

10

The count of parallel threads that are allowed to read from the database.

LockResourceTimout

180000

Only one user can edit a document at a time. But if the connection to the editors desktop is broken this is the time (in milliseconds) the documents stays locked. After that the lock is released and any other user can edit this document now. The latest stored version of the content stays.

Here is a full example of the CMSCore configuration:

# ###################################################################################
# 
# Properties for the cms kernel service
#
# ###################################################################################

/app/cmsworks/service/cms/CMSCore/StartTimeout=1000000
/app/cmsworks/service/cms/CMSCore/StopTimeout=10000
/app/cmsworks/service/cms/CMSCore/AccessTimeout=1000
/app/cmsworks/service/cms/CMSCore/StopInformExtern=1
/app/cmsworks/service/cms/CMSCore/LogLevel=fatal error info debug

/app/cmsworks/service/cms/CMSCore/CMSDBName=CMSDB
/app/cmsworks/service/cms/CMSCore/AllowedSpecialCharsForNamingFolders=
/app/cmsworks/service/cms/CMSCore/LangMessagesFilePath=../langmsg/
/app/cmsworks/service/cms/CMSCore/ResourceCacheSize=40500
/app/cmsworks/service/cms/CMSCore/ResourceCacheTypeLimits=
/app/cmsworks/service/cms/CMSCore/PublishedResourcesCacheSize=1024
/app/cmsworks/service/cms/CMSCore/ResourceNameCacheSize=100000
/app/cmsworks/service/cms/CMSCore/BlobCacheSize=10000
/app/cmsworks/service/cms/CMSCore/BlobCacheMemory=1500
/app/cmsworks/service/cms/CMSCore/Customer=mywebsite
/app/cmsworks/service/cms/CMSCore/ParallelStoreReadingCount=10
/app/cmsworks/service/cms/CMSCore/LockResourceTimeout=180000

Configuration example of the CMSCore service, the service handling all CMS resources