theLink 10.0
Loading...
Searching...
No Matches
MqFactoryC_TCL_API

MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextCMore...

+ Collaboration diagram for MqFactoryC_TCL_API:

Topics

 MqFactoryC_Class_TCL_API
 MqFactoryC - define the class …
 
 MqFactoryC_TOR_TCL_API
 MqFactoryC - various functions to create, initialize and destroy a factory
 
 MqFactoryC_Get_TCL_API
 MqFactoryC - various functions to 'get' data out of a factory
 
 MqFactoryC_Misc_TCL_API
 MqFactoryC - various functions to work on a factory
 

Detailed Description

MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextC

The factory is an important part of the object management and has the following basic features:

  1. create/delete a MqContextC defined by a MqFactoryC
  2. infrastructure to host multiple MqFactoryC in a single executable
  3. provide an identifier used for factory-lookup and as an unique-application-name
  4. identification of a client and a server in an application-link

Without a factory only the pipe-feature without the child-feature is guaranteed to work. Other features may work, this depends of the "flexibility" of the programming-language.

The link between the MqFactoryS-identifier and the MqFactoryC is important for the future development of tclmqmsgque. Message-Routing, Service-Location and Persistent-Transactions depend on this feature.

The relationship between the MqFactoryC and the MqContextC is the same as the relationship between a type (MqFactoryS) and an object (MqContextS) of a regular programming language. The MqFactoryC define the type of the server and the MqContextC define a single object of the server process or thread.

                                     Application
|-------------------------------------------------------------------------------------|
|--------------- physical host 1 -----------------------|------ physical host 2 ------|
|-------- process-1 --------|-------- process-2 --------|-- process-3 --|---- … ------|
 thread-1     thread-2…      thread-1…     thread-2…      thread-1…       thread-…
  factory-A     factory-X     factory-Y…    factory-Z…
   object-1     object-1   object-…    …
   object-2     object-2   …
   object-3     object-3
   …              …

A server has a single MqFactoryC object per thread or process but multiple MqFactoryC objects per application. Decreasing the size and the complexity of a MqContextC object will improve the server performance. In future more fields, defined in the MqSetupS attribute of the the MqContextC object, will move into MqFactoryC object.

Thread Support and 'tclmqmsgque::Main'

Description: a tclmqmsgque SERVER listen on a port and start for every incoming connetion a NEW sub-server. If a thread sub-server was choosen... with the --thread commandline-option... a new thread is created. To setup a new thread the INITIAL tcl-file is READ again and PROCS and VARIABLES are initialized. The NEW thread has it's own MqMain-Loop and so... the original MqMain-Loop is skipped. If a Factory command is used OUTSIDE of the MqMain-Loop... the initial MqFactoryS would be created TWICE. The creation of multiple MqFactoryS objects... with the SAME name... is an ERROR.