Back to home page

Enduro/X

 
 

    


0001 Enduro/X System Overview
0002 =======================
0003 :doctype: book
0004 
0005 What is Enduro/X?
0006 -----------------
0007 Enduro/X is middle-ware software that composes semantics of Application
0008 Transaction Monitor Interface (ATMI). Also Enduro/X provides UBF
0009 (Universal Buffer Format) so programmers can use self described buffers for 
0010 inter-process communication purposes.
0011 
0012 System principles have similarities with Oracle (R) Tuxedo (R) system. Enduro/X
0013 implements portions of Tuxedo FML and ATMI APIs and provides similar
0014 functionality.
0015 
0016 Enduro/X consists release consists of various components. Like libraries for C/C++ programs,
0017 transaction monitor it self, and command line administration utility.
0018 
0019 On each machine transaction monitor process runs locally, it controls so 
0020 called server processes, which are programs which are started by transaction 
0021 monitor and they advertise services. It is possible to join together many 
0022 transaction monitor processes under same machine or over multiple  machines. This makes
0023 a cluster.
0024 
0025 In cluster environment services are shared over the linked local transaction 
0026 monitors. It is possible to load balance some service which runs on local 
0027 machine and on some other machine. The caller/client might be
0028 unaware on which machine the call actually is served.
0029 
0030 What Enduro/X deliverable contains?
0031 -----------------------------------
0032 
0033 The distribution package contains following list of resources:
0034 
0035 .Distribution package description - "bin" directory
0036 [width="100%",options="header"]
0037 |==============================================
0038 | Resource        | Description
0039 | buildclient | Fully featured featured build client, includes static linking of XA switch
0040 | buildserver | Fully featured server build processes, generates main with automatic advertises
0041 | buildtms | Build alternate transaction manager, which includes statically linked XA switch
0042 | mkfldhdr | Generates C/Go/Java header files for UBF buffers
0043 | ndrxd | Enduro/X deamon. This process is central point of the application
0044  which does the Application Transaction Monitoring
0045 | tmadmin | Alias for xadmin
0046 | tpbridge | Special ATMI server which drives the connectivity for cluster purposes
0047 It allows to connect one Enduro/X instance to another Enduro/X instance
0048 | tpevsrv | Special ATMI server which serves the local even distribution over the services
0049 | ud | ATMI client utility. This reads stdin of dumped UBF buffer. And sends request to specified service
0050 when responses is received, it is dumped back to stdout
0051 | xadmin | Enduro/X Administration command utility. Basically utility is also responsible for 
0052 local ATMI instance start, stop, configuration test/load/reload, status printing, etc
0053 | tmsrv | Transaction Manager Server. Responsible for XA two phase transaction management
0054 | tprecover | Enduro/X main daemon (ndrxd) monitoring and recovery server
0055 | tmqueue | Persistent queue support server
0056 | cpmsrv | Client process monitor
0057 | edb_copy, edb_dump, edb_load, edb_stat | LMDB cache management
0058 | exencrypt | Encrypt configuration string
0059 | exdecrypt | Encrypt configuration string  
0060 | tpadmsv | TMIB interface provider sever
0061 | tpbrdcstsv | *tpbroadcast(3)* and *tpnotify(3)* support servers
0062 | tpcachebtsv | Boot time cache configuration server
0063 | tpcached | Cache management client process (house-keeping)
0064 | tpcachesv | Interactive cache management support server (backing for xadmin commands)
0065 | uvlog | Log file merge tool
0066 | viewc | View file compiler
0067 | xmemck | Memory leak monitor, used for Enduro/X debugging.
0068 |==============================================
0069 
0070 .Distribution package description - "lib" directory
0071 [width="100%",options="header"]
0072 |==============================================
0073 | Resource  | Description
0074 | libfml.so | Dummy for compatibility
0075 | libfml32.so | Dummy for compatibility
0076 | libexuuid.a | UIID generation lib
0077 | libnstd.so | Enduro/X standard library
0078 | libubf.so | Unified Buffer Format APIs / FML support
0079 | libatmisrvdum.so | Dummy ATMI server entries for *tpsvrinit(3)*, *tpsvrdone(3)* (for Cygwin)
0080 | libatmiclt.so | ATMI client functions (terminators for server calls)
0081 | libatmicltbld.so | ATMI clients functions for *buildclient(8)* linking
0082 | libexmemck.so | Memory usage debugger
0083 | libndrxxaoras.so | Oracle DB static XA switch resolver library
0084 | libndrxxaorad.so | Oracle DB dynamic XA switch resolver library
0085 | libndrxxadb2s.so | DB2 static XA switch resolver library
0086 | libndrxxadb2d.so | DB2 dynamic XA switch resolver library
0087 | libndrxxawsmqs.so | Websphere MQ static XA switch resolver
0088 | libndrxxawsmqd.so | Websphere MQ dynamic XA switch resolver
0089 | libndrxxatmsx.so | buildclient/buildserver/buildtms statically linked XA switch resolved library
0090 | libndrxxanulls.so | XA Null switch dummy (gives XA_OK for all XA calls)
0091 | libcryptohost.so | Enduro/X plugin - provides configuration cryptography key from server hostname
0092 | libnetproto.so | Enduro/X bridge protocol support lib
0093 | libexnet.so | Enduro/X networking support lib
0094 | libtms.so | provides transaction manager logic, used by *buildtms(8)*
0095 | libndrxxaqdisk.so | TMQUEUE disk storage provider
0096 | libndrxxaqdisks.so | TMQUEUE disk static XA Switch resolver
0097 | libndrxxaqdiskd.so | TMQUEUE disk dynamic XA Switch resolver
0098 | libatmi.so | ATMI common client and server shared library, serves functions 
0099     like tpcall(), tpforward(), etc.
0100 | libatmisrvinteg.so | ATMI Server process shared library - provides _tmstartserver(),
0101     and ndrx_main_integra(). This is preferred entry library for ATMI servers.
0102 | libatmisrv.so | ATMI Server process shared library - library with build-in main()
0103     function for server process. Searches for external tpsvrinit() and tpsvrdone().
0104 | libatmisrvnomain.so | ATMI Server process shared library - provides ndrx_main(),
0105     expects external tpsvrinit() and tpsvrdone().
0106 | libtux.so | Library for compatibility
0107 | libps.so | Platform script backing lib
0108 | libpsstdlib.so | Platform script standard lib
0109 |==============================================
0110 
0111 .Distribution package description - "include" directory
0112 [width="100%",options="header"]
0113 |==============================================
0114 | Resource        | Description
0115 | userlog.h | User log function
0116 | fml.h | FML emulation header 
0117 | fml32.h |  FML32 emulation header
0118 | fml1632.h |  FML 16/32 emulation header
0119 | ubf.h |  Unified Buffer Format APIs
0120 | ubfutil.h | Enduro/X internal use header for module binding
0121 | atmi.h | ATMI interface for compatibility
0122 | xatmi.h |  ATMI interface
0123 | pscript.h | Enduro/X internal use header, used for module binding
0124 | exparson.h | Enduro/X internal use header, used for module binding
0125 | ndebug.h | Enduro/X debugger interfaces
0126 | ndebugcmn.h | Enduro/X internal use header, used by binded modules
0127 | ndrstandard.h | Enduro/X internal use header for module binding
0128 | nstd_shm.h | Enduro/X internal use header for module binding
0129 | nstdutil.h | Enduro/X internal use header for module binding
0130 | nstd_tls.h | Enduro/X internal use header for module binding
0131 | thlock.h | Enduro/X internal use header for module binding
0132 | exhash.h | Enduro/X internal use header for module binding
0133 | cconfig.h  | Enduro/X internal use header for module binding
0134 | inicfg.h | Enduro/X internal use header for module binding
0135 | nerror.h | Enduro/X internal use header for module binding
0136 | xa.h | XA standard header
0137 | ndrx_config.h | Enduro/X build time platform configuration flags
0138 | sys_unix.h | Enduro/X internal use header for module binding
0139 | sys_primitives.h | Enduro/X internal use header for module binding
0140 | sys_mqueue.h  | Enduro/X internal use header for module binding
0141 | sys_emqueue.h | Enduro/X internal use header for module binding
0142 | sys_svq.h     | Enduro/X internal use header for module binding
0143 | oubf.h | Enduro/X internal use header for module binding
0144 | odebug.h | Enduro/X internal use header for module binding
0145 | ondebug.h | Enduro/X internal use header for module binding
0146 | onerror.h | Enduro/X internal use header for module binding
0147 | oatmisrv_integra.h | Enduro/X internal use header for module binding
0148 | oatmi.h | Enduro/X internal use header for module binding
0149 | oatmisrv.h | Enduro/X internal use header for module binding
0150 | Exfields.h | Enduro/X internal fields definitions 
0151 | Excompat.h | Enduro/X compatibility field definitions
0152 | tpadm.h | tpadmin call interface
0153 | evt_mib.h | Compatibility header
0154 | view_cmn.h | Enduro/X internal use header for module binding
0155 | exdb.h | Enduro/X internal use header for module binding
0156 | nstopwatch.h | Enduro/X internal use header for module binding
0157 | exthpool.h | Enduro/X internal use header for module binding
0158 | exstring.h | Enduro/X internal use header for module binding
0159 | Usysfl32.h | Compatibility header
0160 | tmenv.h | Enduro/X internal use header for module binding
0161 | tx.h | TX transactions interface API
0162 | Uunix.h | Compatibility header
0163 | expluginbase.h | Enduro/X plugin API
0164 | fpalloc.h | Enduro/X internal use header for module binding
0165 | lcf.h | Latent Command Framework API
0166 |==============================================
0167 
0168 How system works
0169 ----------------
0170 .Basically local ATMI works by using system's IPC facilities. Following facilities are used
0171 by Enduro/X:
0172 
0173  * System V IPC Semaphores
0174  * Posix Queues
0175  * Posix Sharded Memory
0176 
0177 
0178 [dia, endurox_overview.dia, endurox_overview.png, x350]
0179 -------------------------------
0180 -------------------------------
0181 
0182 Enduro/X In cluster
0183 -------------------
0184 This section gives overview how Enduro/X Operates in cluster environment.
0185 Currently there can be possible 32 nodes in cluster. Enduro/X clustering utilizes TCP/IP
0186 connections to join local Enduro/X instances. For each link between two different instances
0187 seperate TCP/IP channel is used.
0188 
0189 Cluster can be configured in different way, for example with one central node which will have
0190 links to all other nodes. Or with no central node, then there should be created links for each
0191 of the machine pair.
0192 
0193 Cluster with central node:
0194 
0195 [dia, cluster_links_center.dia, cluster_links_center.png, x150]
0196 -------------------------------
0197 -------------------------------
0198 
0199 Note that in case of central node, each node only sees center node (Node1), However centre node sees
0200 all other nodes.
0201 
0202 
0203 Cluster can consist with/out central node, for example this 5 node cluster could look like:
0204 [dia, cluster_links_nocentre.dia, cluster_links_nocentre.png, x150]
0205 -------------------------------
0206 -------------------------------
0207 
0208 In this case each node sees other each other node and it can create invocations of the services
0209 from that node.
0210 
0211 Cluster also can consist of mixed node. i.e. when some nodes sees each other but some
0212 nodes sees only one or few other nodes. For example consider this 7 node cluster:
0213 
0214 [dia, cluster_links_mix.dia, cluster_links_mix.png, x150]
0215 -------------------------------
0216 -------------------------------
0217 In this case Node6 and Node7 sees only few other cluster nodes. Also in this case only 
0218 Node1 will see Node7 and Node2 will see Node6.
0219 
0220 Service tables are replaced only over the direct link. They are not distributed over the
0221 whole cluster.
0222 
0223 Local Enduro/X instances can be cluster by using special ATMI server 'tpbridge'. This server
0224 accepts configuration (in '<appopts>') where it says either this endpoint is passive (waits
0225 for connection) or active (tries to connect to specified ip address:port). The Node ID of
0226 other endpoint and some other parameters.
0227 
0228 When connection is established, both endpoints exchanges will full service listings. When some
0229 service is remove from local instance, then over this tcp/ip link update message is sent to other
0230 node so that service is removed there too.
0231 
0232 Full service lists are exchanged periodically (every 30 sec for example). Also 'tpbridge'
0233 periodically sends zero length messages to other node to keep the connection open.
0234 
0235 If connection is lost, both Enduro/X local instances will remove all other instance (who's link is lost)
0236 services from shared memory.
0237 
0238 
0239 Here is complete scheme how two nodes cooperate:
0240 
0241 [dia, cluster_detail.dia, cluster_detail.png, x450]
0242 -------------------------------
0243 -------------------------------
0244 
0245 As you see firstly when TCP connection is established, service lists are exchanged
0246 in points a. and b. (also nodes exchange clock diff so that each call duratation can be corrected between nodes).
0247 Each 'ndrxd' instance updates shared memory of services received from bridge services.
0248 
0249 After that we have ATMI client on Node1 which calls service 'MYSERVICEY' which is located
0250 on Node2. It resolve shared memory which says that this is on other node. Then call is made
0251 to 'TPBRIDGE002' Queue, which forwards the packet to other node. See points 1. - 6.
0252 
0253 Also it is possible to have service be presented locally and on remote machine. All this information 
0254 is recorded in shared memory for each of the services. Each shared memory entry contains the 32 element long
0255 array which at each cell contains the number of services shared on other node.
0256 Enduro/X environment parameter 'NDRX_LDBAL' says in percentage how much requests serve locally
0257 and how much to send to remote machine. Percentage is calculated on random basis
0258 and remote node is also calculated on random basis.
0259 The shared mem info can be looked by 'xadmin', 'psvc' command, for example:
0260 ---------------------------------------------------------------------
0261 $ xadmin
0262 NDRX> psvc
0263 ndrxd PID (from PID file): 5505
0264 Slot   Service Name Nsrv Flags CSrvs TClst CMAX CNODES
0265 ------ ------------ ---- ----- ----- ----- ---- --------------------------------
0266 318    RETSOMEDATA  1    1     1     3     12   00000000000300000000000000000000
0267 1051   UNIX2        1    1     1     2     12   00000000000200000000000000000000
0268 3844   @TPEVUNSUBS  1    1     0     0     0    00000000000000000000000000000000
0269 4629   UNIXINFO     1    1     1     3     12   00000000000300000000000000000000
0270 8676   ECHO         1    1     1     3     12   00000000000300000000000000000000
0271 10293  TIMEOUTSV    1    1     1     3     12   00000000000300000000000000000000
0272 11169  @TPEVSUBS    1    1     0     0     0    00000000000000000000000000000000
0273 14301  @TPEVDOPOST  1    1     0     0     0    00000000000000000000000000000000
0274 14894  TESTSV       1    1     1     3     12   00000000000300000000000000000000
0275 16648  @TPBRIDGE002 1    1     0     0     0    00000000000000000000000000000000
0276 16681  @TPBRIDGE012 1    1     0     0     0    00000000000000000000000000000000
0277 17001  NULLSV       1    1     1     3     12   00000000000300000000000000000000
0278 17386  @TPEVPOST    1    1     0     0     0    00000000000000000000000000000000
0279 NDRX> 
0280 ---------------------------------------------------------------------
0281 Which for example displays that 2 service instances of 'UNIX2' is available on Node12.
0282 
0283 
0284 Event processing
0285 ----------------
0286 
0287 Enduro/X Supports ATMI events via 'tpsubscribe()', 'tppost()' and 'tpunsubscribe()' calls. Events
0288 are processed by special ATMI server named 'tpevsrv'. This server ships in Enduro/X package.
0289 Events are supported in clustered environment too. In this case the local node additionally
0290 broadcasts event to all other connected nodes. On other nodes 'tpbridge' process delivers this
0291 event to local 'tpevsrv' which posts the event locally only.
0292 
0293 [dia, event_processing.dia, event_processing.png, x450]
0294 -------------------------------
0295 -------------------------------
0296 
0297 
0298 Features of Enduro/X
0299 --------------------
0300 =====================================================================
0301 This section lists the features of Enduro/X framework:
0302 
0303 . Runs on 64bit GNU/Linux, starting from Kernel version 2.6.12.
0304 . Distributed architecture.
0305 . Peer based cluster. None of cluster nodes are master.
0306 . PING of ATMI servers are supported. If server does not respond on pings
0307 withing timeframe, they being restarted.
0308 . Enduro/X monitors processes:
0309         .. For long startup, processes are being killed and restarted
0310         .. If proceses for some reason dies, they are being restarted
0311         .. If process dies who was the only which provides some service
0312 then SRVCERR response is sent back to caller
0313         .. For long shutdown (not in time frame), processes are forcibly killed
0314 . The run-time is possible without local central ATMI Monitor (ndrxd). 
0315 As long as other servers are running, system will work.
0316 . It is possible to restart ndrxd during the runtime. Runtime will not be interrupted.
0317 When doing restarting, ndrxd must be started in recovery mode.
0318 In this mode it learns about the system and only after a while it becomes a master of the system.
0319 . Local housekeeping is made. If ATMI clients are unclean shutdown (i.e. not called tpterm()).
0320 Then Enduro/X daemon detects these cases and cleans up system accordingly.
0321 . It is easy to debug application for Enduro/X. The server processes is 
0322 possible to start from command line (not mandatory started by ndrxd).
0323 This means that it is possible to start server processes via wrappers 
0324 like valgrind or start via IDE and use step by step debugging of
0325 server process.
0326 . System is tested by extensive automated unit tests.
0327 It is possible to link binaries directly with correct shared libraries.
0328 . It is possible to specify environment overrides for each of the separate ATMI server.
0329 . Enduro/X contains debugging facilities. It is possible to get debug logs for 
0330 Enduro/X ATMI and UBF sub-systems. Logging for each of the systems can be configured
0331 separately for each of the executables using these libs.
0332 . ATMI configuration can be reloaded during runtime. It can be done as simple as just 
0333 editing the config file 'ndrxconfig.xml' and running 'xadmin reload'.
0334 =====================================================================
0335 
0336 [bibliography]
0337 Additional documentation 
0338 ------------------------
0339 This section lists additional related documents.
0340 
0341 [bibliography]
0342 .Enduro/X Documentation
0343 - [[[ex_adminman]]] ex_adminman(guides)(Enduro/X Administration Manual)
0344 - [[[building_guide]]] building_guide(guides)(Building Enduro/X On GNU/Linux Platform)
0345 - [[[ex_devguide]]] ex_devguide(guides)(Additional developer information)
0346 
0347 
0348 ////////////////////////////////////////////////////////////////
0349 The index is normally left completely empty, it's contents being
0350 generated automatically by the DocBook toolchain.
0351 ////////////////////////////////////////////////////////////////
0352