Páginas filhas
  • CTree Bound Server with memory files

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

CTree Bound Server with memory files

How to configure a balance of load using C-Tree Bound server with files in memory

Product:

Microsiga Protheus

Versions:

11 and 12

Step by Step:

C-tree BoundServer (c-tree Server DLL) is, basically, a c-tree server that starts along (embedded) with Protheus Server. We recommend its use in environments in which only one Protheus Server is used as application server, in which the access to dictionaries is not shared with other Protheus servers. You can configure it to load dictionary files (SXs) in the memory, making the access faster. See below reference links of C-tree BoundServer documentation with technical information: c-tree BoundServer {+}http://tdn.totvs.com/display/tec/c-tree+BoundServer+ c-Tree Server with SXS in memory {+}http://tdn.totvs.com/pages/viewpage.action?pageId=208338982+ Section cTreeServerMaster {+}http://tdn.totvs.com/pages/viewpage.action?pageId=208338976+ Below the procedure showing how to configure the file appserver.ini and ctsrvr.cfg (of the folder Appserver) to use the C-Tree Bound Server with memory files:
Notice:
Only tables informed in the .ini configuration are notified by that Protheus server. In this configuration, specify the extension of the table. Only ISAM tables of the Ctree are specified. The notification system is not ready to work with files Superfile type (.SPF extension).
Important:
1. It is recommendable the binary to be updated.
2. Do not mix configuration files "ctsrvr.cfg" of CtreeServer with BoundServer. In the most recent versions of the binary, this files comes along with the Appserver folder
Note:
The Bound Server also uses Ctree licenses, as well as the Ctree Server. For further information on how to apply the key, check this link:
Application for License (ctreecsv.dll)

  • Copy the root folder of the balance of load, with folders "Appserver" of the Master and the Slaves - Below an example of configuration of files:
    APPSERVER.INI (MASTER)
    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c705332a-a197-476b-b43e-6307724ea680"><ac:plain-text-body><![CDATA[General] \]></ac:plain-text-body></ac:structured-macro>
    InstallPath=C:\TOTVS 12
    CtreeMode=boundServer
    Consolelog=1

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="38c3eb49-9f22-4270-b982-37ea502f319c"><ac:plain-text-body><![CDATA[Drivers] \]></ac:plain-text-body></ac:structured-macro>
    Active=TCP

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="46eb4d4f-99e2-4441-bf12-c85524e277e0"><ac:plain-text-body><![CDATA[TCP] \]></ac:plain-text-body></ac:structured-macro>
    TYPE=TCPIP
    Port=1270

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="78516a89-2a7b-4db7-8d33-9d6cec3a8c1a"><ac:plain-text-body><![CDATA[LICENSECLIENT] \]></ac:plain-text-body></ac:structured-macro>
    Server=localhost
    Port=5555

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="da5c980e-b53c-4d01-ba43-0003f8cbaa75"><ac:plain-text-body><![CDATA[P12] \]></ac:plain-text-body></ac:structured-macro>
    SourcePath=C:\TOTVS 12\Microsiga\protheus\apo\
    RootPath=C:\TOTVS 12\Microsiga\protheus_data
    CtreeRootPath=C:\TOTVS 12\Microsiga\protheus_data
    StartPath=\system\
    x2_path=
    RpoDb=top
    RpoLanguage=Portuguese
    RpoVersion=120
    LocalFiles=CTREE
    Trace=0
    localdbextension=.dtc

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d5aa8ddd-237f-41a0-be3b-a25f60bc1d0b"><ac:plain-text-body><![CDATA[DBAccess] \]></ac:plain-text-body></ac:structured-macro>
    Alias=P12_1_14
    Server=localhost
    Database=MSSQL
    Port=7890

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0fe310e5-fa37-4a1d-a533-ba39243377da"><ac:plain-text-body><![CDATA[CtreeServerMaster] \]></ac:plain-text-body></ac:structured-macro>
    ctUserId=ADMIN
    ctUserPass=ADMIN
    ctServerName=FAIRCOMS@localhost
    memctUserId=ADMIN
    memctUserPass=ADMIN
    memctServerName=boundServer@localhost
    Environments=P12
    Files=sx3*.dtc,sx5*.dtc,sx6*.dtc,sx7*.dtc
    ShowStatus=1

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c50f615f-f75f-4f2f-8541-0a3f53f8aebf"><ac:plain-text-body><![CDATA[ServerNetwork] \]></ac:plain-text-body></ac:structured-macro>
    MasterConnection=0
    Servers=Slave1,Slave2

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="98eee2b3-f025-4a7c-9021-dd7c2f522ded"><ac:plain-text-body><![CDATA[Slave1] \]></ac:plain-text-body></ac:structured-macro>
    TYPE=TCPIP
    Server=localhost
    Port=1271
    Connections=1

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6c720453-ed9f-4c45-aedd-fa51ac75d06f"><ac:plain-text-body><![CDATA[Slave2] \]></ac:plain-text-body></ac:structured-macro>
    TYPE=TCPIP
    Server=localhost
    Port=1272
    Connections=1

    CTSRVR.CFG (MASTER)
    SERVER_NAME BOUNDSERVER
    COMM_PROTOCOL F_TCPIP
    COMM_PROTOCOL FSHAREMM
    LOG_SPACE 96
    CTSTATUS_SIZE -1000000
    SKIP_MISSING_FILES YES
    IDX_MEMORY 128 MB
    DAT_MEMORY 128 MB
    CONNECTIONS 150
    CONSOLE NO_MESSAGEBOX
    CONSOLE NO_SHUTDOWN_PROMPT
    APPSERVER.INI (SLAVES)
    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e186aa27-debf-403c-9f12-980eda5bcbfe"><ac:plain-text-body><![CDATA[General] \]></ac:plain-text-body></ac:structured-macro>
    InstallPath=C:\TOTVS 12
    CtreeMode=boundClient
    Consolelog=1

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="44933095-6b5d-4f93-9c8f-9f266dbac2ff"><ac:plain-text-body><![CDATA[Drivers] \]></ac:plain-text-body></ac:structured-macro>
    Active=TCP

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5b0e5b49-7b58-473f-9409-040bc37b1991"><ac:plain-text-body><![CDATA[TCP] \]></ac:plain-text-body></ac:structured-macro>
    TYPE=TCPIP
    Port=1271

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f8df662e-b024-4abf-ba79-717583c4d3c2"><ac:plain-text-body><![CDATA[LicenseClient] \]></ac:plain-text-body></ac:structured-macro>
    Server=localhost
    Port=5555

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ce3841e0-663e-4439-9ab9-8934ec5f7422"><ac:plain-text-body><![CDATA[P12] \]></ac:plain-text-body></ac:structured-macro>
    SourcePath=C:\TOTVS 12\Microsiga\protheus\apo\
    RootPath=C:\TOTVS 12\Microsiga\protheus_data
    CtreeRootPath=C:\TOTVS 12\Microsiga\protheus_data
    StartPath=\system\
    x2_path=
    RpoDb=top
    RpoLanguage=Portuguese
    RpoVersion=120
    LocalFiles=CTREE
    Trace=0
    localdbextension=.dtc

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="44fa8d7f-b5b0-4102-a47d-41ca8e36d5c5"><ac:plain-text-body><![CDATA[DBAccess] \]></ac:plain-text-body></ac:structured-macro>
    Alias=P12_1_14
    Server=localhost
    Database=MSSQL
    Port=7890

    <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="158421aa-fcbb-479c-837c-d063e55ef5b9"><ac:plain-text-body><![CDATA[CtreeServerMaster] \]></ac:plain-text-body></ac:structured-macro>
    ctUserId=ADMIN
    ctUserPass=ADMIN
    ctServerName=FAIRCOMS@localhost
    Environments=P12
    Files=sx3*.dtc,sx5*.dtc,sx6*.dtc,sx7*.dtc
    ShowStatus=1

    CTSRVR.CFG (SLAVES)
    COMM_PROTOCOL F_TCPIP
    COMM_PROTOCOL FSHAREMM
    LOG_SPACE 96
    CTSTATUS_SIZE -1000000
    SKIP_MISSING_FILES YES
    IDX_MEMORY 128 MB
    DAT_MEMORY 128 MB
    CONNECTIONS 150
    CONSOLE NO_MESSAGEBOX
    CONSOLE NO_SHUTDOWN_PROMPT

Notes:

About the files configuration:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f2e34638-ff40-4d3f-a0b9-55d7795ca439"><ac:plain-text-body><![CDATA[- In the appserver.ini file of the Master, in the section [General], the row CtreeMode must be =boundServer, then in the appserver.ini of Slaves, must be =boundClient
]]></ac:plain-text-body></ac:structured-macro>
Appserver.ini:

Wiki Markup
*\[CtreeServerMaster\]*


Information to connect to CTREE SERVER MASTER:
ctUserId=ADMIN -> Row not required. The value "ADMIN" is Default.
ctUserPass=ADMIN -> Row not required. The value "ADMIN" is Default.
ctServerName=FAIRCOMS@localhost -> Name the main Ctree Server server (not embedded). The first part before the @ indicates the name of the server, defined in the row SERVER_NAME of the file ctsrvr.cfg do CtreeServer, while the second part, after the @, indicates the IP address of the server where this CtreeServer is

Information to connect to CTREE BOUND SERVER:
memctUserId=ADMIN -> Row not required. The value "ADMIN" is Default.
memctUserPass=ADMIN -> Row not required. The value "ADMIN" is Default.
memctServerName=boundServer@localhost -> Name of the Ctree Bound Server server (embedded). The first part before the @ indicates the name of the server, defined in the row SERVER_NAME of the file ctsrvr.cfg do CtreeServer, which is in the folder Appserver, while the second part, after the @, indicates the IP address of the server where this Ctree Bound Server is

Environments=P12 -> List of environments using the C-Tree Bound Server with files in memory. This key informs which environments of the server are checked, during the preparation of the environment of the process (Thread) of notification, to search files specified in the FILES configuration. You can only indicate for notification, environments using CTREE for the control of ISAM(SXS) tables.

Files=sx3990.dtc,sx5*.dtc,sx6??0.dtc,sx7*.dtc -> Files to be used in memory. You can specify one or more files, separated by comma, with absolute paths in disk, related to ROOTPATH of the environment, or only the name of the file found from STARTPATH of the environment. Use characters of the mask "*" and "?".

ShowStatus=1 -> Displays messages of Ctree notification information. It can be 0 or 1. Default is o.