Back to home page

Enduro/X

 
 

    


0001 TPCACHESV(8)
0002 ============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpcachesv - Enduro/X real time cache management server
0009 
0010 SYNOPSIS
0011 --------
0012 *tpcachesv*
0013 
0014 
0015 DESCRIPTION
0016 -----------
0017 This is special XATMI server used for supporting cluster operations
0018 when receiving event of message adding or removing from other cluster nodes caches.
0019 Also this server is backend for command line tools such as 'xadmin cs' (cache
0020 show), 'xadmin cd' (cache dump) and 'xadmin ci' (cache invalidate).
0021 
0022 For cluster operations, cache server subscribes to events specified in 'subscr'
0023 parameter for database. Per cluster node service name are fixed. Thus servers
0024 shall be booted with all CC tags set, so that it would have a visibility of
0025 all databases. Full visibility is required for command line tools processing
0026 and incoming event processing. Multiple copies of server can be booted. They 
0027 all will subscribe to same events. The *tpevsrv* will ensure the single event
0028 delivery is performed to the same service name.
0029 
0030 During the event processing, following events can be consumed (by regexp mask
0031 they can be combined):
0032 
0033 . @CPNNN/F*/S+ - event is received if new data is put to cache. The data buffer
0034 includes full message which is being cached.
0035 
0036 . @CDNNN/F*/S+ - event is received when data is being deleted from cache. The
0037 delete is generated either from *tpcached* (when records reaches limit,
0038 expires or service is not available. In this case full or subset of message
0039 is broadcasted (according to 'delete' parameter of service cache definition). The
0040 delete message is processed according to local cache definition. Service is found
0041 and then record is matched according to rules. This event also can be received
0042 in cases when "invalidate their" cache performs invalidate. If flags (F*) contains
0043 letter 'G', then if record is part of keygroup (it is key item), then whole group
0044 is deleted.
0045  
0046 . @CKNNN/F*/D+ - drop (kill) the database. This event is published when from
0047 xadmin tool *xadmin ci -d D+", the database is being dropped. The event notification
0048 contains NULL buffer. The 'D+' is database name. Note that in case of
0049 keygroup (between group db and key item db) there no linkage. So drop will clean
0050 up the database specified, and not any linked record or db.
0051 
0052 . @CMNNN/F*/D+ - delete database (D+) records by regular expression mask
0053 over the cached keys. The data buffer sent with this event is *UBF* typed,
0054 which contains one field 'EX_CACHE_OPEXPR' - regular expression mask to
0055 match keys with. If key is matched, then record is deleted.
0056 
0057 . @CENNN/F*/D+ - delete records by key. The database name is encoded in 'D+'.
0058 The key to delete is encoded in event buffer, which is *UBF* type. Field
0059 'EX_CACHE_OPEXPR' keeps the key to delete. Before deleting record, it is
0060 read from database. The flags are checked for record. If record is part
0061 of the keygroup and it is keyitem. Then data buffer is recovered from data
0062 and group key is built. Key group is updated (key removed) and key item
0063 is removed from item db.
0064 
0065 *tpcachesv* server advertises following services:
0066 
0067 . @CACHEEVNNN - event processing target.
0068 
0069 . @CACHEMGNNN - 'xadmin' command back-end.
0070 
0071 
0072 The above 'NNN' stands for cluster node id, prefixed with zeros.
0073 
0074 DEFINITIONS
0075 -----------
0076 *Keygroup* is separate database where records can be grouped. For example 
0077 by user id. The group record holds the *UBF* buffer with string key occurrences
0078 which are linked in the group.
0079 
0080 *Keyitem* is linked record to the group.
0081 
0082 
0083 EXIT STATUS
0084 -----------
0085 *0*::
0086 Success
0087 
0088 *-1*::
0089 Failure
0090 
0091 BUGS
0092 ----
0093 Report bugs to support@mavimax.com
0094 
0095 SEE ALSO
0096 --------
0097 *ex_env(5)* *ex_adminman* *tpcachebtsv(8)* *xadmin(8)* *tpcached(8)*
0098 
0099 
0100 COPYING
0101 -------
0102 (C) Mavimax, Ltd
0103