Home
        RTI Real-Time Connect User`s Manual
         Contents
1.              LL           a  Sparse types must be built dynamically in RTI Data Distribution Service 4 4b and higher  There is no IDL con     struct sparse     Appendix A Error Codes    Table A 1    Table A 1 lists the native error and warning messages that may be logged by the RTI  Real Time Connect Daemon  While some of these messages may actually provide enough  information by themselves to help users fix the problem  many have to be used along  with other data to help with debugging the issue     Often several of these messages will be logged for a single problem  A failure at a lower  layer will cause log messages to be printed at various levels of the RTI Real Time Connect  Daemon logic  These messages will be valuable to you and to RTI support engineers in    debugging issues with RTI Real Time Connect     RTI Real Time Connect Errors and Warnings       Code       Message       Details          0   1023 RTI Real Time Connect Daemon errors  These messages are produced by the logic of the RTI Real Time Connect Daemon itself        Should never occur                       0 Unexpected error i i  Contact support rti com if seen   1  lt message gt  General error   Error storing RTI DDS sample in table There was an error when storing value  2 i 4 8 P received with RTI Data Distribution Service   lt table gt     into the database   3 Error creating  lt entity gt   Error creating  lt entity gt  associated to the  4 t r  table   lt table gt   5 Error getting  lt entity gt      
2.            A 1    SOPOD 10113  Y    Appendix A                                                 Table A 1 RTI Real Time Connect Errors and Warnings  Code Message Details  There was an entry in a meta table  6  lt meta table gt  entry not valid  RTIDDS_PUBLICATIONS or RTIRTCSUB   SCRIPTIONS  that was not valid   i i   There was an error when creating or pre   7 Error creating   lt type gt   SQL statement paring an SQL statement   8 Error creating table   lt table gt    2   There was a problem initializing the RTI  Error opening RIL DDS conncenon Data Distribution Service   The meta columns RTIDDS_DOMAIN_ID  and RTIRTC_REMOTE must be added to  tables that the user creates and wished to  connect to via RTI Real Time Connect  They    will be automatically if the RTI Real Time  10 The type of the column   lt column gt   is not Connect Daemon creates the table   valid If the user creates the table and adds the  two columns  they must be of type INTE   GER   This message is produced if these columns  exist and are of the wrong type   The RTI Real Time Connect Daemon had a  11 Error publishing record  instance problem publishing a table change as a  DDSTopic   The RTI Real Time Connect Daemon had a    F   problem disposing of an instance of  1z Error disposing record instance DDSTopic when the user deleted a row in a  table   The RTI Real Time Connect Daemon had  13 Error initializing  lt module gt  module problems initializing an internal code mod   ule   14 The definition of environ
3.       Daemon  the user code itself should add the meta columns to the table schema when  appropriate   There is no specific order required for the new columns      The meta columns that may be created are     L RTIDDS_DOMAIN_ID and RTIRTC_REMOTE    These two SQL INTEGER columns are always added to the tables created by the  daemon  These additional columns are used by the daemon when user has cre   ated entries in both the RTIDDS_PUBLICATIONS and  RTIDDS_SUBSCRIPTIONS meta tables for the same user table  In that situa   tion  changes to the table made by local user applications will be published via  DDS at the same time that the daemon itself may store data into the table  received via DDS     RTI Real Time Connect Daemon uses these meta columns in order to prevent the  republishing of tables values that were changed because they were received via  DDS  User applications that create the table do not need to add these columns if  the daemon is configured only to publish data from the table or to store data into  the table     However  it is essential that these columns do exist for the situation where both  publications and subscriptions are tied to the same table  If the meta columns are  omitted  then when RTI Real Time Connect Daemon receives data via DDS  it will  be echoed  republished  as a change to the table      d RTIRTC_KEY    This SQL INTEGER column is added by the daemon if the IDL type that is used  to create the table does not contain any fields marked as a topi
4.      Table 5 1 DDS DBMS Semantic Models  Data Distribution  Service Relational Database Details    DDS keys are mapped to the primary keys of a  Key puss ae  table  When a table is created by the RTI Real Time  IDL data types may con  Most relational data  Connect Daemon  the columns corresponding to    tain one or more fields that  are used to distinguish dif   ferent instances of the    bases require table  schemes to identify one  or more columns to act as    the IDL key fields will be created as primary key  columns     For tables created by user code  the correspondence                   DDSTopic  the primary key forthe of IDL key fields to table primary key columns     must be set correctly   Values published for DDSTopics will be stored into  a database table by the RTI Real Time Connect  D    DDSDataWriter  write   SQL INSERT or BDA    UPDATE Table rows modified by SQL INSERT or UPDATE  commands will be published by the RTI Real Time  Connect Daemon as values of DDSTopics   DDSDataReader  take    DDSDataReader  read   SQL SELECT  When SQL DELETE is used to delete a row from a  table  the RTI Real Time Connect Daemon will call  DDSDataWriter  dispose   to dispose the instance      corresponding to the row   DDSDataWriter  dispose     SQL DELETE    If a user application calls DDSDataWriter  dis   pose   to dispose an instance  the RTI Real Time  Connect Daemon may be configured to delete or  keep the corresponding rows              5 2    Data Representation Mapping    
5.      The possible values for the  lt dr multicast receive_address gt  column are     LI NULL    A NULL column means that the DDSDataReader will receive DDSTopic data  using unicast     4 5 Meta Tables       4 5 2 1 26    4 5 2 1 27    4 5 3    4 5 3 1    J A string that contains a valid multicast address in the form  xxx xxx xxx xxx      The DDSDataReader for the table will subscribe to the DDSTopic on the multi   cast address provided     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used     dr multicast receive_port    This column configures the multicast port on which the DDSDataReader will receive  data  When the default value  NULL or 0  is used  the actual port number is determined  by a formula as a function of the domain ID     Note that the value of this field is ignored when dr multicast receive_address is NULL    RTIRTC_SCN    The System Change Number  SCN  column is available only for connections to a  MySQL database  The value of this column is automatically maintained by RTI Real   Time Connect and is usually of no interest to the application  For more information about  the RTIRTC_SCN column see Section 4 6     Table Info    The meta table RTIRTC_TBL_INFO stores meta information associated with the user  tables     When a table is automatically created by the RTI Real Time Connect Daemon  see  Section 4 6   its TypeCode is stored in RTIRTC_TBL_INFO as a sequence of octets   When the RTI Real Time Connect Da
6.     RTI Real Time Connect offers a unique set of features that enable seamless integration of  real time  embedded DDS applications and enterprise services      J Storage of DDS Data in a DBMS    RTI Real Time Connect automatically stores received values of specified DDS top   ics in a database  Once the data is propagated to the database  it can be accessed  by a user application via regular SQL queries     J Publication of DBMS Data via DDS    RTI Real Time Connect automatically publishes changes in specified database  tables  Changes made via the SQL API  with the INSERT  UPDATE and DELETE  statements  will be published into the network via DDS  so real time  embedded  applications and devices can respond to time critical changes with near zero  latency     _J Mapping Between IDL to SQL Data Types    RTI Real Time Connect provides automatic mapping between an IDL data type  representation and a SQL table schema representation  This mapping is used to  directly translate a table record to a DDS data structure and vice versa  Previ   ously  this translation had to be done by custom developed code     I History    RTI Real Time Connect can store a history of received values of a data instance   Normally  an instance of a DDS topic is mapped to a single row in the associated  database with the IDL key used as the primary key for the table  But when RTI  Real Time Connect   s data history feature is enabled  multiple samples of a topic  instance can be stored across multiple ro
7.     ee       5 2 9    5 16    Sequence Fields    Sequences are basically variable sized arrays that have a maximum length and carry an  additional integer that indicates the current size  The mapping of IDL sequences to a  table schema is similar to the array mapping  with the following differences     LJ An extra column is added with the suffix     length     used to store the current  length of the sequence     l The total number of columns created is equal to the maximum number of ele   ments that the sequence can hold  although the number of columns containing  valid data at a given time is stored in the     length    column       The naming convention of adding the suffix     i     to each column is required for  the RTI Real Time Connect Daemon to handle the mapping between IDL and SQL  correctly  The open bracket and close bracket characters can be configured using  the tags  lt open_bracket_char gt  and  lt close_bracket_char gt   see page 4 25      5 2 Data Representation Mapping       l Sequence elements can contain the NULL value since not all elements may be  used at a given time   Note  Sequences of the IDL types    char        wchar    or    octet    map directly into the vari   able length SQL types VARCHAR  VARWCHAR  and VARBINARY  respectively   Table 5 13 shows the mapping of a sequence field between IDL and SQL     Table 5 13 Sequence Fields in IDL and SQL    5 2 10    5 2 11       IDL Type SQL Table Schema             struct MySequenceContainer      hi    
8.    CREATE TABLE    MySequenceContainer              my_key_field    INTEGER NOT NULL       my seq field length    INTEGER NOT NULL      my seq field 0     SMALLINT       my seq field 1     SMALLINT      my seq field 2     SMALLINT      my seq field 3     SMALLINT   PRIMARY KEY     my_key_field                          long my_key_field     key  sequence lt short 4 gt  my_seq field                       NULL Values    Null values exist in SQL databases but do not have an equivalent in IDL  The RTI Real   Time Connect daemon converts NULL values into    0    values when publishing from a  SQL table  in the following way     I numerical types  0   M fixed length string types  CHAR  NCHAR       LJ variable length types  VARCHAR  NVARCHAR  VARBINARY   length 0  I binary  every byte is set to 0    I timestamp  0    Sparse Data Types    Sparse Data Types follow the same mapping as structures  see Section 5 2 6 and  Section 5 2 7   The fields that are not required or primary keys are created with the nul   lable attribute     5 17    Bulddo opoq pup    OYWUDWSS TOS 1AI  S    Chapter 5       Table 5 14 Simple Sparse Type    5 18       Type in Pseudo Language    SQL Table Schema             sparse MySparse       long my_key_field     key   short my_short_field    long my_long_field     required  3       Create Table  MySparseContainer       ka           my_key_field  INTEGER NOT NULI   my_short_field  SMALLINT                  my_long_field  INTEGER NOT NU  PRIMARY_KEY   my_key_field  
9.    Identified by a name  string    Applications can write  values or read values  from tables using SQL     ODBC  Java and JDBC   Fields in data structures are mapped to columns of  Data structures Tables a table  Each row of a table represents a different  Defined by IDL  Interface i value for a data structure  The exact mapping of  Description Language   Defined by table schema    1p  data structures to table schemas is described in  Data Representation Mapping  Section 5 2    DDSTopic Table    DDSTopic names and table names do not have to be  the same when making a correspondence between a  DDS topic and a database table        Data values          Rows in table   No history  A single row  in a table    History  Multiple rows in  a table        When the RTI Real Time Connect Daemon table  history option is turned OFF  see Sections 4 5 1 1 7  and 4 5 2 1 4   only the last value of a topic instance  is stored in the table  So a non keyed topic will be  stored in a single row whereas for keyed topics   there will be as many rows as there are topic  instances     When the RTI Real Time Connect Daemon table  history option is turned ON  each instance will  occupy up to a user settable maximum number of  rows so that the last N values received for the  DDSTopic are stored in the table  When N values  have been stored  the N rows are used as a circular  buffer so that new values received will overwrite  the oldest values stored           5 2 Data Representation Mapping           
10.    char        wchar    or    octet      an extra  column with the suffix     length    is also added to the table to hold the current length of  the type  Also  each column that represents a field in an element of the variable length  type must have a suffix     x     in its name that identifies the index of the element  where    x   0 to  max_length   1     During the serialization and deserialization process  the daemon will usually be work   ing with less than the maximum length of data  and thus  will need to use the hierarchi   cal naming along with the suffix to determine which columns belong to unused  elements that should be skipped     This hierarchical flattening operation of member names may lead to very long column  names in the generated table and can easily exceed the maximum number of characters  supported by the database  some databases limit the column names to 30 characters      To reduce the length of the generated names  you can instruct RTI Real Time Connect to  consider only the first n and the last m characters of the flattened name  and eventually  resolve any conflict by using a progressive number between the prefix and the suffix   The two tags  lt id _member_prefix_max_length gt  and   lt idl_member_suffix_max_length gt   see page 4 24   defined in the configuration file   described in Section 4 4  and the columns idl_member_prefix_max_length and  idl_member_suffix_max_length in the meta tables  described in Section 4 5 1 1 9  tell  the daemon the 
11.    long my_field x INTEGER    my_field x     unsigned long my_field x INTEGER    my_field x          a  The column storing the last bit field in a set of bits will use name of    my_field  x        5 13    Bulddo  opoq pup    OYWUDWESS TOS 1AI  S    Chapter 5       5 2 5    5 2 6    Table 5 9    5 2 7    5 14    Enum Types Mapping  IDL enumeration fields are mapped to columns of type SQL INTEGER  No special nam     ing is required     Simple IDL Structures    Simple IDL structures containing only basic or primitive types directly map to SQL  schemas with fields in the structure becoming columns in the table  Table 5 9 shows the  mapping of a simple structure between IDL and SQL    Simple Structures in IDL and SQL    IDL Types SQL Table Schema                CREATE TABLE    MyStructContainer          my_key_field    INTEGER NOT NULL         my_short_field    SMALLINT NOT NULL   PRIMARY KEY  my_key_ field           struct MyStruct    long my_key field     key   short my_short_field                        i  a  IDL fields marked as DDS keys are mapped to the primary keys of SQL tables     Complex IDL Structures    IDL structures that contain more complex fields  fields that are structures  unions  or  sequences and arrays of types other than    octet        char    or    wchar    are mapped to SQL  tables by flattening the embedded structures so that their fields are all at the top  and    only  level   Structure fields    Elements of embedded structures map into individual tabl
12.    pub present access_ scope  VARCHAR 25     pub present ordered_access  NUMBER 3     pub partition name  VARCHAR 256       dw    dw    dw    dw    dw    dw    dw    dw    dw    dw    dw    dw   PRIMARY KI     durability kind  VARCHAR  30   liveliness lease_dur sec  NU               MBER  10            liveliness lease_dur nsec  NUMBER  10      deadline period sec  NUMBER            10      deadline period nsec  NUMBER 10      history kind  VARCHAR 21    history depth  NUMBER 10    ownership kind  VARCHAR  23         ownership_strength value  NUMBER 10      publish_mode kind  VARCHAR  2    9      res_limits max_samples  NUMBER 10    res_limits max_instances  NUMBER 10            EY  table_owner table_name  domain_id  topic_name     4 39    jOeuUOD SU     De  y  La Buisn    7    Chapter 4       MySQL      Create Table RTIDDS_PUBLICATIONS    table_owner VARCHAR 128  NOT NULL   table_name VARCHAR 128  NOT NULL   domain_id INTEGER NOT NULL   topic_name VARCHAR  200    type_name VARCHAR 200    table_history_depth INTEGER   resolution_column VARCHAR  255    idl_member_prefix_max_length INTEGER   idl_member_suffix_max_length INTEGER   profile name VARCHAR  255     pub present access_scope  VARCHAR 25     pub present ordered_access  TINYINT    pub partition name  VARCHAR 256     dw durability kind  VARCHAR  30     dw liveliness lease_dur sec  INTEGER    dw liveliness lease_dur nsec  INTEGER    dw deadline period sec  INTEGER    dw deadline period nsec  INTEGER     dw  history kind  V
13.    tar      dr    multicas   multicas  PRIMARY KEY      reliability kind  VARCHAR      destination_order kind  VA    liveliness lease_dur sec   liveliness lease_dur nsec   deadline period sec        27     RCHAR  43    INTEGER   INTEGER           INTEGER              INTEGER        deadline period nsec   history kind  VARCHAR 21    history depth  INTEGER              ownership kind  VARCHAR 23      time_filter min_sep sec    time_filter min_sep nsec   res_limits max_samples   res_limits max_instances   unicast receive_port        INTEGER    INTEGER        INTEGER     INTEGER        pi  lt     INTEGER         receive_address    receive_port           VARCHAR  39               INTEGER   table_owner  table_name  domain_id  topic_name     4 53    jOeuUOD SU     De  y  La Buisn    7    Chapter 4       Oracle TimesTen  with command line option  typeMode 0      Create Table RTIDDS_SUBSCRIPTIONS    table_owner TT_VARCHAR 128  NOT NULL   table_name TT_VARCHAR 128  NOT NULL   domain_id TT_INTEGER NOT NULL   topic_name TT_VARCHAR  200    type_name TT_VARCHAR  200    table_history_depth TT_INTEGER   process_batch TT_INTEGER    process_period sec  TT_INTEGER    process_period nsec  TT_INTEGER   commit_type TT_VARCHAR  17    cache_maximum_size TT_INTEGER   cache_initial_size TT_INTEGER   delete_on_dispose TT_INTEGER   idl_member_prefix_max_length TT_INTEGER   idl_member_suffix_max_length TT_INTEGER   profile_name TT_VARCHAR  255    filter_duplicates TT_TINYINT   ordered_store TT_TINYINT   
14.    unsigned my_field INTEGER    my_field     unsigned long my_field INTEGER    my_field     double my_field DOUBLE    my_field     float my_field FLOAT    my_field     string lt x gt  my_field VARCHAR x     my_field str    d  wstring lt x gt  my_field NVARCHAR x     my_field str    d  long long my_field BIGINT    my_field     unsigned long long my_field BIGINT    my_field     long double my_field BINARY 16     my_field ld        unsigned long long my_field DATETIME    my_field                      a  The format on the wire of    char    and    char x     is the same     b  The format on the wire of    wchar    and    wchar x     is the same     c  The format on the wire of    octet   and    octet x     is the same   d  The     str    suffix is used to distinguish between     w string lt x gt     and    sequence lt  w char x gt       e  The     ld    suffix is used to distinguish between    octet x     and    long double        Oracle In Memory Database Cache Mapping    When RTI Real Time Connect to TimesTen is used with Oracle In Memory Database  Cache  the definition of cache groups requires mapping the Oracle SQL types to Times   Ten SQL types  Table 5 5 describes the mapping supported by RTI Real Time Connect     MappingBetween Oracle and TimesTen types                               Oracle Type TimesTen Type  TypeMode 0   CHAR   CHAR    VARCHAR2 x  VARCHAR2 x   NCHAR x  NCHAR x   NVARCHAR2 x  NVARCHAR2 x   RAW x  VARBINARY x   NUMBER 3  TT_TINYINT  NUMBER 5  TT_SMALLINT   
15.   An infinite lease duration is specified if both columns are NULL or contain the  value 2147483647  2      1   This is the DDS default value       A non zero value representing the number of seconds and nanoseconds for the  lease duration     Note  The DDS_LivelinessQosPolicy kind is always set to  DDS_AUTOMATIC_LIVELINESS_QOS     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dw liveliness lease_dur  Section 4 5 1 1 14   dr owner   ship kind  Section 4 5 2 1 21   and dw ownership kind  dw ownership_strength value   Section 4 5 1 1 17      dr deadline period    These columns specify the deadline period for the DDS_DeadlineQosPolicy for the  DDSDataReader created to subscribe to DDSTopic data that is stored in the table  By set   ting the values in this column  the user is setting an expectation that DDSDataWriters  will publish new values for data instances at least as fast as the deadline period     The possible values of the  lt drdeadline period sec gt   seconds  and  lt dr dead   line period nsec gt   nanoseconds  columns are     4 69    JOoUuUOD SU     De  y  La Buisn  y    Chapter 4       4 5 2 1 20    4 70    l An infinite deadline period is specified if both columns are NULL or contain the  value 2147483647  2      1   This is the DDS default value     l A non zero value representing the number of seconds and nanoseconds for the  deadline period     See the RTI Data Distribution Service documentation
16.   If a table change is not committed in the  interval specified by this attribute  it will not be published to  DDS    Uncommitted table changes are stored in a per table queue   The maximum size of that queue can be configured setting  the value of the changes_queue_maximum_size column in    If a change in the uncommitted changes queue has not been  committed after transaction_max_duration milliseconds  it  will be discarded by the RTI Real Time Connect Daemon    With a value of  1  the RTI Real Time Connect Daemon will not  discard changes into the uncommitted queue until they are  committed     Default  5000          the RTIDDS_PUBLICATIONS table  see Section 4 5 1 1 20   Oorl          Table 4 10 Tags for Oracle Connections                   BLOB columns is determined on a per column basis using the Type   Code information     Default  65536       Additional Tags Number  Allowed within Description of Tags   lt oracle_connection gt  Allowed  Limits the size of CLOB and NCLOB columns for tables that do not  have an associated TypeCode  see Section 4 1 4  in the  RTIRTC_TBL_INFO meta table  see Section 4 5 3     lt clob_default_size gt  If a user table has an associated TypeCode  the maximum size of the   0 or 1  CLOB and NCLOB columns is determined on a per column basis  using the TypeCode information   Default  65536  Limits the size of BLOB columns for tables that do not have an associ   ated TypeCode  see Section 4 1 4  in the RTIRTC_TBL_INFO meta  table  see Section 4 5 
17.   The RTI Real Time Connect Daemon had a  49 Error adding record to publication cache problem adding a new record to the publi   cation database cache   1024   2047 RTI Data Distribution Service related errors  These messages are produced through the interaction of the RTI Real Time Connect Daemon with  the RTI Data Distribution Service  More information on each error can be found by examining the  native RTI Data Distribution Service errors codes that will be logged with these messages   General RTI Data Distribution Service error  1024  lt message gt   message                 A 5    SOPOD 10113  Y    Appendix A       Table A 1                                                                                                    RTI Real Time Connect Errors and Warnings  Code Message Details  1025 Error getting  lt entity gt  default QoS  1026 Error getting  lt entity gt  QoS  1027 Error setting  lt entity gt  QoS  1028 Error creating  lt entity gt   1029 Error getting  lt entity gt   1030 Error enabling  lt entity gt   1031 Error cloning type code  1032 Error reading RTI DDS samples  1033 Error setting  lt entity gt  user data  1034 Error disposing RTI DDS instance  1035 Error unregistering RTI DDS instance  1036 Error writing RTI DDS sample  1037 Error ignoring  lt entity gt   1038 Error creating  lt waitset type gt  waitset  1039 Error waiting in  lt waitset type gt  waitset  1040 Error getting builtin transport property  1041 Error setting builtin transport property  1042 Er
18.   This section  presents the various approaches  listed in load order     The first three locations only contain QoS Profiles and are inherited from RTI Data Dis   tribution Service  see Chapter 15 in the RTI Data Distribution Service User s Manual      T  NDDSHOME tesource qos_profiles_4 5x  xml NDDS_QOS_PROFILES xml    This file contains the RTI Data Distribution Service default QoS values  it is loaded  automatically if it exists   First to be loaded      T File in NDDS_QOS_PROFILES    The files  or XML strings  separated by semicolons referenced in this environ   ment variable are loaded automatically     L   lt working directory gt  USER_QOS_PROFILES xml  This file is loaded automatically if it exists   The next locations are specific to RTI Real Time Connect     LJ  lt RTI Real Time Connect executable location gt         resource xml   RTI_REAL_ TIME _CONNECT xml    This file contains the default RTI Real Time Connect configuration and QoS Pro   files  it is loaded if it exists  The default configuration does not work out of the   box because it requires setting the parameters that configure the database con   nections such as dsn  username and password  see Section 4 4 4      I  lt working directory gt  USER_REAL_TIME_CONNECT xml  This file is loaded automatically if it exists   I File specified using the command line parameter  cfgFile    The command line option  cfgFile  see Section 4 2  can be used to specify a con   figuration file     You may use a combination of 
19.   are discovered     The DDSDataWriter   s DDS_DurabilityQosPolicy most also be set appropriately to per   mit the sending of historic  or past  published data  In addition  the column  lt dr reali   ability kind gt  for the entry must be set to    RELIABLE_RELIABILITY_QOS    for historic  data to be received     4 5 Meta Tables       4 5 2 1 16    The possible values for the  lt dr durability kind gt  column are     LI    VOLATILE_DURABILITY_QOS     default value if the column is NULL   This value means that the DDSDataReader does not request past data to be sent   L     TRANSIENT_LOCAL_DURABILITY_QOS       This value requests that existing DDSDataWriters of the DDSTopic send past  data that they are storing to the DDSDataReader   See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dw durability kind  Section 4 5 1 1 13  and dr reliabil   ity kind  Section 4 5 2 1 16      dr reliability kind    This column sets the DDSReliabilityQosPolicy for the DDSDataReader created to sub   scribe to DDSTopic data that is stored in the table  The value in this column determines  whether or not DDSDataWriters will send their data reliably to the DDSDataReader     If the value for  lt dr durability kind gt  is    TRANSIENT_LOCAL_DURABILITY_QOS      then the value for this column must be set to    RELIABLE_RELIABILITY_QOS        The possible values for the  lt dr reliability kind gt  column are     L     BEST_EFFORT_RELIABILITY_Q
20.   relational databases using the standard OMG DDS application programming interface   Integration between DDS and relational database applications is supported by an IDL   to SQL mapping that allows both types of applications to access a uniform data model     2 2 RTI Real Time Connect   s Unique Features       2 2 3    2 2 4    2 2 5    Flexibility and Scalability    By leveraging RTI Data Distribution Service Quality of Service  QoS  settings  RTI Real   Time Connect supports an unprecedented variety of deployment configurations to  accommodate a wide range of scenarios  from reliable point to point delivery to best   effort multicasting that enables real time transaction streaming to large numbers of  subscribers  By setting QoS policies  system throughput  response time  reliability   footprint  and network bandwidth consumption can be tuned to meet application  requirements  Previously  a system was hard coded with parameters set for a specific  operation profile during integration  In contrast  RTI Real Time Connect provides run   time configurable policy settings  which greatly enhances system deployment flexibility     Matching Real Time Performance    RTI Real Time Connect integration with the Oracle TimesTen In Memory Database allows  the user to capture data into standard relational databases at rates far exceeding most  application requirements  Data in Oracle TimesTen can be synchronized in the back   ground to a permanent Oracle database using the TimesTen optio
21.   semicolon separators          containing the RTI Data Distribution Service libraries to  the System variable    Path     You will need to reboot the computer for this change  to take effect     A better method for setting this environment variable  it only requires restarting  the Oracle database service and the Oracle listener service  is using the ext   proc ora file or the ENVS parameter in the file listener ora     Refer to the Oracle Net manual and this link for more information on the lis   tener ora file  http   download oracle com docs cd E11882_01 network 112   e10835 listener htm     Refer to this link for more information on extproc ora  http   download ora   cle com docs cd E11882_01 appdev 112 e10471 adfns_externproc htm     4 5    JOeUuUOD eu     De  y  La Buisn  y    Chapter 4       4 1 2 1    4 1 2 2    4 6    How to Run the RTI Real Time Connect Daemon with MySQL    Before RTI Real Time Connect will run correctly with a MySQL database  the procedures  described in this section must be completed     Installing MySQL ODBC 5 1 6 driver    The RTI Real Time Connect Daemon requires the installation of the MySQL ODBC 5 1 6  driver  or higher   The driver is not bundled with the MySQL server and must be  installed separately     The ODBC connector can be downloaded from http   dev mysql com downloads   connector odbc 5 1 html     The installation guide can be found at http   dev mysql com doc refman 5 1 en   connector odbc installation  html     The MySQL ODBC dri
22.  5 11       Bulddo opoq pup      yuow  s TOS 1AI  S    Chapter 5       Table 5 5 MappingBetween Oracle and TimesTen types       Oracle Type TimesTen Type  TypeMode 0           NUMBER 10  TT_INTEGER       BINARY_DOUBLE BINARY_DOUBLE       BINARY_FLOAT BINARY_FLOAT       NUMBER 20  TT_BIGINT       TIMESTAMP This mapping is not supported                5 2 4 Bit Field Mapping    IDL bit field type is an RTI extension that maps directly to C C   bit fields but are  stored in primitive types in Java with only the specified number of bits being significant   When mapped to SQL  a full primitive SQL type is used to store the value  but only a  subset of the bits are significant  A suffix must be added to the column name to indicate  to the RTI Real Time Connect Daemon which bits to serialize when translating the table  data into an IDL structure     The following tables show the mapping of bit fields between IDL and SQL     LJ Table 5 6     Bit Fields in IDL and SQL  TimesTen      LJ Table 5 7     Bit Fields in IDL and SQL  Oracle      LI Table 5 8     Bit Fields in IDL and SQL  MySQL        Table 5 6 Bit Fields in IDL and SQL  TimesTen        5 12                                     IDL SQL Type SQL Type Table Column  IDL Type Field Name    TypeMode 0   TypeMode 1  Name   TT_CHAR 1   char my_field x or CHAR 1     my_field x     CHAR 1   TT_NCHAR 1   wchar my_field x or NCHAR 1     my_field x     NCHAR 1   octet my_field x BINARY 1  BINARY 1     my_field x     short my_field x TT_SM
23.  ANSI_QUOTES             Note  The specific configuration of the MySQL server may require the use of additional  SQL mode strings when starting the server     How to Run the RTI Real Time Connect Daemons as Windows Services    On Windows  the RTI Real Time Connect Daemons  rtirtc_oracle exe  rtirtc_timesten exe  and rtirtc_mysql exe  can be run as system services  During the installation process  you  may choose to install these daemons as Windows services  which can then be controlled  through the Start  Programs  Administrative Tools  Services application  The RTI Real   Time Connect services will be installed in manual mode  Use the Services application to  change this automatic to have the services start when the Windows machine boots up     The configuration file used by the Windows services is the default file   lt RTI Real Time  Connect installation directory gt  resource xml RTI_REAL_TIME_CONNECT xnll       You can change the location of the configuration file by running the Windows service  with the command line option   cfgFile  see Section 4 2      Typecodes    Typecodes are runtime parsible descriptions of data  generated for user data types from  an IDL file by the RTI Data Distribution Service utility rtiddsgen  Typecodes are automati   cally propagated during the discovery process of DDS applications  Unless the user has  specifically disabled rtiddsgen from generating typecodes  applications built with types  generated by rtiddsgen should be propagating typeco
24.  I Joe Celko  Joe Celko   s SQL for Smarties  Advanced SQL Programming  expanded 2nd  Edition   Morgan Kaufmann  1999    LI Rick van der Lans  Introduction to SQL  Mastering the Relational Database Language   3rd edition   Addison Wesley  1999    For information on ODBC     L  Microsoft Corporation  Microsoft ODBC 2 0 Software Development Kit and Program   mer   s Reference  Microsoft Press  1997    For information on the C programming language       Brian W  Kernighan  Dennis M  Ritchie  The C programming Language  2nd edition    Prentice Hall Software Series  1988    Chapter 2 Introduction    2 1    This chapter presents a conceptual view of RTI Real Time Connect   s architecture and  highlights its unique features  It includes the following sections     L  The Edge to Enterprise Integration Solution  Section 2 1   L  RTI Real Time Connect   s Unique Features  Section 2 2        The Edge to Enterprise Integration Solution    RTI Real Time Connect is a solution for integrating existing applications  including ser   vice oriented architectures  SOAs   with high performance real time applications  data   and edge devices  RTI Real Time Connect provides a run time bridge between RTI s high   throughput  embeddable messaging infrastructure  RTI Data Distribution Service  and  integration and data management standards such as SQL  XML  Web services and JMS   This allows developers to benefit from the performance  scalability  Quality of Service   QoS  control and broad platform s
25.  If the subscriptions entry has an associated QoS profile  RTI Real Time Connect will use  the values in this profile to create the participant  The participant will also be configured  using the QoS values of a profile when the attribute  is_default_qos  is set to 1 in that  profile  see the RTI Data Distribution Service User   s Manual for additional details      topic_name  type_name    These columns define the DDSTopic that will be subscribed to and whose received val   ues will be stored in the associated table  The     lt topic_name gt     and     lt type_name gt      entries need to match the DDSTopic used by DDSDataWriters sending data changes     If the RTI Real Time Connect Daemon has discovered the typecode associated with the   lt type_name gt  and the user table does not exist in the database  the daemon will use the  typecode to create the table using entries in the  lt table_owner gt  and  lt table_name gt  col   umn  See User Table Creation  Section 4 6  for more details     table_history_depth    This column determines the number of values of each instance received by the DDSDa   taReader that can be stored in the table by the RTI Real Time Connect Daemon  For non   keyed DDSTopics  there is only a single instance  thus the  lt table_history_depth gt   would correspond to the maximum size of the table  in rows      For keyed DDSTopics  the RII Real Time Connect Daemon may store up to   lt table_history_depth gt  values of each instance of the DDSTopic that th
26.  Section 4 5 3 1 1  table_name VARCHAR 128  No N A  type_code VARCHAR 65000    Yes NULL Section 4 5 3 1 2                         table_owner  table_name    These columns specify the user table associated with the meta information described in  the other columns     Because a DBMS uses a combination of  lt table_owner gt   lt table_name gt  to identify a  table  both of these columns must have valid values     Note  In MySQL  the value of the table_owner column corresponds to the table schema    or database name     4 5 Meta Tables       4 5 3 1 2    4 5 4    4 5 4 1    type_code    This column contains the TypeCode information associated to the user table identified  by  lt table_owner gt   lt table_name gt      The TypeCode information stored in this table is used when publications and subscrip   tions are created after the RTI Real Time Connect Daemon is restarted     Log Table    A meta table named RTIRTC_LOG is used to store log messages generated by the dae   mon  Whether or not this table is created and used depends on the  loglevel option  see  Section 4 2  and the LOGTODB and LOGHISTORY RTI Real Time Connect Daemon con   nection attributes  see Section 4 4 4 2      Users should treat the contents of this table as read only  There is no reason for users to  modify this table  The number of rows in the Log table is controlled by the LOGHIS   TORY connection attribute  If set to  1  the table will hold as many log messages as gen   erated by the RTI Real Time Connect Da
27.  Semantic and Data Mapping  Then the daemon will proceed to create the associated  DDSDataReader  More about the creation of user tables by the daemon can be found in  User Table Creation  Section 4 6      How the daemon discovers and stores typecodes is described in Typecodes  Section  4 1 4      If the RTI Real Time Connect Daemon does not yet have a typecode associated with the  type_name  it will defer the creation of the DDSDataReader until the typecode is dis   covered  When a new typecode is discovered  the daemon will scan all rows in the  RTIDDS_SUBSCRIPTIONS meta table and create the user tables and DDSDataRead   ers for entries that were pending on the discovery of the typecode     JOeuUOD SU     De  y  La Buisn    7    Chapter 4       4 52    The daemon will also create the DDSDataReader if there is an entry in the  RTIDDS_SUBSCRIPTIONS table without an associated typecode  but the user subse   quently creates the corresponding table     If user applications modify an existing row in the RTIDDS_SUBSCRIPTIONS table   the RTI Real Time Connect Daemon will first delete the DDSDataReader that was created  for that entry  if it exists  and then go through the same process of trying to create the  user table and DDSDataReader as if the row was newly inserted     If user applications delete an existing row in the RTIDDS_SUBSCRIPTIONS table  the  RTI Real Time Connect Daemon will delete the associated DDSDataReader  if it exists      A flow chart describing this logic is 
28.  TINYINT YES 0 Section 4 5 2 1 10  ordered_store TINYINT YES 1 Section 4 5 2 1 11  persist_state TINYINT YES 0 Section 4 5 2 1 12  sub present access_scope VARCHAR 25  YES a Ns Section 4 5 2 1 13  sub present ordered_access TINYINT YES  0  false  Section 4 5 2 1 13  sub partition name VARCHAR 256   YES   Empty partition string Section 4 5 2 1 14  dr durability kind VARCHAR 30  YES VOLATILE_DURABILITY_QOS  Section 4 5 2 1 15          4 57    JOO UUOD SU     De  y  La Buisn    7    Chapter 4       Table 4 17 RTIDDS_SUBSCRIPTIONS Table Schema                                                                               Column Name SQL Type   Null  Default if NULL Described in     dr reliability kind VARCHAR 27  YES pe Section 4 5 2 1 16  dr destination_order kind VARCHAR 43    YES eee ee oo Section 4 5 2 1 17  dr liveliness lease_dur sec INTEGER YES  Infinite Section 4 5 2 1 18  dr liveliness lease_dur nsec INTEGER YES  Infinite Section 4 5 2 1 18  dr deadline period sec INTEGER YES  Infinite Section 4 5 2 1 19  dr deadline period nsec INTEGER YES  Infinite Section 4 5 2 1 19  dr history kind VARCHAR 21  YES KEEP_LAST_HISTORY_QOS Section 4 5 2 1 20  dr history depth INTEGER YES 1 Section 4 5 2 1 20  dr ownership kind VARCHAR 23  YES SHARED_OWNERSHIP_QOS Section 4 5 2 1 21  dr time_filter min_sep sec INTEGER YES  0 Section 4 5 2 1 22  dr time_filter min_sep nsec INTEGER YES JO Section 4 5 2 1 22  dr res_limits max_samples INTEGER YES  Infinite Section 4 5 2 1 23  dr res_limits ma
29.  These columns allow users to tune the RTI Real Time Connect Daemon for optimal  throughput performance  When the daemon receives data from a DataReader  it may be  configured to delay storing the data into a table and or committing the transaction until  more data arrives  For a data streams with high throughput  thousands of samples per  seconds  the ability for the daemon to process incoming data in batches greatly  improves the efficiency and ultimately the maximum sustainable throughput rate for a  given DDSTopic     The trade off is latency  The more data that is processed in a single batch  the more effi   ciently the processing can occur  However  A greater delay between the receiving of the  data by the daemon and the time that it can be accessed by user applications in the data   base     The column  lt process_batch gt  controls how many data samples are processed at a time  by the RTI Real Time Connect Daemon  Instead of executing SQL UPDATE or INSERT  every time data is received  the daemon only stores the data after it receives a certain  number of samples set by  lt process_batch gt   If the value  lt process_batch gt  is greater  than 1  then it is essential that the  lt process_period  sec nsec  gt  is set to be non zero   Thus  the daemon will process stored data periodically  even if the total number of data  samples received is less than  lt process_batch gt       lt process_period  sec nsec  gt  is an upper limit on the amount of delay that will be  incur
30.  Time Connect Daemon  See How to Run the RTI Real Time  Connect Daemon with Oracle  Section 4 1 1  for more infor   mation  By default  the daemon will ask the Oracle server to  look in the directory  ORACLE_HOME bin     If  lib  rtirti_oracle  so  dll  is installed on the server in a dif     ferent directory  then the RTI Real Time Connect Daemon  must be started with this option set to that directory            typeMode       This parameter is only available for rtirtc_timesten   exe     Specifies whether the names and semantics of the data types  in the TimesTen database follow Oracle or TimesTen type  rules     There are two possible values   e 0  Oracle type mode  default     e 1  TimesTen type mode    For additional information about TypeMode refer to Oracle    TimesTen In Memory Database Reference   Note  To work with Oracle In Memory Database Cache this  option must be set to 0           4 2 Command Line Parameters       Table 4 1 Command line Options       Option    Description           verbosity  lt verbosity level gt     RTI Real Time Connect verbosity level    0   No verbosity   1   Exceptions  DDS and RTI Real Time Connect   default   2   Warnings  RTI Real Time Connect    3   Information  RTI Real Time Connect    4   Warnings  DDS and RTI Real Time Connect    5   Tracing  RTI Real Time Connect    6   Tracing  DDS and RTI Real Time Connect     Each verbosity level  n  includes all the verbosity levels  smaller than n     As the RTI Real Time Connect Daemon runs 
31.  a description of the elements contained             inside  lt real_time_connect gt         Because a configuration file may contain multiple  lt real_time_connect gt  tags  one file  can be used to configure multiple daemon executions  When you start RTI Real Time  Connect  you have to use the  cfgName option to specify which  lt real_time_connect gt   tag to use     For example    lt dds gt   dresi tine connect name  rtcA  gt    lt   real tine conect  gt    lt real_time_connect name  rtcB  gt   E N     lt  dds gt     Starting RTI Real Time Connect with the following command will use the   lt real_time_connect gt  tag with the name rtcA     rtirtc_mysql  cfgFile example xml  cfgName rtcA    If there is no  lt real_time_connect gt  tag matching the name provided with the command  line option    cfgName  the daemon will report an error and it will list the available con   figurations     4 19    jOeuUOD SU     De  y  La Buisn    7    Chapter 4                                     4 4 4 Database Configuration Using the Real Time Connect XML Tag  Table 4 3 describes the tags allowed with the  lt real_time_connect gt  section of the XML  file   Table 4 3 Real Time Connect Tags  Tags within Description Number of Tags Allowed   lt real_time_connect gt   Contains attributes that are inde   pendent of any particular data    lt general_options gt  base connection made by the RTI   0 or 1  Real Time Connect Daemon  See  Section 4 4 4 1    lt datab an in Configures how the IDL identifie
32.  and line number of the RTI Real Time  Connect Daemon code where the message was generated  It is useful only to support  engineers at RTT     code  native_code  message    The code column contains the RTI Real Time Connect error code that correspond to the  message  This column will have NULL entries for messages of type    STATUS        The native_code column will contain the error code of any external APIs  e g   ODBC   OS  RTI Data Distribution Service  that the daemon has called and returned an error  This  column may have NULL entries     Finally  the message column will contain a statement with details on why the message  was generated     4 77    jOouUOD SU     De  y  La Buisn    7    Chapter 4       4 6    4 78    For a complete list of possible error codes and messages that can be generated by the  RTI Real Time Connect Daemon  please see Appendix A        User Table Creation    The RTI Real Time Connect Daemon may create tables automatically for user applications  in the database when entries are made in the RTIDDS_PUBLICATIONS or  RTIDDS_SUBSCRIPTIONS meta tables  see Sections 4 5 1 and 4 5 2   The daemon will  create the table with the table owner and table name specified in an entry in one of those  tables if     1  There is no existing table in the database with the same   lt table_owner gt   lt table_name gt  identifier     and    2  A type corresponding to the  lt type_name gt  column for the entry has been  defined in the XML configuration file  see Section 
33.  associated with the source of  the data when it was sent or the one associated with the data when it was received  the  DDSDataReader will use     This column has no practical effect unless the value of the  lt dr ownership kind gt  column  is    SHARED_OWNERSHIP_QOS        The possible values for the  lt dr destinaton_order kind gt  column are     LJ    BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS      default value if the column is NULL     This configures the DDSDataReader to use the timestamp of when the data was  received to determine whether or not to drop the data  In practice  this setting  means all data received from all DataWriters will be accepted since the time   stamp will always be newer for the new data     L     BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS       This value means that the DDSDataReader will use the timestamp that was sent  with the data in determining whether or not to accept the data  This timestamp  was added by the DDSDataWriter when the data was published  Because differ   ent DDSDataWriters may run in applications on different machines  it is likely  that the clocks on the different machines are only synchronized to a certain reso   lution or not synchronized at all     Thus the DDSDataReader may receive data with timestamps older than the last  data that received and thus drop those data  However if all DDSDataReaders of  the same DDSTopic used the source timestamp to filter the data  then all DDSDa   taReaders will end up with the same fina
34.  default value is 10 if this column is NULL     The possible values of the  lt process_period sec gt   seconds  and  lt process_period nsec gt    nanoseconds  columns are     Lio    If both columns are 0  then the daemon will not commit received samples peri   odically     Lin gt 0    A background thread will process received but un stored data at the period spec   ified by these columns  It is essential that a non zero period be used if   lt process_batch gt  is greater than 1 to insure that all received data is eventually  stored     The default value for process period is 0 1 seconds  0 sec  100000000 nanosec  if  both columns are NULL     The possible values of the  lt commit_type gt  column are     LJ    COMMIT_ON_PROCESS     default value if the columns are NULL     This value will direct the RTI Real Time Connect Daemon to commit the storage of  a batch of data as a single transaction  This will result in higher performance at  the risk of losing more data than necessary when the transaction is rolled back  because an error with the database     4 5 Meta Tables       4 5 2 1 6    4 5 2 1 7    4 5 2 1 8    LI    COMMIT_ON_SAMPLE       This value will direct the daemon to commit the storage of each data sample as a  separate transaction  Although the daemon will use more resources  if an error  occurs when a transaction is committed  only that data sample is lost     cache_maximum_ size  cache_initial_size    These columns control the size of a cache  used to store keys 
35.  demanding real time  application domains     UOHONPONU  Z    Chapter 2       2 8    Chapter 3 Architecture    3 1    This chapter presents a more detailed view of RTI Real Time Connect   s architecture and  highlights the different ways that RTI Real Time Connect can be used to integrate sys   tems  It includes the following sections     LJ RTI Real Time Connect Architecture  Section 3 1    1 Capturing Real Time Data in a DBMS  Section 3 2    I Remote Real Time Notification of Table Changes  Section 3 3    I Bidirectional Integration  Section 3 4    I Bridging between DDS Domains  Section 3 5    Ll High Rate Data Streams Cached before Storage  Section 3 6   k  Real Time Database Replication  Section 3 7        RTI Real Time Connect Architecture    The RTI Real Time Connect architecture is designed to integrate existing systems that use  the DDS API or relational databases with minimal modification to working applica   tions  In many situations  existing applications do not have to change at all     As seen in Figure 3 1  RTI Real Time Connect consists of a daemon that acts like bridge  between two software development domains  One uses the OMG Data Distribution Ser   vice API to publish and subscribe to data that may be generated at high rates with real   time constraints  The other applies algorithms and logic representing business processes  to megabytes  gigabytes or terabytes of data stored in relational databases     3 1    oInjoopyoiy  E    Chapter 3       Figure 3 1 R
36.  direct the daemon to connect to a database  No   se  other connections will be made after startup        lt publications gt     Example      lt real_time_connect name  MyRtc    gt    lt mysql_connection gt    lt dsn gt Example_MySQL lt  dsn gt    lt user_name gt Student lt  user_name gt    lt password gt mypsswrd lt  password gt    lt send_period gt 100 lt  send_period gt    lt database_logging gt    lt enabled gt true lt  enabled gt    lt history_depth gt 100 lt  history_depth gt    lt  database_logging gt    lt publications gt    lt publication gt     lt  publication gt    lt  publications gt    lt subscriptions gt    lt subscription gt     lt  subscription gt    lt  subscriptions gt    lt  mysql_connection gt    lt  real_time_connect gt           Table 4 8 describes tags allowed within all three types of  lt database_connection gt  tags   Tables 4 9 through 4 11 describe additional tags for each connection type     4 26    4 4 Configuration File       Table 4 8 Common Tags for all Database Connections       Common Tags  for     lt oracle_connection gt       lt mysql_connection gt       lt timesten_connection gt     Description    Number of Tags  Allowed           lt dsn gt     You must specify a valid DSN that is found in a  ODBCINI file or the Windows registry  see Environ   ment Variables  Section 4 3    The RTI Real Time Con   nect Daemon will make a connection to this DSN     RTI Real Time Connect detects changes in an Oracle  TimesTen data store by reading from the t
37.  for more details on how this QoS  policy may be used  See also dw deadline period  Section 4 5 1 1 15      dr history kind  dr history depth    These columns directly map to the DDS_HistoryQosPolicy for the DDSDataReader cre   ated to subscribe to DDSTopic data that is stored in the table  The values set for this  QosPolicy affect the DDS_ReliabilityQosPolicy     Using a    KEEP_ALL_HISTORY_QOS    will ensure that reliable DDSDataReaders will  receive every change to the table reliably  With a    KEEP_LAST_HISTORY_QOS     the  RTI Real Time Connect Daemon will only guarantee that the last  lt dr history depth gt   changes for each data instance are received reliably     The possible values of the  lt dr history kind gt  and  lt dr history depth gt  columns are     I    KEEP_LAST_HISTORY_QOS       For this setting  the column  lt dr history depth gt  determines the maximum num   ber of values for each data instance that be buffered in the DDSDataReader  before the RTI Real Time Connect Daemon stores the received values into the  table      lt drhistory depth gt  should be set to an integer greater than 0  The default value  for history depth is 1 if this column is NULL     LJ    KEEP_ALL_HISTORY_QOS     default value if the column is NULL     This setting implies that the DDSDataReader created to subscribe to DDSTopic  data has an unlimited queue in which to save received data before the data is  stored in the table  The actual size of the queue is limited by the value in   l
38.  inserted  The meta tables RTIDDS_PUBLICATIONS and  RTIDDS_SUBSCRIPTIONS can be populated using the  lt publication gt  and  lt subscrip   tion gt  tags in the configuration file  see Section 4 4 4 4  or running Insert Update SQL  statements     There are two more meta tables created by the RTI Real Time Connect Daemon     L  The meta table RTIRTC_TBL_INFO will store the typecode associated with the  user tables created automatically by the RTC daemon  see Section 4 5 3      I The meta table RTIRTC_LOG will be created to store log messages generated by  the RTI Real Time Connect Daemon  Use of this table is controlled by command   line parameters and the connection discussed in Section 4 2 andSection 4 4 4 3     The following sections discuss the usage of these tables and describe the actions taken  by the daemon when these tables are modified     LJ Publications Table  Section 4 5 1   I Subscriptions Table  Section 4 5 2    J Table Info  Section 4 5 3    I Log Table  Section 4 5 4     4 35    JOoUuUOD OSU     De  y  La Buisn    7    Chapter 4       4 5 1    4 36    Publications Table    When entries  rows  are added to the meta table RTIDDS_PUBLICATIONS  the RTI  Real Time Connect Daemon will try to create a DDSDataWriter  and DDSPublisher along  with a DDSDomainParticipant if required  and use it to send changes to the designated  user table via the RTI Data Distribution Service     If the RTIDDS_PUBLICATIONS table does not exist at startup  the RTI Real Time Con   nect Dae
39.  instructs RTI Real Time Connect  to use all the available characters     profile_name    This column specifies the name of the QoS Profile that RTT Real Time Connect will use to  create the publication     The name must have the following format    lt QoS profile library name gt    lt QoS profile name gt     See the RTI Data Distribution Service documentation for a complete description of QoS  Profiles     The QoS values specified in the publication table  if they are not NULL  take precedence  over the same values specified in the QoS profile     pub present access_scope  pub present ordered_access    These two columns map directly to the DDS_PresentationQosPolicy of the  DDS_PublisherQos used by the DDSPublisher that is created with the DDSDataWriter  for publishing changes to the table  The DDS_PresentationQosPolicy specifies how the  samples representing changes to data instances are presented to a subscribing applica   tion     The specific columns affect the relative order of changes seen by subscribers to the table   The values of these columns must be coordinated with the values of the  DDS_PresentationQosPolicy used by the DDSSubscriber in the receiving application or  else published data may not be received by the subscriber     The possible values for the  lt pub present access_scope gt  column are     L     INSTANCE_PRESENTATION_QOS     default value if the column is NULL   LI    TOPIC_PRESENTATION_QOS     LI    GROUP_PRESENTATION_QOS       The possible values fo
40.  it may generate  log messages reflecting error conditions  warning messages  or general execution status  The messages may be produced  by the daemon or by RTI Data Distribution Service     The messages produced by the daemon can be redirected to  three possible destinations  stdout stderr  a file  and log  tables in the databases to which it is connected Each of these  destinations may be enabled independently of each other   The first two  stdout stderr and file  are controlled by com   mand line parameters discussed above  and the last  log  table  is controlled in the configuration of a connection  as  discussed in Database Connection Options  Section 4 4 4 3      In this RTI Real Time Connect version  the messages produced  by RTI Data Distribution Service can be redirected only to std   out stderr         version    Prints the RTI Real Time Connect version               queueDomainId  lt DDS domain ID gt        This parameter is only available for the rtirtc_oracle   exe   for Oracle Database 11g and the rtirtc_mysql   exe  for  MySQL    The RTI Real Time Connect Daemon uses RTI Data Distribution  Service to communicate with the MySQL and Oracle 11g  servers  This command line option sets the DDS domain ID  used for the connection between the daemon and the servers     Default  1          JOo UuUOD SU     De  y  La Buisn    7    Chapter 4       4 3    4 4    4 14       Environment Variables    Since the RTI Real Time Connect Daemon will be making connections to databas
41.  large for the daemon  By increasing the  DDSDomainPartici   pantQos  resource_limits type_code_max_serialized_length QoS policy  the daemon  can be configured to handle larger typecodes for complex IDL types     The RTI Real Time Connect Daemon will store all the typecodes that it receives with dis   covered DDSTopics  These typecodes may be used by the daemon to create user accessi   ble tables in the database from which changes are published or data received via DDS is  stored  See Publications Table  Section 4 5 1  and Subscriptions Table  Section 4 5 2  for  more information of how typecodes are used by the daemon        Command Line Parameters    Any user can start an RTI Real Time Connect Daemon  The user name ID and password  with which it connects to a database is specified in the configuration file  see Table 4 8     When starting an RTI Real Time Connect Daemon  the following command line parame   ters are supported  the  cfgName parameter is required     Usage  rtirtc_mysql  options     Options     cfgFile  lt file gt  Configuration file  This parameter is optional  since the configuration can be loaded from  other locations    cfgName  lt name gt  Configuration name  This parameter is required    4 9    JOouUOD eu     De  y  La Buisn    7    Chapter 4       4 10     appName  lt name gt    logFile  lt file gt    noDaemon   use42eAlignment     queueLibPath  lt path gt         queueDomainId  lt int gt      dbTransport  lt 1 2 gt      typeMode     verbosity     versi
42.  my_field   RAW 1     my_field bin    d  octet x      my_field   RAW x     my_field bin    4  sequence lt octet x gt       my_field RAW x  if x  lt   2000  otherwise BLOB    my_field     boolean my_field NUMBER 3     my_field     short my_field NUMBER 5     my_field     unsigned short my_field NUMBER 5     my_field     unsigned my_field NUMBER 10     my_field     unsigned long my_field NUMBER 10     my_field                      5 9    Bulddo opoq pup  SHUDWSS 18S 1d1  S    Chapter 5                                     Table 5 3 Basic Types in IDL and SQL  Oracle   Continued   IDL Field Table Column  IDL Type Name SQL Type Name   double my_field BINARY_DOUBLE    my_field     float my_field   BINARY_FLOAT    my_field     string lt x gt  my_field VARCHAR2 x  if x lt   4000  otherwise CLOB    my_field str           wstring lt x gt  my_field NVARCHAR2 x  if x lt  4000  otherwise NCLOB      my_field str    d  long long my_field NUMBER 20     my_field     unsigned long long   my_field NUMBER 20     my_field     long double my_field RAW 16     my_field 1d    f  unsigned long long   my_field TIMESTAMP    my_field                a  The format on the wire of    char    and    char x     is the same     b  The format on the wire of    wchar    and    wchar x     is the same     c  The format on the wire of    octet    and    octet x     is the same        d  The     bin    suffix is only used for Oracle databases  not Oracle TimesTen   The reason is that Oracle doesn t  support SOL BINA
43.  of the DDSTopic is stored  For non keyed  topics  this implies the table will only have a single row  For keyed topics  each  instance will correspond to a single row in the table  This is the most common  value for tables that are published with DDS     No meta columns are added to help manage history   1    Exactly the same behavior as NULL or 0  a single value is stored in the table per  instance of the DDSTopic  However  table history meta columns are added to the  table schema if the RTI Real Time Connect Daemon creates the user table automat   ically     This value is useful for preparing the table to store more than a single value per  instance after the table is created  Because table schema cannot be changed to  accommodate the table history meta columns after a table has been created   using a value of 1 for this column is useful if the user wants to store historic val   ues of instances  but does not know how many instances to store at the time the  entry is made     4 5 Meta Tables       4 5 2 1 5    LIn gt 1    Meta columns will be added to accommodate the storing of historic values for  instances  The last n values received for an instance will be stored by the table     LI  1    Meta columns will be added to accommodate the storing of historic values for  instances  All values received by the DDSDataReader will be stored by the table     See User Table Creation  Section 4 6  for more information on meta columns     process_batch  process_period  commit_type   
44.  oie eE EE EEEE 3 7  3 6 High Rate Data Streams Cached before Storage             sn sssssrrsssssrrtssrtrrttssstrsttsnterntsnteentnt 3 8  37  R  al Time Database Replication          ccccecsessscsccesesvesovsossnnssscersesebnasevsareesnvtopesetnectoneteduasasnen 3 9    Using RTI Real Time Connect    Introduction to the RTI Real Time Connect Daemon         cccccscccsscessecesseesseeesseeseeesseesseeees 4 2  4 1 1 How to Run the RTI Real Time Connect Daemon with Oracle               cccc08 4 2  4 1 2 How to Run the RTI Real Time Connect Daemon with MySQL          scseee 4 6  4 1 3  How to Run the RTI Real Time Connect Daemons as Windows Services       4 8  AWA  Wy PCCOAGS sstscaescsesescies a tetardittecetacies cuetucessieeveutactsutgesh Ctusstelunschestus E EEE 4 8    vi    4 2  4 3  44    4 5    4 6    Command Line Parameters          ccccccssecessecssseessessscesseesseecsscecsecessecsseceseecseecaeceeseesseseseenses 4 9  Environment Variables isieissd  csssisssvidescesosiisseacceaeasss a a aa e a eaa erea 4 14  Configuration Fil  stsserssesskynes nansa aE EEE E E EE 4 14  4 4 1 How to Load the XML Configuration          e se ssesssessseressississssnirsisstsnessiesienresenss 4 15  4 4 2 XML Syntax and Validation       ccccccccccsesseesesesneteeeceesescsesnsesssesceeesesssnansneneaes 4 16  443     Yop Level XML lags ie  eres ecctercesesvet EE a E EEE E A E cxtSvusesvesevent 4 17  4 4 4 Database Configuration Using the Real Time Connect XML Tag                  4 20  Meta  Ta O
45.  tabveteteeses 5 16  52 10 NULL Vales  arein a a aa a a a E 5 17  9 2 11    Sparse Data Ty Pes wes iescicsciesscccrstssessivavesevteusesceserase disse cvsvaatastacsesvesstesvsvsceseesedeavens 5 17    Error Codes    Database Limits    B 1    B 2    Maximum Columns for Oracle 112      ccccceeeeccscsesesescscsesesesescscseseseseecscssseseesecesenensnecesanes B 2  Maximum Columns for MYSQL assier eeii aa EnS nsn Ea E Ei EEE ESENE B 2    Chapter 1 Welcome to RTI Real Time Connect    1 1    Welcome to RTI Real Time Connect   a high performance solution for integrating appli   cations and data across real time and enterprise systems from Real Time Innovations   Inc     RTI Real Time Connect is the integration of two complementary technologies  Data Dis   tribution Service  DDS  and Database Management Systems  DBMS   This powerful  integration allows your applications to uniformly access data from real time  embedded  and enterprise data sources via the DDS API  such as with RTI Data Distribution Service   or via the SQL API     I DDS is an Object Management Group  OMG  standard for high performance   data centric  publish and subscribe communication  DDS is organized around  the distribution of data in a global user data space across nodes on a network     I Relational Database Management Systems  DBMS  are an established standard  technology for the storage and management of large volumes of structured data   A DBMS organizes a global user data space around a table data model     
46.  the name of another member inside the  same type  RTI Real Time Connect will  resolve the conflict using an index   16388   Invalid configuration parameter  The QoS of an RTI Real Time Connect sub   scription is incompatible with the QoS of  32769   Requested incompatible QoS an RTI Data Distribution Service publication   The name of the policy that is incompatible  is shown in this warning message   The QoS of an RTI Real Time Connect publi   cation is incompatible with the QoS of an  32770   Offered incompatible QoS RTI Data Distribution Service subscription           The name of the policy that is incompatible  is shown in this warning message              Table A 1                   RTI Real Time Connect Errors and Warnings  Code Message Details   Ti iption lost  32771   Sample lost message An RTI Real Time Connect subscription los  a sample   E7 ioti  32772   Sample rejected message An RTI Real Time Connect subscription  rejected a sample                 SOPOD 10113  Y    Appendix A       A 10    Appendix B Database Limits    The maximum number of columns is limited by the underlying database product  The  maximum length of a column is independent of the database and it is limited to 30 char   acters  Table B 1 notes the database limits of RTI Real Time Connect              Table B 1 RTI Real Time Connect Database Limits  Oracle  Oracle 11g TimesTen 11 2 1 MySQL 5 1  For subscriptions  1000 4096  although the    effective maximum                               Maximum nu
47.  the topic  instance from the DDSDataWriter with the next highest ownership strength     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also drliveliness lease_dur  Section 4 5 2 1 18   drdead   line period  Section 4 5 2 1 19   and dw ownership kind  dw ownership_strength value   Section 4 5 1 1 17      dr time_filter min_sep    This column specifies the minimum separation duration between subsequent samples  for the DDS_TimeBasedFilterQosPolicy for the DDSDataReader created to subscribe to  DDSTopic data that is stored in the table  By setting the values in these columns  the  user configures the DDSDataReader to see at most one change every the  minimum_separation period     The possible values of the  lt dr time_filtermin_sep sec gt   seconds  and   lt dr time_filter min_sep nsec gt   nanoseconds  columns are     L A 0 minimum separation duration is specified if both columns are NULL or con   tain the value 0  This is the DDS default value  With this value  the DDSDa   taReader is potentially interested in all the samples     JOeuUOD SU     De  y  La Buisn    7    Chapter 4       4 5 2 1 23    4 5 2 1 24    4 5 2 1 25    4 72    l A non zero value representing the number of seconds and nanoseconds for the  minimum separation duration  That value must be smaller than the deadline  period and contained in the interval  0  1 year      See the RTI Data Distribution Service documentation for more details on how thi
48.  want to cre   ate and populate this table before the RTI Real Time Connect Daemon is started   Table 4 17 describes how each column is used by the daemon in creating DDSDataRead   ers and storing received data into tables     Table 4 17 RTIDDS_SUBSCRIPTIONS Table Schema                                                                                                                Column Name SQL Type E Default if NULL Described in     table_owner  VARCHAR 128   No N A Section 4 5 2 1 1  table_name  VARCHAR 128   No N A Section 4 5 2 1 1  domain_id  INTEGER No N A Section 4 5 2 1 2  topic_name  VARCHAR 200   YES    lt table_owner gt   lt table_name gt  Section 4 5 2 1 3  type_name VARCHAR 200   YES       lt topic_name gt  Section 4 5 2 1 3  table_history_depth INTEGER YES 0 Section 4 5 2 1 4  process_batch INTEGER YES 10 Section 4 5 2 1 5  process_period sec INTEGER YES 0 Section 4 5 2 1 5  process_period nsec INTEGER YES       100000000 Section 4 5 2 1 5  commit_type VARCHAR 17  YES COMMIT_ON_PROCESS Section 4 5 2 1 5  cache_maximum_size INTEGER YES  0 Section 4 5 2 1 6  cache_initial_size INTEGER YES 0 Section 4 5 2 1 6  delete_on_dipose INTEGER YES 0 Section 4 5 2 1 7  idl_member_prefix_max_length  INTEGER YES Mor hai in  the configura section dS 21 8  idl member_suffix_max_length  INTEGER YES ae te ecified im the Cente aah dee   RTI Real Time Connect will not  profile_name VARCHAR 255   YES   use a profile to create the publica    Section 4 5 2 1 9  tion  filter_duplicates
49. 23    jOeuUOD eu     De  y  La Buisn    7    Chapter 4       Table 4 7 Database Mapping Options       Tags within   lt database_mapping_  options gt     Description    Number  of Tags  Allowed           lt idl_member_prefix  max_length gt        Controls the prefix length of the IDL member identifiers that will be  used to truncate column names when a table is automatically cre   ated     If the default value   1  is used  RTI Real Time Connect will not trun   cate IDL member identifiers when these are used to create column  names    If a positive value  n  is provided  RTI Real Time Connect will use the  first n characters from the IDL member identifier to compose the  associated column name    A value of 0 tells RTI Real Time Connect to compose the column name  using only the last characters of the identifiers  as defined by   lt idl_member_suffix_max_length gt     This value can be overridden per table by assigning a value to the  idl_member_prefix_max_length column in the meta tables     Default   1  unlimited     Oorl        lt idl_member_suffix_  max_length gt           Controls the suffix length of the IDL member identifiers that will be  used to truncate column names when a table is automatically cre   ated     If a positive value  n  is provided  RTI Real Time Connect will use the  last n characters from the IDL member identifier to compose the  associated column name    A value of 0 tells RTI Real Time Connect to compose the column name  using only the first charact
50. 3     lt blob_default_size gt  If a user table has an associated TypeCode  the maximum size of the   0 or 1          4 29    jOoUuUOD eu     De  y  La Buisn    7    Chapter 4       Table 4 11 Tags for TimesTen Connections       Additional Tags  Allowed within   lt timesten_  connection gt     Description    Number  of tags  Allowed              lt xla_buffer_size gt     4 30       This attribute is only used if the Oracle TimesTen DSN specifies a diskless connec   tion    For diskless connections  the minimum size of the Oracle TimesTen XLA staging  buffer must be at least as big as the largest single SQL transaction executed  through the database connection  The size of a transaction is related to the aggre   gated size of data values that have changed as a result of the transaction  For exam   ple  if a transaction modifies every column in a row of a table  then the transaction  is at least as large as the size  in bytes  of a row    Note that a single transaction may modify multiple rows of a table  It is up to the  user to determine what the largest transaction size in a database may be and set the  XLABUFFERSIZE attribute for the RTI Real Time Connect Daemon appropriately   However  the maximum transaction size is only the minimum value that should be  set for XLABUFFERSIZE  You may need to set XLABUFFERSIZE to be much larger  since the XLA staging buffer in Oracle TimesTen must hold more than a single non   committed transaction simultaneously if there are multiple thre
51. 4 4 3      or    A typecode corresponding to the  lt type_name gt  column for the entry has been  discovered     If either condition above is not satisfied  then the daemon will not create the user table   If the user table already exists  then the daemon will attempt to use that table when pub   lishing or subscribing to DDSTopics  It is up to the user to create the table with a schema  that maps to the DDSTopic IDL type  See Data Representation Mapping  Section 5 2  for  details on how SQL table schemas and IDL types are mapped to each other     If the table does not exist and there is no XML definition for the type and the typecode  for the IDL type specified by the entry is unknown  the RTI Real Time Connect Daemon  will defer creation of the table until the typecode has been discovered from other appli   cations on the network that are using DDS  See Typecodes  Section 4 1 4  for more  details on how the daemon uses typecodes     If the table is created by the RTI Real Time Connect Daemon  the daemon may add up to  5 additional columns  6 in MySQL  that store meta data used by the daemon when stor   ing data received via DDS or sending table changes via DDS  Although optional  there  are specific operating scenarios where these meta columns are required for the proper  operation of the daemon  We suggest that the user understands the purpose of the meta   columns  and if the user applications create the tables used by the RTI Real Time Connect    4 6 User Table Creation 
52. 8  NOT NULL                             Each column of the Log meta table stores a different portion of a log message generated  by the RTI Real Time Connect Daemon  Table 4 19 describes these columns     Table 4 19 RTIRTC_LOG Table Schema                   Column Name SQL Type Nullable Default if NULL   Described in     id INTEGER NO N A Section 4 5 4 1 1  ts TIMESTAMP NO N A Section 4 5 4 1 2  type VARCHAR 7  NO N A Section 4 5 4 1 3                      4 76       4 5 Meta Tables       Table 4 19 RTIRTC_LOG Table Schema    4 5 4 1 1    4 5 4 1 2    4 5 4 1 3    4 5 4 1 4    4 5 4 1 5                                              Column Name SOL Type Nullable Default if NULL   Described in     function VARCHAR 64  NO N A Section 4 5 4 1 4  line INTEGER NO None Section 4 5 4 1 4  code INTEGER YES None Section 4 5 4 1 5  native_code INTEGER YES None Section 4 5 4 1 5  message VARCHAR 1024    NO N A Section 4 5 4 1 5  id    This column stores a strictly incrementing integer for each log message that is generated  by the daemon  The largest value in the id column is the last message that was pro   duced     ts    This column stores the system timestamp of when the log message was generated     type    This column stores the kind of log message  Possible values are     ERROR        WARN   ING        STATUS     and    SPECIAL        SPECIAL    messages are ones that are always  printed independently of the log level     function  line    These two columns contain the function name
53. ALLINT SMALLINT    my_field x     unsigned short my_field x TT_SMALLINT SMALLINT    my_field x             5 2 Data Representation Mapping       Table 5 6    Table 5 7    Table 5 8    Bit Fields in IDL and SQL  TimesTen   Continued                    IDL SQL Type SQL Type Table Column  IDL Type Field Name    TypeMode 0   TypeMode 1  Name   long my_field x TT_INTEGER INTEGER    my_field x     unsigned long my_field x TT_INTEGER INTEGER    my_field x                         a  The column storing the last bit field in a set of bits will use name of    my_field  x        Bit Fields in IDL and SQL  Oracle                                   Table Column  IDL Type IDL Field Name SQL Type Name   char my_field x CHAR 1     my_field x     wchar my_field x NCHAR 1     my_field x     octet my_field x BINARY 1     my_field x     short my_field x NUMBER 5     my_field x     unsigned short my_field x NUMBER 5     my_field x     long my_field x NUMBER 10     my_field x     unsigned long my_field x NUMBER 10     my_field x                            a  The column storing the last bit field in a set of bits will use name of    my_field  x        Bit Fields in IDL and SQL  MySQL                                            Table Column  IDL Type IDL Field Name SQL Type Name   char my_field x CHAR 1     my_field x     wchar my_field x NCHAR 1     my_field x     octet my_field x BINARY 1     my_field x     short my_field x SMALLINT    my_field x     unsigned short my_field x SMALLINT    my_field x  
54. ARCHAR  21      dw  history depth  INTEGER    dw ownership kind  VARCHAR  23     dw ownership_strength value  INTEGER    dw publish_mode kind  VARCHAR  29     dw res_limits max_samples  INTEGER    dw res_limits max_instances  INTEGER   changes_queue_maximum_size INTEGER    RTIRTC_SCN BIGINT DEFAULT 0    PRIMARY KEY table_owner table_name domain_id  topic_name                                                                              Users should use the same SQL statement in their own applications if they want to cre   ate and populate this table before the RTI Real Time Connect Daemon is started   Table 4 16 describes how each column is used by the daemon in creating and using  DDSDataWriters that publish table changes        1  See Starting the MySQL Server in ANSI_QUOTES mode  Section 4 1 2 4      4 40    4 5 Meta Tables       Table 4 16 RTIDDS PUBLICATIONS Table Schema                                                                                                             Column Name SQL Type  Nur Default if NULL Described in     table_owner   VARCHAR 128  No N A Section 4 5 1 1 4  table_name   VARCHAR 128  No N A Section 4 5 1 1 4  domain_id  INTEGER No N A Section 4 5 1 1 5  topic_name  VARCHAR 200   Yes  lt table_owner gt   lt table_name gt  Section 4 5 1 1 6  type_name VARCHAR 200  _   Yes  lt topic_name gt  Section 4 5 1 1 6  table_history_depth INTEGER Yes l0 Section 4 5 1 1 7  resolution_column VARCHAR 255   Yes   None Section 4 5 1 1 8  idl_member_prefix_max_
55. Distribution Service and Oracle Oracle  TimesTen MySQL databases  see the Release Notes for a list of compatible versions    the RTI Real Time Connect Daemon expects that typecodes for the IDL types used by DDS  applications have been generated and being propagated  If typecodes for IDL types  were not generated  users must create the tables  used by the daemon for storing or  publishing data  themselves or declare the types in the configuration files     How to Run the RTI Real Time Connect Daemon with Oracle    To run RTI Real Time Connect correctly with an Oracle database  you must complete the  procedures described in this section     These procedures are not needed when using RTI Real Time Connect with the Oracle  TimesTen In Memory database     To work with an Oracle database  there is a shared library distributed with RTI Real   Time Connect that must be installed correctly on the host of the Oracle database server   Communication by the RTI Real Time Connect Daemon with the Oracle server is accom   plished through external procedures executed by the server when triggers installed by    4 1 Introduction to the RTI Real Time Connect Daemon       the daemon are fired  These external procedures are provided in the shared library  on  UNIX based systems  or DLL  on Windows systems  called  lib  rtirtc_oracleq  so  dl       This library is distributed with RTI Real Time Connect and can be found in the lib    lt platform gt  directory of the installation directory  The corre
56. E    Chapter 3       3 6       High Rate Data Streams Cached before Storage    While disk based persistent databases can store terabytes of data  the performance of  such DBMSs is usually too low to capture data of real time applications streaming at  ultra high rates of tens of thousands to over a million samples per second  Figure 3 6  shows how RTI Real Time Connect can use the Oracle TimesTen In Memory database as a  front end cache to the persistent Oracle database  with Cache Connect to Oracle trans   ferring table data from memory to disk in the background     This solution enables the archival of high throughput DDS data streams that would oth   erwise be uncaptureable by standard database technologies     Figure 3 6 High rate DDS Streams are Cached Before Storing onto Disk    3 8                  ji  jy p or Ap  CU SZP  TimesTen Cache       Connect to Oracle  Se  Daemon   Oracle   times    High Performance  In Memory Database                                  Table Tracks Table Passengers  Fit Lat  Long  Fit Name Addrs   C129 34 5 102 3 C129 A  Johnson      C054 27 7 46 8 C054 J  Smith            Permanent disk  storage       High data rates    3 7 Real Time Database Replication       3 7       Real Time Database Replication    By running multiple RTI Real Time Connect daemons on different nodes connected to  different databases  and configuring all of the daemons to publish and subscribe to the  same table  changes made by applications to a table on one node can be a
57. E  If a table exists when the RTI Real Time Connect Daemon creates a DDS   DataWriter  the daemon will initialize the DDSDataWriter with the current contents of  the table such that those values will be sent to new DDSDataReaders with their  DDS_DurabilityQosPolicy set to     TRANSIENT_LOCAL_DURABILITY_QOS        See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dr durability kind  Section 4 5 2 1 15  and dr reliability kind   Section 4 5 2 1 16      dw liveliness lease_dur    These columns specify the lease duration for the DDS_LivelinessQosPolicy for the DDS   DataWriter created to publish table changes  The user may need to change the lease  duration if remote applications have modified their DDSDataReaders    corresponding  DDS_LivelinessQosPolicy to non default values     The possible values of the  lt dw liveliness lease_dur sec gt   seconds  and  lt dw liveli   ness lease_dur nsec gt   nanoseconds  columns are       An infinite lease duration is specified if both columns are NULL or contain the  value 2147483647  23    1   This is the DDS default value       A non zero value representing the number of seconds and nanoseconds for the  lease duration     Note  DDS_LivelinessQosPolicy kind is always set to  DDS_AUTOMATIC_LIVELINESS_QOS     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dr liveliness lease_dur  Section 4 5 2 1 18      dw dead
58. ESTAMP_DESTINATIONORDER_QOS  destination_order source_timestamp_tolerance sec   0  destination_order source_timestamp_tolerance nanosec   0  ownership kind   SHARED_OWNERSHIP_QOS       Performs conflict resolution          4 21    jOoUuUOD SU     De  y  La Buisn    7    Chapter 4       Table 4 5 DataWriter QoS Changes when  lt enable_table_replication gt  is true    Table    4 4 4     4 22       QoS Change    Purpose          protocol serialize_key_with_dispose   true    writer_data_lifecycle autodispose_unregistered_instances   false    Propagates delete operations       durability kind   TRANSIENT_LOCAL_DURABILITY_QOS    Sends table contents to late joiners   table initialization        history depth   1  history kind   KEEP_LAST_HISTORY_QOS    Keeps one record per primary key  value          writer_resource_limits instance_replacement    DDS_DISPOSED_INSTANCE_REPLACEMENT    writer_resource_limits replace_empty_instances    DDS_BOOLEAN_FALSE    Enables replacement of deleted  rows                   4 6 DataReader QoS Changes when  lt enable_table_replication gt  is true  QoS Change Purpose  reliability kind   RELIABLE_RELIABILITY_QOS Enables reliability       destination_order source_timestamp_tolerance sec    DURATION_INFINITE_SEC    destination_order source_timestamp_tolerance nanosec    DURATION_INFINITE_ NSEC    ownership kind   SHARED_OWNERSHIP_QOS     Performs conflict resolution    Note   lt enable_table_replication gt  sets some  QoS related to conflict resolution  
59. I DDS sample data received via RTI Data Distribution Ser   vice for storing into a table                    SOPOD 10113  Y    Appendix A       Table A 1                                        RTI Real Time Connect Errors and Warnings  Code Message Details  Could not create cache of known instance  30 Error creating key cache keys see cache_maximum_size   cache_initial_size  Section 4 5 2 1 6    Problem occurred while storing instance  31 Error inserting key in cache key in cache see cache_maximum_size   cache_initial_size  Section 4 5 2 1 6    A precondition failed in which a NULL  32 Null pointer argument pointer was passed to an internal daemon  function   33 Error reading table   lt table gt    The RTIDDS_PUBLICATIONS table con         tained an entry in the    resolution_column     The resolution column   lt column gt   does not      34 ne i   which does not match the name of an exist   exist in the table   lt table gt      f  ing column in the corresponding table  See  resolution_column  Section 4 5 1 1 8    The type of the resolution column   lt col  A column specified in the column  umn gt  in the table   lt table gt   is not valid  The      resolution_column    in the  35 type of the resolution column can be  RTIDDS_PUBLICATIONS table is not of an  SQL_INTEGER  SQL_SMALLINT  acceptable type  See resolution_column  SQL_BIGINT and SQL_TIMESTAMP  Section 4 5 1 1 8    Error gathering RTI Data Distribution Ser   36 Error gathering instance information vice instance informa
60. IONS    See Section 4 5 2     1  required         lt type_name gt         lt table_history_depth gt         lt process_batch gt         lt process_period gt         lt commit_type gt         lt cache_maximum_size gt         lt cache_initial_size gt         lt delete_on_dispose gt         lt idl_member_prefix  max_length gt            lt idl_member_suffix_  max_length gt         lt profile_name gt         lt filter_duplicates gt         lt ordered_store gt            lt persist_state gt        Inserts the tag value into the column with the same name  in the table RTIDDS_SUBSCRIPTIONS    If the value is not specified  NULL is inserted   See Section 4 5 2        Oorl          Table 4 14 Publications Tags       Tags Allowed within   lt publications gt     Description    Number of  Tags Allowed           lt publication gt     Configures a publication by inserting or updating a row  in the table RTIDDS_PUBLICATIONS  See Table 4 15 on       page 4 34        1 or more          4 33    JOO UUODd SU     De  y  La Buisn    7    Chapter 4       Table 4 15    4 34    Publication Tags       Tags Allowed within   lt publication gt     Description    Number of  Tags Allowed           lt table_owner gt         lt table_name gt         lt domain_id gt         lt topic_name gt     Inserts the tag value into the column with the same  name in the table RTIDDS_PUBLICATIONS     See Section 4 5 1    1  required         lt type_name gt         lt table_history_depth gt         lt resolution_column  g
61. In DDS  data is stored in data structures or classes defined using the Interface Definition  Language  IDL   In relational databases  data is stored in tables defined using SQL table  schemas  While there is a good correspondence of IDL primitive data types to SOL data  types  this mapping is not one to one  Both IDL and SQL have data types that the other  does not define nor has an unambiguous mapping  In addition  many complex data  structures in IDL such as unions and data structures that contain embedded data struc   tures do not have equivalents in SQL     5 3    Bulddo opoq pup      yuow  s TOS 1AI  S    Chapter 5       This section describes the mapping used by the RTI Real Time Connect Daemon when  taking data received with DDS and storing it in tables  or taking data from tables and  publishing it with DDS     I IDL to SQL Mapping  Section 5 2 1  on Page 5 4   I Primitive Types Mapping  Section 5 2 2  on Page 5 7   I Oracle In Memory Database Cache Mapping  Section 5 2 3  on Page 5 11  l  Enum Types Mapping  Section 5 2 5  on Page 5 14    I Simple IDL Structures  Section 5 2 6  on Page 5 14   1 Complex IDL Structures  Section 5 2 7  on Page 5 14   LJ Array Fields  Section 5 2 8  on Page 5 16    I Sequence Fields  Section 5 2 9  on Page 5 16   J NULL Values  Section 5 2 10  on Page 5 17   I Sparse Data Types  Section 5 2 11  on Page 5 17    5 2 1 IDL to SQL Mapping    Identifiers are used for the names of table columns in SQL and names of fields within an  IDL structu
62. L  MySQL      on page 5 10    5 7    Bulddo opoq pup    OHUDWUSS TOS 1AI  S    Chapter 5       Table 5 2    5 8    Basic Types in IDL and SQL  TimesTen                                                                 IDL SQL Type SQL Type Table  IDL Type Field Name  TypeMode 0   TypeMode 1    Column Name  char   my_field TT_CHAR 1  CHAR 1     my_field     or  CHAR 1   char x     my_field TT_CHAR x  CHAR x     my_field     or  CHAR x   sequence lt char x gt    my_field TT_VARCHAR x  VARCHAR x     my_field     or  VARCHAR2 x   wchar    my_field TT_NCHAR x  NCHAR 1     my_field     or  NCHAR 1   wchar x  b my_field TT_NCHAR x  or NCHAR x     my_field     NCHAR x   sequence lt wchar x gt    my_field TT_NVARCHAR x  NVARCHAR x  _      my_field     or  NVARCHAR2 x   octet    my_field BINARY 1  BINARY 1     my_field     octet x    my_field BINARY x  BINARY x     my_field     sequence lt octet x gt      my_field VARBINARY x  VARBINARY x       my_field     boolean my_field TT_TINYINT TINYINT    my_field     short my_field TT_SMALLINT SMALLINT    my_field     unsigned short my_field TT_SMALLINT SMALLINT    my_field     unsigned my_field TT_INTEGER INTEGER    my_field     unsigned long my_field TT_INTEGER INTEGER    my_field     double my_field BINARY_DOUBLE DOUBLE    my_field     float my_field BINARY_FLOAT REAL    my_field     string lt x gt  my_field TT_VARCHAR x  or VARCHAR x     my_field str    d          VARCHAR2 x                 5 2 Data Representation Mapping       Table 5 2    T
63. NS Table Schema                            Column Name SQL Type  Nur Default if NULL Described in     changes_queue_maximum_size INTEGER Yes   Infinite Section 4 5 1 1 20  RTIRTC_SCN BIGINT Yes  Next SCN number Section 4 5 1 1 21          a  Primary key column    4 5 1 1 4 table_owner  table_name    These columns specify the user table for which changes will be published using a DDS   DataWriter  Because a DBMS uses a combination of  lt table_owner gt   lt table_name gt  to  identify a table  both of these columns must have valid values should the user want  these entries to refer to an existing table     If no table exists in the database with the identifier     lt table_owner gt   lt table_name gt     at  the time that the daemon sees this entry in the RTIDDS_PUBLICATIONS meta table  it  will create a user table with this name automatically  see User Table Creation  Section  4 6      Note  In MySQL  the value of the table_owner column corresponds to the table schema  or database name     4 5 1 1 5 domain_id    This column specifies the DDS domain ID that will be used to publish changes in the  table  Before creating a DDSDataWriter  if no DDSDomainParticipant has previously  been created with the DDS domain ID  the RTI Real Time Connect Daemon will create a  DDSDomainParticipant with the specified ID     If the publications entry has associated a QoS profile  RTI Real Time Connect will use the  values in this profile to create the participant  The participant will also be c
64. NUMB  cache_initial_size NUMB  delete_on_dispose NUMBER 10    idl_member_prefix_max_length NUMBER 10    idl_member_suffix_max_length NUMBER 10    profile_name VARCHAR 255    filter_duplicates NUMBER  3     ordered_store NUMBER  3     persist_state NUMBER 3     sub present access_scope  VARCHAR 25     sub present ordered_access  NUMBER 3     sub partition name  VARCHAR 256     dr durability kind  VARCHAR  30     dr reliability kind  VARCHAR  27     dr destination_order kind  VARCHAR  43     dr liveliness lease_dur sec  NUMBER 10     dr liveliness lease_dur nsec  NUMBER 10     dr deadline period sec  NUMBER 10     dr deadline period nsec  NUMBER 10      dr  history kind  VARCHAR 21      dr  history depth  NUMBER 10     dr ownership kind  VARCHAR 23     dr time_filter min_sep sec  NUMBER 10     dr time_filter min_sep nsec  NUMBER 10     dr res_limits max_samples  NUMBER 10     dr res_limits max_instances  NUMBER 10     dr unicast receive_port  NUMBER 10     dr multicast receive_address  VARCHAR  39     dr multicast receive_port  NUMBER 10                                                               PRIMARY KEY  table_owner table_name  domain_id  topic_name     4 55    jOeuUOD SU     De  y  La Buisn    7    Chapter 4       Mysa_      Create Table RTIDDS_SUBSCRIPTIONS    table_owner VARCHAR 128  NOT NULL   table_name VARCHAR 128  NOT NULL   domain_id INTEGER NOT NULL   topic_name VARCHAR  200    type_name VARCHAR 200    table_history_depth INTEGER   process_batch INTEGER    proce
65. OS     default value if the column is NULL     This value means that the DDSDataWriters will send their data to the DDSDa   taReader using best efforts  Data may be lost if the system is too busy     LJ    RELIABLE_RELIABILITY_QOS       This value means that the DDSDataWriters will send their data to the DDSDa   taReader using a reliable protocol  The exact semantics of the reliable connection  is controlled by the DDS_HistoryQosPolicy of both the DDSDataWriter and  DDSDataReader     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dw durability kind  Section 4 5 1 1 13   dw history kind   dw history depth  Section 4 5 1 1 16   and dr history kind  dr history depth  Section  4 5 2 1 20      4 67    jOouUOD eu     De  y  La Buisn  y    Chapter 4       4 5 2 1 17  dr destination_order kind    4 68    This column sets the DDSDestinationOrderQosPolicy for the DDSDataReader created to  subscribe to DDSTopic data that is stored in the table  The value in this column deter   mines how the DDSDataReader treats data received for the same instance of the  DDSTopic from different DDSDataWriters     When a data instance is received  a timestamp associated with the data is compared to  the timestamp of the last value of the data instance  If the time of the new data is older  than the time of the last data received  for that instance   then the new data is dropped     What this column does is to set which timestamp  the one
66. OT NULL    VARCHAR  200            table_history_depth TT_INTEGER   resolution_column TT_VARCHAR  255      idl_member_prefix_max_length TT_INT       idl_member_suffix_max_length TT_INT    profile_name    TT_VARCHAR  255      NOT NUI       LL                 EG     ER              EG     ER         pub present access_scope  TT_VARCHAR     pub present     ordered_access            25         TT_TINYINT                              pub partition name  TT_VARCHAR  256     dw durability kind  TT_VARCHAR  30     dw liveliness lease_dur sec  TT_INTEGER    dw liveliness lease_dur nsec  TT_INTEGER    dw deadline period sec  TT_INTEGER    dw deadline period nsec  TT_INTEGER           4 5 Meta Tables                          dw  history kind  TT_VARCHAR  21     dw history depth  TT_INTEGER    dw ownership kind  TT_VARCHAR  23     dw ownership_strength value  TT_INTEGER    dw publish_mode kind  TT_VARCHAR  29     dw res_limits max_samples  TT_INTEGER    dw res_limits max_instances  TT_INTEGER   PRIMARY KI        Oracle Database 11g     Create Table RTIDDS_PUBLICATIONS  table_owner VARCHAR 128  NOT NULL   table_name VARCHAR 128  NOT NULL   domain_id NUMBER 10  NOT NULL   topic_name VARCHAR  200    type_name VARCHAR 200    table_history_depth NUMBER 10    resolution_column VARCHAR  255     member_prefix_max_length NUMBER 10      idl                   idl    EY  table_owner table_name  domain_id  topic_name          member_suffix_max_length NUMBER 10         profile name VARCHAR  255       
67. RTI Data Distribution Service errors codes that will be logged with these messages        General DBMS log connection error mes     4096  lt message gt   sage              8192   16383 OS related errors  These messages are produced through the interaction of the RTI Real Time Connect Daemon with  the operating system  More information on each error can be found by examining the native OS  errors codes that will be logged with these messages        8192    lt message gt  General OS error message        8193 Error handling OS signals          8194 Unable to set signal handler for  lt signal gt                 SOPOD 10113  VW    Appendix A                   Table A 1 RTI Real Time Connect Errors and Warnings  Code Message Details  8195 Error getting the host name  8196 Error allocating memory for  lt object gt              From 16384 Warning messages  These are warning messages that may be logged by the RTI Real Time Connect Daemon        Timestamps prior to  1970 01 01 00 00 00 00   cannot be used for conflict resolution                       16384   The RTC daemon will always use  1970 01   01 00 00 00 00  as the timestamp for those  cases  The Timestamp value of the resolution col   umn is NULL   16385    The RTC daemon will use the value  1970   01 01 00 00 00 00    16386   Diskless log buffer overflow Ei wearine appena wath Oracle  TimesTen databases   The prefix suffix based name associated  with member A in IDL type T collides with  16387   IDL member identifier collision
68. RTI Real Time Connect    User   s Manual    Version 4 5       2006 2010 Real Time Innovations  Inc   All rights reserved     277 Printed in U S A  First printing   re TI June 2010     Trademarks    Real Time Innovations and RTI are registered trademarks of Real Time Innovations  Inc  All other  trademarks used in this document are the property of their respective owners     Third Party Copyright Notices  The Oracle   TimeTen   In Memory Database and the Oracle   Database are products of Oracle     Copy and Use Restrictions   No part of this publication may be reproduced  stored in a retrieval system  or transmitted in any  form  including electronic  mechanical  photocopy  and facsimile  without the prior written  permission of Real Time Innovations  Inc  All software and documentation  whether in hard copy  or electronic form  enclosed are subject to the license agreement  The software and documentation  may be used or copied only under the terms of the license agreement     The programs in this book have been included for their instructional value  RTI does not offer any  warranties or representations in respect of their fitness for a particular purpose  nor does RTI  accept any liability for any loss or damage arising from their use     Technical Support   Real Time Innovations  Inc    385 Moffett Park Drive   Sunnyvale  CA 94089   Phone   408  990 7444   Email  support rti com   Website  http   www rti com support    Available Documentation    The following documentation 
69. RY x  or VARBINARY  x   Binary data must be always stored as variable length raw data    using the Oracle type RAW  Thus  Oracle RAW can be used to store IDL    octet    octet x     and       sequence lt octet x gt      The     bin    suffix allows the daemon to determine which is actually stored for Oracle    databases only     e  The     str    suffix is used to distinguish between     w string lt x gt     and    sequence lt  w char x gt         f  The     1d    suffix is used to distinguish between    octet x     and    long double        Table 5 4 Basic Types in IDL and SQL  MySQL                                                     IDL Type IDL Field Name SOL Type Table Column Name  char    my_field CHAR 1     my_field     char x    my_field CHAR x     my_field     sequence lt char x gt  my_field VARCHAR x     my_field     wchar  gt  my_field NCHAR 1     my_field     wchar x     my_field NCHAR x     my_field     sequence lt wchar x gt  my_field NVARCHAR x     my_field     octet    my_field BINARY 1     my_field     octet x   my_field BINARY  x     my_field     sequence lt octet x gt   my_field VARBINARY  x     my_field     boolean my_field TINYINT    my_field     short my_field SMALLINT    my_field                5 2 Data Representation Mapping       Table 5 4    5 2 3    Table 5 5    Basic Types in IDL and SQL  MySQL   Continued                                               IDL Type IDL Field Name SQL Type Table Column Name  unsigned short my_field SMALLINT    my_field  
70. S sccsocs cae seco sinvienlecaisosseduesiavessducedssssadeiavtatnfiesacsessh ideccdutet eivasssseesstuvesssceett Orsarink 4 35  4 5    Publications  Table sen Treanna a A EEEE AERA ROA 4 36  45 2    Subscriptions Table cscc ccciscrcssccesssusecctesccssasccaretasventssoansssetstatacvesassegnsencheaseacsteasetat 4 51  4 5 3     Table  InifO 3 ecsiscdoassiies deasceeiieds n aa TE EE eee ea E 4 73  ADA  LOG Table scteccscscscenstscvesesvessevtsccedesivecachevscscviassescsevacestuesssterieacsieeceseies EA i ETSE 4 75  User Table Creati   iinis err a EAA E Ea eitia 4 78    IDL SQL Semantic and Data Mapping    5 1  5 2    Semantic Mapping       ccccccccescsesesesesessseseescsesesesescscsesesescscscsesesescscsesesesescseseseececeessseseeeseaanes 5 1  Data Representation Mapping sisisi irie asensin avane ei aa ae e 5 3  521 IDL to SOL Mapping erreso enni eiaa ia a aan rae aaia 5 4  5 2 2 Primitive Types Mapping  essesi iiaii iii 5 7  5 2 3 Oracle In Memory Database Cache Mapping         cccccccescesesteteteseeeeneseeeenenes 5 11  924  Bit Field Mappings   ccsectecsceeccssstattestis eera iesi ds ps E Na ee Ree eo EERSTE SaaS 5 12  5 2 5 Enum Types Mapping       ccecccccccsesesessscscsesessscecssscseseececssscseececeanscseecessnensneeseeeaney 5 14  9 2 6     Simple IDL Structure Sasse seeno ii eii E iena er EN Ea a iei 5 14  327 Complex IDE Struct  r  S aisseta tike siiin e i EEE aE iE t 5 14  929 Atray Pelda sieis ate EE EEE E EE E E ea S 5 16  F29 sSOGUCH CE Field Seoane ae E TE E E A
71. SQL VARCHAR x  naturally stores a sequence of  chars the IDL type    sequence  lt char x gt      For the Oracle database  but not the Oracle TimesTen In Memory database  the IDL     octet        octet x     and    sequence lt octet x gt     are all stored in the Oracle type RAW  A  suffix of     bin    is used to distinguish between using RAW to store    octet    and    octet x      which can be treated the same  and    sequence lt octet x gt     which must be treated differ   ently by the RTI Real Time Connect Daemon     NOTE  Because of the use of suffixes in the mapping of identifiers of certain IDL data   types  the identifiers    str        Id     and    bin    are reserved keywords that should not be  used as the name of fields in IDL structures  For example  the following IDL definitions  have the same SQL mapping which would in result in the incorrect treatment of the  type    Foo2    by the daemon  Each would result in a table schema that would have the  ten columns named    my_field 0  str        my_field 1  str             my_field 2  str        struct Fool   struct Bar    string lt 10 gt  my_field  and sequence lt char 10 gt  str     3 ie    struct Foo2    struct Bar my_field        Primitive Types Mapping  The following tables show the mapping between basic types in IDL and SQL     LJ Table 5 2     Basic Types in IDL and SQL  TimesTen      on page 5 8  LI Table 5 3     Basic Types in IDL and SQL  Oracle      on page 5 9  LJ Table 5 4     Basic Types in IDL and SQ
72. Since both these technologies are data centric and complementary  they can be com   bined to enable a new class of applications  In particular  DDS can be used to produce a  truly decentralized distributed DBMS  while DBMS technology can be used to provide  persistence for DDS data        Intended Readers    This document presents the general concepts behind RTI Real Time Connect   s architec   ture and provides basic information on how to develop applications using RTI Real Time  Connect     QWOIIOM  L    Chapter 1       1 2    The chapters assume general knowledge of relational databases and SQL  familiarity  with the ODBC API  IDL and the DDS API  and a working knowledge of the C C    programming languages        Background Reading    For information on distributed systems and databases     I George Coulouris  Jean Dollimore  Tim Kindberg  Distributed Systems  Concepts  and Design  3rd edition   Addison Wesley  2000    I M  Tamer Ozsu  Patrick Valduriez  Principles of Distributed Database Systems  2nd  Edition   Prentice Hall  1999    J Andrew S  Tanenbaum  Maarten van Steen  Distributed Systems  Principles and  Paradigms  1st edition   Prentice Hall  2002    For information on real time systems     I Qing Li  Caroline Yao  Real Time Concepts for Embedded Systems  CMP Books  2003    L  Doug Abbott  Linux for Embedded and Real Time Applications  Butterworth Heine   mann  2002    LI David E  Simon  An Embedded Software Primer  Addison Wesley  1999  For information on SQL    
73. TI Real Time Connect Architecture    RTI Real Time Connect BPEL Process  Daemon Manager    DDS ODBC Cache    Connect to  Oracle           Oracle 10g    High performance Permanent storage    3 1 1 RTI Real Time Connect Daemon    The RTI Real Time Connect Daemon oversees the incoming  subscribed  data and outgo   ing  published  data  It enables automatic storage of data published by DDS applica   tions in a database by mapping a DDSTopic to a table in the database and storing an  instance of a DDSTopic as a row in that table  Also  the daemon can automatically pub   lish changes in a database table as a DDSTopic  Users have total control of the Quality of  Services that the daemon uses for publishing and subscribing to DDS data     The RTI Real Time Connect Daemon uses the DDS API provided by RTI Data Distribution  Service  as well as SQL through the ODBC API  In addition  there is a custom interface  for each supported database management system  DBMS   The three currently sup   ported DBMSs are Oracle 11g  Oracle TimesTen In Memory Database 11 2 1  and  MySQL 5 1  There is a separate daemon executable for each of the specific DBMSs     As illustrated in Figure 3 1  Oracle TimesTen In Memory Database and Oracle Database  11g can be used in combination  In this case  TimesTen acts as a front end cache to Ora   cle Database  providing high performance access to real time data     3 2    3 1 RTI Real Time Connect Architecture       3 1 2 RTI Real Time Connect   s Unique Features
74. WM    For array fields where the array type is different from    octet        char    and    wchar     an  IDL array type is stored as consecutive columns of the same type in a SQL table  If the  RTI Real Time Connect Daemon creates a table from an IDL type that contains an array  it  will create the column names using a naming convention that prevents name collisions   By default  the daemon simply adds the suffix     i      where    i    is the array index of that  element  beginning at 0 for the first index   The open bracket and close bracket charac   ters can be configured using the tags in the configuration file  lt open_bracket_char gt  and   lt close_bracket_char gt   see page 4 25   Note  this naming convention is not required for  the RTI Real Time Connect Daemon to serialize  deserialize IDL array fields     Wow    Note that array fields of type    octet        char    and    wchar    are mapped into a single col   umn element of the corresponding SQL types BINARY x   CHAR x  and WCHAR x    respectively  Table 5 12 shows a mapping of an array field between IDL and SQL     Table 5 12 Array Fields in IDL and SQL                                                             IDL Type SQL Table Schema  CREATE TABLE    MyArrayContainer       struct MyArrayContainer      my_key_field    INTEGER NOT NULL   long my_key_field     key       my_arr_field 0     SMALLINT NOT NULL   short my_arr_field 2      my _arr field 1     SMALLINT NOT NULL      PRIMARY KEY      my_key_field  
75. able  To support table history  the daemon must add the meta columns   lt RTIRTC_HISTORY_SLOT gt  and  lt RTIRTC_HISTORY_ORDER gt  to a table  They  will only be added if the  lt table_history_depth gt  column for an entry is non   NULL and has a non 0 value     The  lt RTIRTC_HISTORY_SLOT gt  is an auto increment column that will also be  added as a primary key column of the table     The  lt RTIRTC_HISTORY_ORDER gt  is a column that will contain a number that is  incremented as data is stored into the table  The oldest row of an instance will  have the lowest value for this column whereas the most recent row of an instance  will have the highest value     RTIRTC_SCN    The System Change Number  SCN  meta column  SQL_BIGINT  is only  required for connections to a MySQL database  The SCN meta column is used to  detect committed changes in a table  Its value is automatically assigned by the  MySQL server     Every time there is a change in a table row or a new row is inserted  the MySQL  server assigns a new SCN value to the column RTIRTC_SCN  The assignment is  done during the execution of the BEFORE UPDATE INSERT trigger installed by  the RTI Real Time Connect Daemon     Chapter 5 IDL SQL Semantic and Data Mapping    5 1    This chapter describes the semantic and data representation mapping that RTI Real Time  Connect uses to connect DDS based applications  such as RTI Data Distribution Service  to  MySQL  Oracle  and Oracle TimesTen In Memory databases     DDS  Data Distrib
76. able 5 3                                     Basic Types in IDL and SQL  TimesTen   Continued   IDL SQL Type SQL Type Table  IDL Type Field Name  TypeMode 0   TypeMode 1    Column Name   wstring lt x gt  my_field TT_NVARCHAR x  NVARCHAR x  _      my_field str    a   or   NVARCHAR2 x   long long my_field TT_BIGINT BIGINT    my_field     unsigned long long   my_field TT_BIGINT BIGINT    my_field     long double my_field BINARY 16  BINARY 16     my_field ld        unsigned long long   my_field TT_TIMESTAMP TIMESTAMP    my_field                a  The format on the wire of    char    and    char x     is the same     b  The format on the wire of    wchar    and    wchar x     is the same     c  The format on the wire of    octet   and    octet x     is the same     d  The     str    suffix is used to distinguish between     w string lt x gt     and    sequence lt  w char x gt         e  The     ld    suffix is used to distinguish between    octet x     and    long double                                                        Basic Types in IDL and SQL  Oracle   IDL Field Table Column   IDL Type Name SQL Type Name  char    my_field CHAR 1     my_field     char x    my_field   CHAR x     my_field     sequence lt char x gt  my_field VARCHAR2 x  if x  lt  4000  otherwise CLOB    my_field     wchar P my_field   NCHAR 1     my_field     wchar x  b my_field NCHAR x     my_field     sequence lt wchar x gt   my_field   NVARCHAR2 x  if x lt  4000  otherwise NCLOB      my_field     octet    
77. ads or processes  accessing the same database at the same time  Recall that this discussion only per   tains to Oracle TimesTen DSNs that specify a diskless connection    If the XLABUFFERSIZE is too small  then SQLExecute or SQLExecDirect state   ments that were working will return an error indicating that a buffer is full  You  should see these errors in your own applications as well as in the RTI Real Time  Connect Daemon if the daemon is subscribing to DDSTopics and trying to store the  received data in the database  Those ODBC errors will appear in the daemon log  If  you encounter this situation  then you should increase the value of XLABUFFER   SIZE appropriately  The Oracle TimesTen native error codes that you may see  when the XLABUFFERSIZE is too small are     I TT8009  Transaction Log API Buffer size too small or too large  L  TT986  Log buffer overflow  transaction must rollback   I TT987  Log record larger than log buffer  transaction must rollback    More about Oracle TimesTen error codes can be found in the Oracle TimesTen In   Memory Database Error Messages and SNMP Traps Release 11 2 1     Default  409600       Oorl       4 4 Configuration File       4 4 4 4    Initial Subscriptions and Publications    As explained in Meta Tables  Section 4 5   the daemon is configured to publish and sub   scribe to data in the database by inserting entries in two meta tables   RTIDDS_PUBLICATIONS and RTIDDS_SUBSCRIPTIONS  In your XML configuration  you can specify initial val
78. alues in the  DDS_PresentationQosPolicy of the DDSPublisher in the sending applications to be  changed to those values as well     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also pub present access_scope  pub present ordered_access   Section 4 5 1 1 11      sub partition name    For capturing data in a table  RTI Real Time Connect creates a DDSDataReader per  DDSTopic  The sub partition name column maps directly to the DDS_PartitionQosPolicy  of the DDS_SubscriberQos used by the DDSSubscriber that is created with the DDSDa   taReader  The DDS_PartitionQosPolicy introduces a logical partition concept inside the     physical    partition concept introduced by the domain ID  A DDSSubscriber can com   municate with a DDSPublisher only if they have some partition in common  The value  of the sub partition name column specifies a list of partitions separated by commas to  which the DDSSubscriber belongs     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also pub partition name  Section 4 5 1 1 12     dr durability kind    This column maps directly to the DDS_DurabilityQosPolicy of the DDSDataReader cre   ated to subscribe to DDSTopic data that is stored in the table  By changing this policy   the DDSDataReader can be configured to request for past values published for the  DDSTopic to be sent by existing applications soon as their matching DDSDataWriters
79. and  lib nddscore  so  dll  on the Oracle Server    The shared library   lib  rtirti_oracleq  so  dll   installed in the previous section will  need access to additional shared libraries provided by RTI Data Distribution Service     The libraries  lib nddsc  so  dll  and  lib nddscore  so  dll  should be copied to the  server host from the appropriate lib  lt platform gt  directory in the installation of RTI Data  Distribution Service  Then follow the procedure below to add these files to the library  search path for the Oracle server     UNIX based Systems    The directory containing the RTI Data Distribution Service libraries should be  added to the environment variable LD_LIBRARY_PATH  This environment  variable must be set in the environment of the user who started the Oracle  server     A better method for setting this environment variable is in the extproc ora file or  with the ENVS parameter in the file listener ora     Refer to the Oracle Net manual and this link for more information on the lis   tener ora file  http   download oracle com docs cd E11882_01 network 112   e10835 listener htm     Refer to this link for more information on extproc ora  http   download ora   cle com docs cd E11882_01 appdev 112 e10471 adfns_externproc htm     4 1 Introduction to the RTI Real Time Connect Daemon       Windows Systems    Using the dialog opened with Start  Settings  Control Panel  System  Advanced  tab  Environment Variables button  add the directory  with backslash    V and
80. as the transport         help    Prints out a usage message listing the command line param   eters         licenseFile  lt file gt           Specifies the license file  path and filename   Only applicable  to licensed versions of RTI Real Time Connect    If not specified  RTI Real Time Connect looks for the license as  described in Chapter 9 in the Getting Started Guide           4 1     JOeuUOD OSU     De  y  La Buisn    7    Chapter 4       Table 4 1    Command line Options       Option    Description           logFile  lt log file gt     Pathname of the file to be used for log messages     If specified  log messages will automatically be stored in the  file         noDaemon    Start as a normal process     Without this option  running the RTI Real Time Connect Dae   mon executable will start a daemon process on Linux and  Solaris systems  or start a service on Windows systems  As a  daemon  no log messages of any kind are printed to stdout  or stderr  However  by specifying this option  the daemon  will start as a regular process  which can be run as a back   ground process using the standard OS with the command   line option      amp       and log messages will be printed to stdout  and stderr         queueLibPath   lt directory   lib rtirtc_oracleq  so  dll  gt     containing    This parameter is only available for the rtirtc_oracle   exe   for Oracle Database 11g     The Oracle server must find and load   lib rtirti_oracle  so  dll  in order to connect to the RTI Real  
81. ax_length    column  A value of  1  instructs RTI Real Time Con   nect to use all the available characters     profile_name    This column specifies the name of the QoS Profile that RTI Real Time Connect will use to  create the subscription     The name must have the following format    lt QosS profile library name gt    lt QoS profile name gt     See the RTI Data Distribution Service User   s Manual for a complete description of QoS  Profiles     QoS values specified in the subscription table  if they are not NULL  take precedence  over the same values specified in the QoS profile     filter_duplicates    There are multiple scenarios in which RTI Real Time Connect may receive duplicate sam   ples  see Chapter 11  Mechanisms for Achieving Information Durability and Persistence  in  the RTI Data Distribution Service User   s Manual   For example  if RTI Persistence Service is  used in the system  RTI Real Time Connect could receive the same sample from the origi   nal writer and from RTI Persistence Service     The filter_duplicates column specifies whether or not duplicates should be filtered by  the RTI Real Time Connect Daemon  If duplicates are not filtered  the subscription data  table may end up containing duplicates rows     Note  Durable Reader State configurations  see Section 11 4 in the RTI Data Distribution  Service User   s Manual  are ignored by RTI Real Time Connect  Duplicate filtering and sub   scription state persistence are implemented by the RTI Real Time C
82. but it does  not enable the feature  See  Section 4 4 4 1 2 for additional details       protocol propagate_dispose_of_unregistered_instances    true    Enables propagation of delete operations       durability kind    TRANSIENT_LOCAL_DURABILITY_QOS     Sends table contents to late joiners  table  initialization           history kind   KEEP_LAST_HISTORY_QOS        Keeps one sample per primary key value       These QoS changes have priority over the values set using QoS Profiles  However  they  can be overwritten per publication and per subscription by setting the corresponding  fields in the RTIDDS_PUBLICATIONS and RTIDDS_SUBSCRIPTIONS meta tables  see    Section 4 5 1 and Section 4 5 2      1 2 Conflict Resolution    Because there are no global  network wide  locks on records when a transaction is being  executed  conflicts can occur  The best way to avoid conflicts is to have only one host  modify a specific row  instance  or table  topic   but that is not always possible  The sec           4 4 Configuration File       4 4 4 1 3    4 4 4 2    ond best way is to design the application in such a way that conflicts can never occur   for instance due to data flow dependencies  But that also is often hard to achieve     By default conflict resolution is not enabled when you set  lt enable_table_replication gt   to true  You can enable conflict resolution by setting the column  dr destination_order kind in RTIDDS_SUBSCRIPTIONS to  BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS  see Se
83. c key  i e   non   keyed IDL types   In such cases  the  lt RTIRTC_KEY gt  column will be added to  the table as the primary key column  The value in that column will always be 0   Thus  there is only a single instance of the DDSTopic which means the table will  only ever have a single row  subject to whether or not the user wants the table to  store historical value of data instances  see the details for the  lt RTIRTC _   HISTORY_SLOT gt  and  lt RTIRTC_HISTORY_ORDER gt  meta columns below      If the IDL type does have key fields  then the fields will be mapped into columns  that are marked as primary keys  This meta column is not added  and the table  can contain as many rows as there are different instance keys  primary keys      4 79    JOoUUOD SU     De  y  La Buisn    7    Chapter 4       4 80    LJ RTIRTC_HISTORY_SLOT and RTIRTC_HISTORY_ORDER    These SQL INTEGER columns are used to implement the ability of the RTI Real   Time Connect Daemon to store multiple values  historical  of the same data  instance into a table  Usually  a single data instance maps to a single row of a  table  As new values for the instance is received by the daemon  the value of the  same row is changed     However  users may use the  lt table_history_depth gt  columns  see Sections  4 5 1 1 7 and 4 5 2 14  of the RTIDDS_PUBLICATIONS and  RTIDDS_SUBSCRIPTIONS meta tables to direct the daemon to store multiple  past values of a data instance  These values are be stored in multiple rows of a  t
84. cation across  a network  See dr destination_order kind  Section 4 5 2 1 17  and TableReplication   Mode on page 4 20 for more information     4 5 1 1 9 idl_member_prefix_max_length  idl_member_suffix_max_length    These columns define how RTI Real Time Connect maps IDL member identifiers into col   umn names  In particular  they control how the column names are formed by using as a  prefix n characters from the identifier   s prefix and m characters from the identifier   s suf   fix     They can assume any value greater than or equal to  1  They cannot both be set to zero     If a positive value n is provided for idl_member_prefix_max_length  RTI Real Time  Connect will use the first n characters from the IDL member identifier to compose the  associated column name  A value of 0 tells RTI Real Time Connect to compose the column  name using only the last characters of the identifiers  as defined by the     idl_member_suffix_max_length    column  A value of  1  instructs RTI Real Time Connect  to use all the available characters     4 44    4 5 Meta Tables       4 5 1 1 10    4 5 1 1 11    If a positive value n is provided for idl_member_suffix_max_length  RTI Real Time Con   nect will use the last n characters from the IDL member identifier to compose the associ   ated column name  A value of 0 tells RTI Real Time Connect to compose the column  name using only the first characters of the identifiers  as defined by the     idl_member_prefix_max_length    column  A value of  1 
85. cess  lib rtirti_oracleq  so  dll   There are two options for installing  lib rtirti_oracleq  so  dIl      1  Copy the appropriate version of the library into either   ORACLE_HOME bin or   ORACLE HOME lib on the server host    ORACLE_ HOME is the installation  directory of the Oracle DBMS     or    2  Copy the appropriate version of the library into any directory on the server host   It can even be used directly from the RTI Real Time Connect installation directory  if that directory can be accessed by the Oracle server     4 3    jOoUuUOD SU     De  y  La Buisn    7    Chapter 4       4 1 1 2    4 4    With the second option  the location of the  lib  rtirti_oracleq  so  dll  library  must be defined in the file extproc ora  located at   ORACLE_HOME hs admin  on UNIX operating systems and at ORACLE_HOME hs admin on Windows   or in the file listener ora  located at  ORACLE_HOME network admin  using  the ENVS parameter     Additional information on how to load external procedures can be found in the  Oracle manual by following this URL     http     download oracle com docs cd E11882_01 appdev 112 e10471   adfns_externproc htm    Important  With either option  if  lib rtirti_oracleq  so  dll  is not located in   ORACLE HOME bin  the rtirtc_oracle daemon executable must be started  with the additional command line option     queuelibpath  lt directory containing   lib rtirti_oracleq  so dll  gt        see Command Line Parameters  Section 4 2      Installing  lib nddsc  so  dll  
86. criminator column     _d        If the RTI Real Time Connect Daemon creates the table from an IDL containing an union   it will generate the data columns with hierarchical names from the name of the union  field and the name of the union itself  In addition  the values of the switch case state   ment in the IDL union are encoded into the names of the data columns as well  e g          c 0 1           c 2            def          This naming convention is required for the proper serialization and deserialization of  unions  The RTI Real Time Connect Daemon uses the name of the fields when processing  an IDL union to know which column s  correspond to the value of the discriminator     Table 5 11 shows the mapping of an union between IDL and SQL     Union Fields in IDL and SQL       IDL Type    SQL Table Schema             struct MyUnion switch long   case 0   case 1   long my_long_field   case 2   double my_double_field   default   short my_short_field         struct MyUnionContainer    long my_key_field     key  MyUnion my_union_field   3         CREATE     my_key_field        my_union_field _d                 PRIMARY KEY  my_key_field        TABLE    MyUnionContainer     INTEGER NOT NULL   INTEGER NOT NULL         my_union_field c 0 1  my_long_field           my_union_field c 2  my_double field    DOUBLE      my _union_field c def   my_short_field    SMALLINT     INTEGER              5 15    Bulddo  opoq pup      yupw  s TOS 1AI  S    Chapter 5       5 2 8    Array Fields    
87. ct version of the library to  use depends on the platform on which Oracle server is running  For example    lt platform gt  can be    LI x64Linux2 6cc4 1 1 for Red Hat Enterprise Linux 5 systems on 64 bit x86 processors  LI i86Linux2 6cc4 1 1 for Red Hat Enterprise Linux 5 systems on 32 bit x86 processors  L  i86Win32 for Windows systems on 32 bit x86 processors    Since the library   lib rtirtc_oracleq   so  dll   internally uses RTI Data Distribution Ser   vice  the corresponding shared libraries   lib nddsc  so  dI1  and  lib nddscore  so  dl1    distributed with RTI Data Distribution Service must also be installed on the Oracle server  host     Notes     LJ For AIX architectures  librtirtc_oracleq so is statically linked with the RTI Data Dis   tribution Service libraries  Therefore  in this case  RTI Data Distribution Service does  not have to be installed on the Oracle server host     L The exact platforms that are supported on Windows  Linux  and Solaris systems  may be different for Oracle versus Oracle TimesTen In Memory databases  Please  consult the Release Notes for specific details of the supported platforms for your  release of RTI Real Time Connect     L Not only do the libraries have to be present on the Oracle server host  the Oracle  server must also be configured to find the libraries  There are separate procedures  for the librtirtc_oracleq and libnddsxxx libraries  These procedures are detailed  below     Installing and Configuring the Oracle Server to Ac
88. ction 4 5 2 1 17    With this setting  eventual consistency can be guaranteed  Conflicts can cause a tempo   rary inconsistency between the databases  but eventually these are resolved by the RTI  Real Time Connect conflict resolution mechanism  By default  conflicts are resolved using  a timestamp corresponding to the system time when the update occurred  You can over   write this behavior by providing your own timestamp in a separate database column   see Section 4 5 1 1 8      If you do not need conflict resolution  you can disable it by setting the column  dr destination_order kind in RTIDDS_SUBSCRIPTIONS to  BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS     Table Initialization    When a host starts using a table in the distributed shared database  it is essential that the  local table is up to date  RTI Real Time Connect supports two approaches to filling the  local table s contents     1  If all the rows in the table are updated frequently  it is sufficient to apply these  updates to the data cache     2  The table can be synchronized by explicitly requesting the table s contents from  the other hosts  This is called table initialization     If table initialization is not needed  you can disable it by setting the columns dw dura   bility kind in RTIDDS_PUBLICATIONS and dw durability kind in  RTIDDS_SUBSCRIPTIONS to VOLATILE_DURABILITY_QOS     Database Mapping Options    Table 4 7 describes the options that are allowed with the  lt database_mapping_options gt   tag     4 
89. ctory gt  resource schema rti_real_time_connect xsd   respectively     To include a reference to the XSD document in your XML file  use the attribute  xsi znoNamespaceSchemaLocation in the  lt dds gt  tag  For example      lt  xml version  1 0  encoding  UTF 8   gt     lt dds xmlns xsi  http   www w3 org 2001 XMLSchema instance   xsi noNamespaceSchemaLocation    lt installation directory for RTI Real   Time Connect gt  resource schema rti_real_time_connect xsd  gt      lt  dds gt   To include a reference to the DTD document in your XML file  use the  lt  DOCTYPE gt   tag        1  Leading and trailing spaces in enumeration fields will not be considered valid if you use the distributed  XSD document to do validation at run time with a code editor     4 16    4 4 Configuration File       4 4 3    For example      lt  xml version  1 0  encoding  UTF 8   gt     lt  DOCTYPE dds SYSTEM   lt installation directory for RTI Real Time Con   nect gt  resource schema rti_routing_service dtd  gt     lt dds gt      lt  dds gt   We recommend including a reference to the XSD file in the XML documents  this pro   vides stricter validation and better auto completion than the corresponding DTD file     Top Level XML Tags    Next there is an example configuration file  You will learn the meaning of each line as  you read the rest of the sections      lt  xml version  1 0   gt    lt dds gt    lt real_time_connect name  Example  gt    lt database_mapping_options gt    lt identifier_separator_char 
90. d by row size     B 3    spw   soqojoq    g    Appendix B       B 4    
91. des for all of the DDSTopics that  they use  and thus are compatible with RTI Real Time Connect  Please consult RTI Data  Distribution Service documentation for more information about typecodes and their gen   eration     4 2 Command Line Parameters       4 2    An important note is that typecodes can become quite large as the corresponding IDL  type becomes more complex  By default  RTI Data Distribution Service applications allo   cate 2048 bytes to store a typecode  The default size for the RTI Real Time Connect Dae   mon is 2048 bytes as well  The typecode size is controlled by the DDS QoS parameter   DDSDomainParticipantQos  resource_limits type_code_max_serialized_length in the  DDS API  In RTI Real Time Connect  you can change the typecode limit using XML QoS  Profiles  see Table 4 2      If the RTI Real Time Connect Daemon discovers DDSTopics that have typecodes that  a   are larger than what it has been configured to handle or  b  have no associated type   codes at all  the daemon will not be able to subscribe to or publish those topics unless  the user manually creates the corresponding tables in the database or defines the topic  types in the configuration file  see Table 4 2   The only way to determine whether or not  this situation exists is to examine the log messages printed by the daemon     A status message will indicate when there is no typecode found for a DDSTopic  This  message may have been generated because the typecode associated with the topic is too 
92. e Connect BPEL Process  Daemon Manager    DIDE  0  D   gt 10 Cache  Connect to  Oracle       High performance Permanent storage    2 2 6 Additional Benefits of RTI Real Time Connect    l Achieve quick time to market  e Start application development immediately using well known interfaces   e Minimize time consuming custom programming   e Easily integrate into existing solutions using industry  standard interfaces   L  Reduce development costs  e Use widely available modeling and database tools     e Eliminate expensive complex coding for real time data management and  communication     e Integrate edge devices  distributed real time data management  and enter     prise databases using a single set of standard Application Programming  Interfaces     2 6    2 2 RTI Real Time Connect   s Unique Features         Deliver cutting edge solutions    Process massive amounts of information across networks in real time   Turn near instantaneous responses to  remote  critical events into a busi   ness advantage    Seamlessly integrate networked applications  services  and devices     L Minimize operational costs    Maintain complex networked applications with near zero administration     Dynamically add or change system components     Run on common hardware platforms and networks      d  Reduce risks    Guarantee continuous system availability through dynamic replication  management    Rely on continuous high quality technical support    Build on years of experience in the world   s most
93. e DDSDa   taReader receives  When the history depth is reached  the rows are reused as a circular  buffer with the newest values replacing the oldest     To support this capability  the associated user table may be created with additional col   umns  meta columns  to help the RTI Real Time Connect Daemon manage history for a  table  Whether or not meta columns need to be added to support table history is based  on the value of the entry in  lt table_history_depth gt      4 59    jOoUuUOD OSU     De  y  La Buisn    7    Chapter 4       4 60    The two meta columns for supporting table history are     Ld RTIRTC_HISTORY_SLOT  INTEGER    This column is also added to the Primary Key of the table  There is usually no  need for users to access this column  it is only used by the daemon  It is only  needed since many DBMS systems do not allow you to alter the value of a Pri   mary Key column     RTIRTC_HISTORY_ORDER  INTEGER    This value of this column is maintained by the RTI Real Time Connect Daemon  when it stores data received via DDS into the table  The column stores a strictly  incrementing counter that represents the received sequence number  starting at  0  of the data that is stored in that row     User should use a combination of the instance key and the value of  RTIRTC_HISTORY_ORDER to find the latest data received for an instance in  the table     The possible values for the  lt table_history_depth gt  column are     LI NULL or 0    Only the current value of an instance
94. e DDSDataWriter until the typecode is dis   covered  When a new typecode is discovered  the daemon will scan all rows in the  RTIDDS_PUBLICATIONS meta table and create the user tables and DDSDataWriters  for entries that were pending on the discovery of the typecode     The daemon will also create the DDSDataWriter if there is an entry in the  RTIDDS_PUBLICATIONS table without an associated typecode  but the user subse   quently creates the corresponding table     If user applications modify an existing row in the RTIDDS_PUBLICATIONS table  the  RTI Real Time Connect Daemon will first delete the DDSDataWriter that was created for  that entry  if it exists  and then go through the same process of trying to create the user  table and DDSDataWriter as if the row was newly inserted  If user applications delete an  existing row in the RTIDDS_PUBLICATIONS table  the RTI Real Time Connect Daemon  will delete the associated DDSDataWriter  if it exists      4 5 Meta Tables       A flow chart describing this logic is provided below        UPDATE    INSERT              does type   code exist         4 5 1 1 Publications Table Schema    does user  fable exist  Sse a    create user   table in DB                if necessary  create  DDSDomainParticipant         No  defer creation until tyoecode is discovered    The RTIDDS_PUBLICATIONS table is created with the following SQL statement     Oracle TimesTen  with command line option  typeMode 1      Create Table RTIDDS_PUBLICATIONS  table_owne
95. e DDSDataWriter with the next highest ownership strength     The ownership strength set is set in the  lt dw ownerhip_strength value gt  column   The default value is 0 if the column is NULL     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dw liveliness lease_dur  Section 4 5 1 1 14   dw dead   line period  Section 4 5 1 1 15   and dr ownership kind  Section 4 5 2 1 21      4 49    jOeuUOD SU     De  y  La Buisn    7    Chapter 4       4 5 1 1 18    4 5 1 1 19    4 5 1 1 20    4 50    dw publish_mode kind    This column controls the type of DDSDataWriter that RTI Real Time Connect will create  for publishing data  This column can take the following values     I ASYNCHRONOUS_PUBLISH_MODE_QOS  I SYNCHRONOUS_PUBLISH_MODE_QOS  default value     Asynchronous DDSDataWriters were introduced in RTI Data Distribution Service to sup   port large data packets  greater than 64Kb   If IDL data types exceed the 64Kb limit and  reliable communication is used  dw publish_mode kind must be set to     ASYNCHRONOUS_PUBLISH_MODE_QOS        See the RTI Data Distribution Service documentation for more details on the differences  between synchronous and asynchronous DDSDataWriters     dw res_limits max_samples  dw res_limits max_instances    These columns set some parameters for the DDS_ResourceLimitsQosPolicy for the  DDSDataWriter created to publish table changes  In particular  they control the amount  of memory that the syste
96. e columns with names that  are hierarchically composed from the name of the field in the embedded structure and  the name of the embedded structure field itself  This naming convention is not required  for serialization to work properly  Just as long as the column types map to the types of  the embedded structure  then the RTI Real Time Connect Daemon will properly handle  the data irrelevant of the actual column name     Table 5 10 shows the mapping of a complex structure between IDL and SQL   Union fields    IDL unions are mapped by adding an extra column with the name    _d    to represent the  discriminator that is used to indicate which type is actually stored by the union  These  unions are also known as    switched unions     All of the individual union fields are    5 2 Data Representation Mapping       Table 5 10 Nested Structures in IDL and SQL       IDL Type    SQL Table Schema             struct MyStruct    short my_short_field   long my_long_field   F     struct MyStructContainer    long my_key_field     key  MyStruct my_struct_field   1    CREATE          TABLE        my_key_field                                  my _struct_field my_long_field       PRIMARY KEY  my_key_field   J           MyStructContainer     INTEGER NOT NULL        my_struct_field my_short_field    SMALLINT NOT NULL           EGER NOT NULL              Table 5 11    mapped to corresponding columns in a table  However  only one of these columns will    contain valid data as indicated by the dis
97. ecouples applications at the data level  preventing high  throughput real time messages and data from overwhelming applications managing  business processes by buffering and storing all data in an in memory DBMS  the Oracle  TimesTen In Memory database which is bundled with RTI Real Time Connect     Oracle TimesTen is a memory optimized database delivering exceptionally high perfor   mance  enabling it to easily support the high data throughput of real time and embed   ded applications  Using the Oracle TimesTen Cache Connect to Oracle  the data and  messages buffered by the in memory database can be synchronized and stored in a  disk based Oracle database for access by enterprise applications directly or through  enterprise level integration options such as a BPEL  Business Process Execution Lan   guage  process manager     Multiple copies of RTI Real Time Connect can also run in parallel on separate systems   Different instances can be responsible for a discrete set of messages and data  maximiz   ing throughput and providing load balancing  Or each instance can bridge the same  messages and data providing high availability and fault tolerance     2 2 RTI Real Time Connect   s Unique Features          2 2 RTI Real Time Connect   s Unique Features    In this section  a few of the unique qualities and features of RTI Real Time Connect are  discussed in greater detail  Figure 2 2 shows an example system where RTI Real Time  Connect serves as the central integration technology 
98. eld in an IDL data structure can just be used as the name of a  column in a table  In fact  for those data types with clear and obvious mappings  the col   umn name can be independent of the field name used in the IDL type  However   because there is no one to one mapping of all IDL data types to all SOL data types  for  certain types  the column names used in SQL table schemas must follow certain conven   tions that tie them to the names of the fields of IDL types from which they are mapped   This is true for only the small subset of primitive IDL data types and for the complex  IDL data types that would otherwise have ambiguous mappings  i e   multiple ways to  map IDL to SQL or vice versa     The RTI Real Time Connect Daemon scans for  identifies and uses special mappings of  column names when serializing and deserializing IDL data to and from a table in a data   base  There are two types of special mappings  hierarchical naming and suffixes     Hierarchical Naming    Complex IDL types may have fields that are actually embedded structures  so a field  may actually contain multiple values  In SQL  columns usually contain a single value  for each column element  although there are a few types like BINARY x  CHAR x    VARBINARY x  and VARCHAR x  that can store multiple values of the same type ina  single column element  To map complex IDL types to SQL table schemas  embedded  data structures are unfolded so that elements of an embedded structure are stored indi   vidually in 
99. emon  Otherwise  the daemon will only store the  last n log messages as specified by LOGHISTORY  using the table as a circular buffer     Users may use the    id    column to determine the last log message that was generated  by the daemon  see Section 4 5 4 1 1      Log Table Schema  The RTIRTC_LOG table is created with the following SQL statement     Oracle TimesTen  with command line option  typeMode 1      Create Table RTIRTC_LOG     id INTEGER NOT NULL    ts TIMESTAMP NOT NULL    type VARCHAR 7  NOT NULL   function VARCHAR 64  NOT NULL   line INTEGER    code INTEGER    native_code INTEGER    message VARCHAR 2048  NOT NULL              4 75    jO UUOD OU       De  y  La Buisn    7    Chapter 4       Oracle TimesTen  with command line option  typeMode 0      Create Table RTIRTC_LOG    id TT_INTEGER NOT NULL   ts TT_TIMESTAMP NOT NULL     type TT_VARCHAR 7  NOT NULL           function TT_VARCHAR 64  NOT NULL   line TT_INTEGER    code TT_INTEGER    native_code TT_INTEGER    message TT_VARCHAR 2048  NOT NULL                    Oracle     Create Table RTIRTC_LOG    id NUMBER 10  NOT NULL   ts TIMESTAMP NOT NULL   type VARCHAR 7  NOT NULL   function VARCHAR 64  NOT NULL   line NUMBER 10    code NUMBER 10    native_code NUMBER 10    message VARCHAR 2048  NOT NULL     MySQL     Create Table RTIRTC_LOG    id INTEGER NOT NULL   ts TIMESTAMP NOT NULL   type VARCHAR 7  NOT NULL   function VARCHAR  64  NOT NULL   line INTEGER   code INTEGER   native_code INTEGER   message VARCHAR  204
100. emon is restarted  the persisted TypeCodes corre   sponding to existing publications and subscriptions will be made available to other  DDS applications     Table Info Schema  The RTIRTC_TBL_INFO table is created with the following SQL statement   Oracle TimesTen  with command line option  typeMode 1      Create Table RTIRTC_TBL_INFO    table_owner VARCHAR 128  NOT NULL   table_name VARCHAR 128  NOT NULL   type_code VARBINARY  65000    PRIMARY KEY  table_owner table_name                 4 73    JOeUuUOD OSU     De  y  La Buisn    7    Chapter 4       Table 4 18    4 5 3 1 1    4 74    Oracle TimesTen  with command line option  typeMode 0      Create Table RTIRTC_T        Oracle     Create Table RTIRTC_T        MySQL        BL INFO    table_owner TT_VARCHAR  128   table_name TT_VARCHAR  128     type_code VARBINARY  65000      PRIMARY K        type_code       BL INFO    table_owner VARCHAR  128   table_name VARCHAR  128     BLOB        NOT NULL   NOT NULL              NOT NUI       NOT NULI    iy    EY  table_owner  table_name     PRIMARY KEY  table_owner table_name     Create Table RTIRTC_TBL_ INFO           table_owner VARCHAR  128   table_name VARCHAR  128     NOT NULL   NOT NULL              type_code VARBINARY  65000    RTIRTC_SCN BIGINT DEFAULT 0   PRIMARY KEY  table_owner table_name     Table 4 18 describes the meta table columns                    RTIRTC_TBL_INFO Table Schema  Column Name SOL Type Nullable   Default if NULL Described In  table_owner VARCHAR 128  No N A 
101. erprise    3 3 Remote Real Time Notification of Table Changes          3 3 Remote Real Time Notification of Table Changes    Figure 3 3 shows how RTI Real Time Connect can be used to notify remote DDS applica   tions running in embedded devices of time critical changes in the database  In this sce   nario  the RTI Real Time Connect Daemon has been configured with user customizable  QoSs to publish DDS topics whenever the specified table changes in the database  The  mapping of the SQL table schema to the equivalent DDS topic described by IDL is done  automatically by the daemon with no user configuration necessary     Figure 3 3 Storing Published DDS Data in a SQL Database    J DDS take          Relational  Database    UA gs take RTI Real Time Connect        DDS write SQL SELECT 7       Table Tracks Table Passengers  Fit Lat  Long  Fit Name Addrs     DDS take C129 34 5 102 3 C129 A  Johnson        C054 27 7 46 8 C054 J  Smith            Embedded  SUSEESTTTSSTSISSSSSSSISSSSS Enterprise    3 5    OInjoepyoiy  E    Chapter 3          3 4 Bidirectional Integration    Figure 3 4 shows a system that integrates the capabilities described in the last two sec   tions  RTI Real Time Connect provides bidirectional dataflow between embedded DDS  applications and enterprise database systems  This approach can typically be used to  create a closed loop system  where sensory data is collected  processed  and analyzed in  an in memory database  and the resulting analysis creates state change
102. ers of the identifiers  as defined by   lt idl_member_prefix_max_length gt     This value can be overridden per table by assigning a value to the  id _member_suffix_max_length column in the meta tables    Note that although  lt idl_member_prefix_max_length gt  and   lt idl_member_suffix_max_length gt  can be individually set to zero   they cannot be both zero at the same time    Default   1  unlimited           Oorl       4 24       4 4 Configuration File       Table 4 7 Database Mapping Options       Tags within   lt database_mapping_  options gt     Description    Number  of Tags  Allowed           lt identifier_separator_  char gt     Sets the character that is used as a separator in the hierarchical  names generated when mapping IDL fields into SQL table columns     The attribute is also used to configure the separator character for the  columns in the meta tables    The default value of       in Oracle and Oracle TimesTen will generate  columns names that must be referenced using double quotes  See  IDL to SQL Mapping  Section 5 2 1  for more information about dou   ble quoted identifiers     Default          For Oracle TimesTen          for MySQL    Oorl        lt open_bracket_char gt     Sets the opening bracket character that is used in the index compo   nent of the arrays and sequences members names    See Array Fields  Section 5 2 8  and Sequence Fields  Section 5 2 9   for more information about the mapping of IDL arrays and  sequences into SQL columns    The defau
103. es using  ODBC  on UNIX based systems  the following environment variables may be used to  find DSNs  data source names  via ODBCINI files     J ODBCINI  location of INI file for database connections  If not set  ODBCINI will  be set to    6HOME  odbc ini     where  HOME is the home directory of the user  who started the daemon      L  SYSODBCINI  location of system INI file  used if the DSN is not found in the  file specified by ODBCINI     If the RTI Real Time Connect Daemon cannot find a valid DSN in any ODBC INI file  then  no connections to any databases can be made     On a Windows system  the equivalent functionality of the ODBCINI file is found in the  Windows registry  You create and modify DSNs using the application found in Start   Programs  Administrative Tools  Data Sources  ODBC         Configuration File    When you start RTI Real Time Connect  you can provide a configuration file in XML for   mat  it is not required   Among other things  this file can be used to specify the set of  databases to which the daemon will connect and the properties of the database connec   tions     This section describes   LI How to Load the XML Configuration  Section 4 4 1   LJ XML Syntax and Validation  Section 4 4 2   L  Top Level XML Tags  Section 4 4 3    1 Database Configuration Using the Real Time Connect XML Tag  Section 4 4 4     4 4 Configuration File       4 4 1 How to Load the XML Configuration    RTI Real Time Connect loads its XML configuration from multiple locations
104. g the  system time  when a row in the user table changes  the RTI Real Time Connect Daemon    4 43    JOouUOD eu     De  y  La Buisn    7    Chapter 4       will take the current value of the designated column and use it in the DDS   DataWriter  write_w_timestamp   method when publishing the value of the row     The possible values for the  lt resolution_column gt  column are     LI NULL    If this column is NULL  then the RTI Real Time Connect Daemon will just call  DDSDataWriter  write   to publish the table changes  This implies that the  source timestamp used by DDS will be the system time when the write occurred     LJ    column_name       The column name of any column in the user table that has a valid type  The col   umn must be one of the following SQL types  INTEGER  SMALLINT  BIGINT  or  TIMESTAMP     If the user directs the daemon to use a column from the user table as the time   stamp  then it is imperative to the proper operation of the DDS publication that  the value in the timestamp column is monotonically increasing with every table  change  So when a change is made to a row of the table  the value in the column   lt resolution_column gt  must be larger than the last value of this column that was  published     The  lt resolution_column gt  can be used with the  lt dr destination_order kind gt  column of  the RTIDDS_SUBSCRIPTIONS table to implement a conflict resolution policy in a sys   tem where RTI Real Time Connect is used to implement database table repli
105. gt     lt  identifier_separator_char gt    lt  database_mapping_options gt         lt mysql_connection gt    lt dsn gt Example_MySQL lt  dsn gt    lt user_name gt Student lt  user_name gt    lt password gt mypsswrd lt  password gt      lt real_time_connect gt         lt  mysql_connection gt      lt oracle_connection gt    lt dsn gt Example_Oracle lt  dsn gt    lt user_name gt Student lt  user_name gt    lt password gt mypsswrd lt  password gt     lt  oracle_connection gt      lt timesten_connection gt    lt dsn gt Example_TT lt  dsn gt    lt  timesten_connection gt    lt  real_time_connect gt    lt  dds gt     Table 4 2 describe the top level tags allowed within the root  lt dds gt  tag     4 17    JOouUOD SU     De  y  La Buisn    7    Chapter 4       Table 4 2 Top Level Tags       Tags within  lt dds gt     Description    Number of  tags Allowed           lt qos_library gt     Specifies a QoS library and profiles     The contents of this tag are specified in the same manner as  for an RTI Data Distribution Service QoS profile file   see  Chapter 15 in the RTI Data Distribution Service User   s Manual     The profiles you specify here can be used in three ways     L  By setting the attribute is_default_qos in the tag   lt qos_profile gt  to true  In this case  that profile is the  default configuration for all the DDS entities created by  the RTI Real Time Connect daemon     E By referring to a profile using the XML tag   lt profile_name gt  within  lt publication gt  and  l
106. imately 625 columns  For tables in which all the columns are of type  VARCHAR2  RTI has been able to publish with approximately 650 columns     If the maximum number of columns is exceeded for RTI Real Time Connect publications   you will see an error message similar to      DDSQLDaemonCore_onUpdateMetaTableEntry  line 3126 ERROR 4096 5009    CNA CNAMonitorTable  ODBC call failed  ORA 24344  success with  compilation error          Maximum Columns for MySQL    The exact limit for the number of columns is driven by two factors     LJ  The maximum row size for a table  not counting BLOBs  is 65535     LJ The maximum size of the meta information  schema  associated with a table is 64  KB  The meta information includes the column names  The longer the column  names  the smaller the maximum number of columns     Table B 2 provides information about the maximum number of columns that RTI was  able to use for different column name lengths and column types     For more information about MySQL restrictions on the number of columns  see  http   dev mysql com doc refman 5 1 en column count limit html     B 2 Maximum Columns for MySQL       Table B 2 Max  Number of Columns Use by RTI for Different Column Types and Name Lengths                                     Column Type ag ear al as Maximum Number of Columns   INTEGER  DOUBLE   30 1283    CHAR  50   VARCHAR  50   INTEGER   15 1823    DOUBLE  CHAR  50  15 1308   VARCHAR  50  15 1283                 a  Limited by schema size  b  Limite
107. in  lt publications gt   lt subscriptions gt  is set to true     If a  lt publication gt  or  lt subscription gt  already exists in its table  the primary key is the  same   then the insertion won   t succeed  However you can set the attribute    overwrite     to true  In that case  if the insertion fails  an update is performed on that row     Table 4 12 Subscriptions Tags                      Tags Allowed PE Number of  within Description T  arr ags Allowed   lt subscriptions gt   zsubscipio  s Configures a subscription by inserting or updating a row in the oer  ical pHo table RTIDDS_SUBSCRIPTIONS  See Table 4 13 on page 4 33        4 32    Note that there are columns in the tables RTIDDS_PUBLICATIONS and  RTIDDS_SUBSCRIPTIONS that don   t have a corresponding tag inside  lt publications gt   and  lt subscriptions gt   Those columns represent configuration of QoS  However  you can  configure the quality of service by using  lt profile_name gt   where you can refer to a QoS  profile in your own XML configuration file or in any of the other QoS profile files  loaded by the daemon  see How to Load the XML Configuration  Section 4 4 1          4 4 Configuration File       Table 4 13 Subscription Tags       Tags Allowed within   lt subscription gt     Description    Number of  Tags Allowed           lt table_owner gt         lt table_name gt         lt domain_id gt         lt topic_name gt     Inserts the tag value into the column with the same name  in the table RTIDDS_SUBSCRIPT
108. ion name gt     Assigns a name to the RTI Real Time Connect execution     The application name is used to set the Entity NameQosPol   icy of the DomainParticipants created by RTI Real Time Con   nect         cfgFile  lt configuration file gt     Specifies an XML configuration file for RTI Real Time Con   nect     The parameter is optional since the RTI Real Time Connect  configuration can be loaded from other locations  See  Section 4 4 1 for further details         cfgName  lt configuration name gt     Required   Specifies the name of the configuration to load  The RTI Real   Time Connect Daemon will look for the first tag   lt real_time_connect gt  with that name   See Configuration File   Section 4 4           dbTransport  lt 1 2 gt     This parameter is only available for the rtirtc_oracle   exe   for Oracle Database 11g and the rtirtc_mysql   exe  for  MySQL    By default  RTI Real Time Connect uses shared memory to  communicate with the MySQL and Oracle database servers     The  dbTransport parameter can be used to change the com   munication transport  There are two possible values     1  UDPv4  2  Shared memory  default     Note  Shared memory communication between the RTI Real   Time Connect Daemon and the database servers does not  work on Windows 2003  Windows Vista or Windows 7 sys   tems when the RTI Real Time Connect daemon runs with the  option  nodaemon and the database server runs as a service   For this use case  communication can be enabled by using  UDPv4 
109. is QoS  policy may be used  See also sub partition name  Section 4 5 2 1 14     dw durability kind    This column maps directly to the DDS_DurabilityQosPolicy of the DDSDataWriter cre   ated to publish table changes  By changing this policy  the RTI Real Time Connect Dae   mon can be configured to resend past changes to the database table to remote  applications as soon as their DDS subscriptions are discovered     Only changes made by local applications to the table will be sent  That is  if the daemon  is configured to subscribe to and store changes into the table from remote DDS   DataWriters  those changes are not sent  In addition  the changes will only be sent if the  DDSDataReader is created with a reliable setting for its DDS_ReliabilityQosPolicy     The number of past changes that will be sent is limited by the values of the  lt dw his   tory kind gt    lt dw history depth gt  and  lt dw res_limits max_samples gt  columns     The possible values for the  lt dw durability kind gt  column are     LI    VOLATILE_DURABILITY_QOS       This value prevents the daemon from sending past changes to the table to newly  discovered DDSDataReaders     4 5 Meta Tables       4 5 1 1 14    4 5 1 1 15    This also the default value if the column is NULL   Ll    TRANSIENT _LOCAL_DURABILITY_QOS       This value will enable the daemon to send past changes to the table to newly dis   covered DDSDataReaders  The DDSDataReaders must be created with reliable  DDS_ReliabilityQosPolicy     NOT
110. is available for RTI   Real Time Connect     I The Release Notes  RTILRTC_ReleaseNotes pdf  This document provides an overview of  the current release   s features and lists changes since the previous release  system require   ments  supported architectures  and compatibility with other products     L  The Getting Started Guide  RTI_RTC_GettingStarted pdf  This document provides instal   lation instructions  a short    Hello World    tutorial  and troubleshooting tips      I The User   s Manual  RTI_RTC_UsersManual pdf  This document starts with an overview  of RTI Real Time Connect   s basic concepts  terminology  and unique features  It then  describes how to develop and implement applications that use RTI Real Time Connect     Additional Resources    L The ODBC API Reference from Microsoft is available from http    msdn microsoft com en   us library  ms714562 VS 85  aspx     I The documentation for the Oracle TimesTen In Memory Database can be found in the doc   directory of the Oracle TimesTen installation     J The documentation for Oracle databases can be found here   http    www oracle com technology documentation index html     I The documentation for MySQL databases can be found here   http   dev mysql com doc refman 5 1 en index html     Contents    1 Welcome to RTI Real Time Connect    1 1  1 2    iitended Readers iiron ieie ee eai a E a a e as ia aa deio ies ana ade 1 1  Background Reading siisii niri eaire auen easa aE Ea EE a Tea Ea Eaa Eara 1 2    2 introductio
111. istributed real time systems were built using custom developed data  structures and algorithms to store and manipulate data in combination with a commer   cial  or even proprietary  data distribution middleware layer  This was necessary to  meet real time performance requirements  However  in recent years  DDS  a standard  for data distribution  has emerged as the premier method to integrate and build distrib   uted real time systems     For decades in enterprise systems  standards for communications  data representation  and data storage has enabled the tremendous growth of software applications for  business processes worldwide  The standards such as SQL  ODBC  JMS  HTML  XML   and WDSL have greatly increased the interoperability of those business systems     RTI Real Time Connect is the first commercial product that interconnects the DDS stan   dard newly established in the embedded world to the common standards of the enter   prise world  With RTI Real Time Connect  enterprise applications have direct access to  real time data  and real time applications have access to the plethora of processes and  logic that has been developed to configure and direct actions based on business deci   sions     Connectivity To Edge Devices    For edge devices  such as sensors and hand helds  RTI Real Time Connect   s RTI Data  Distribution Service integration provides direct DDS connectivity to databases   Applications can publish data into relational databases and subscribe to changes in
112. l value for a data instance     If DDSDataReaders used the reception timestamp  the DDSDataReaders may  end up with different final values because data from different DDSDataWriters  may be received in a different order by different DDSDataReaders     4 5 Meta Tables       4 5 2 1 18    4 5 2 1 19    See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also resolution_column  Section 4 5 1 1 8      dr liveliness lease_dur    These columns specify the lease duration for the DDS_LivelinessQosPolicy for the DDS   DataReader created to subscribe to DDSTopic data that is stored in the table  This value  is useful when there are redundant DDSDataWriters that publish values for the same  data instance for the DDSTopic and the value set for the  lt dr ownership kind gt  column  is    EXCLUSIVE_OWNERSHIP_QOS        The liveliness of a DDSDataWriter is monitored by the DDSDataReader  These columns  control how quickly the DDSDataReader can determine that the DDSDataWriter with  the highest ownership strength has lost liveliness because heartbeat packets or data  were not received within the liveliness lease duration  When liveliness is lost  the DDS   DataReader will then receive the data instance from the DDSDataWriter with the next  highest ownership strength that is still alive     The possible values of the  lt dr liveliness lease_dur sec gt   seconds  and  lt dr liveli   ness lease_dur nsec gt   nanoseconds  columns are     
113. length  INTEGER Yes value Spence in Me coniguras Section 4 5 1 1 9   tion file  idl_member_suffix_max_length  INTEGER Yes ae ecified in the configura  Section 4 5 1 1 9   RTI Real Time Connect will not  profile _name VARCHAR 255   Yes  use a profile to create the publica    Section 4 5 1 1 10   tion  pub present access_scope VARCHAR 25  Yes ae ANCE PRESENTATION    lsecton Sadat  pub present ordered_access TINYINT Yes  0  false  Section 4 5 1 1 11  pub partition name VARCHAR 256   Yes  Empty string partition Section 4 5 1 1 12  dw durability kind VARCHAR 30  Yes VOLATILE_DURABILITY_QOS_  Section 4 5 1 1 13  dw liveliness lease_dur sec INTEGER Yes _  Infinite Section 4 5 1 1 14  dw liveliness lease_dur nsec INTEGER Yes _  Infinite Section 4 5 1 1 14  dw deadline period sec INTEGER Yes __  Infinite Section 4 5 1 1 15  dw deadline period nsec INTEGER Yes __  Infinite Section 4 5 1 1 15  dw history kind VARCHAR 21  Yes KEEP_LAST_HISTORY_QOS Section 4 5 1 1 16  dw history depth INTEGER Yes 1 Section 4 5 1 1 16  dw ownership kind VARCHAR 23  Yes SHARED_OWNERSHIP_QOS Section 4 5 1 1 17  dw ownership_strength value INTEGER Yes  0 Section 4 5 1 1 17        SYNCHRONOUS_PUBLISH_     dw publish_mode kind VARCHAR 29  Yes MODE_OOS Section 4 5 1 1 18  dw res_limits max_samples INTEGER Yes __  Infinite Section 4 5 1 1 19  dw res_limits max_instances INTEGER Yes __  Infinite Section 4 5 1 1 19          4 4     JOO UUOD SU     De  y  La Buisn    7    Chapter 4       Table 4 16 RTIDDS PUBLICATIO
114. line period    These columns specify the deadline period for the DDS_DeadlineQosPolicy for the  DDSDataWriter created to publish table changes  The user may need to change the  deadline period if remote applications have modified their DDSDataReaders    corre   sponding DDS_DeadlineQosPolicy to non default values     4 47    JOeuUOD SU     De  y  La Buisn  y    Chapter 4       4 5 1 1 16    4 48    The possible values of the  lt dw deadline period sec gt   seconds  and  lt dw dead   line period nsec gt   nanoseconds  columns are     l An infinite deadline period is specified if both columns are NULL or contain the  value 2147483647  2      1   This is the DDS default value     l A non zero value representing the number of seconds and nanoseconds for the  deadline period     The DDS_DeadlineQosPolicy sets a commitment by the DDSDataWriter to publish a  value for every data instance to DDSDataReaders every deadline period  If this value is  set to a non infinite value  user applications must update the value of every instance of  the DDSTopic stored in the table within each deadline period or the contract with DDS   DataReaders that subscribe to the changes to the table will be violated     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dr deadline period  Section 4 5 2 1 19      dw history kind  dw history depth    These columns directly map to the DDS_HistoryQosPolicy for the DDSDataWriter cre   ated to publi
115. ll  lib rtirtc_mysqlq  so  dll  copy the appropriate version of   lib rtirtc_mysqlq  so  dll  into the MySQL server   s plugin directory  the directory  named by the plugin_dir system variable   The plugin directory can be changed by set     4 1 Introduction to the RTI Real Time Connect Daemon       4 1 2 3    4 1 2 4    ting the value of plugin_dir when the MySQL server is started  For example  you can  set its value in the my cnf configuration file     mysqld    plugin_dir  path to plugin directory    For additional information about the plugin directory see the following link   http   dev mysql com doc refman 5 1 en install plugin html    Installing libnddsc  so  dll  and libnddscore  so  dll  on the MySQL Server    Since the library librtirtc_mysqlq  so  dIl  internally uses RTI Data Distribution Service   the corresponding shared libraries  lib nddsc  so  dll  and  lib nddscore  so  dIl  dis   tributed with RTI Data Distribution Service also need to be installed on the MySQL server  host     Note  Please consult the Release Notes for specific details of the supported platforms for  your release of RTI Real Time Connect to MySQL     The libraries nddsc and nddscore must be located in a directory that is searched by the  system dynamic linker   UNIX based Systems      Copy the shared libraries to a directory such as  usr lib     E Alternatively  add the libraries to the environment variable LD_LIBRARY_PATH  that must be set for the user who starts the MySQL server  This me
116. lt value of         will generate columns names that must be  referenced using double quotes     Default             Oorl        lt close_bracket_char gt           Sets the closing bracket character that is used in the index compo   nent of the arrays and sequences members names    See Array Fields  Section 5 2 8  and Sequence Fields  Section 5 2 9   for more information about the mapping of IDL arrays and  sequences into SQL columns    The default value of         will generate columns names that must be  referenced using double quotes     Default                Oorl          4 25    JOouUOD SU     De  y  La Buisn    7    Chapter 4       4 4 4 3 Database Connection Options    The database connection tags in the XML file direct the  RTI Real Time Connect Daemon to connect to a particular  database as specified by a DSN  data source name  and an  configure the connection      lt database_connection gt      lt user_name gt     The database connection tags are DBMS specific      lt password gt     L   lt mysql_connection gt   L  lt oracle_connection gt      L   lt timesten_connection gt     lt database_logging gt     A  lt real_time_connect gt  tag may have multiple database      connection tags  The DBMS specific RTI Real Time Connect  Daemon will only parse the tags that apply to it  As  explained earlier  the RTI Real Time Connect Daemon will   i  make a connection to a database using the DSN attribute i    for every connection tag that it parses  This is the only   i  way to
117. m is allowed to allocate for storing published data values as  well as the total number of data instances  different primary keys  that can be handled  by the DDSDataWriter     A value of  1 for either of these columns means infinite  An infinite setting means that  the DDSDataWriter is allowed to allocate memory as needed to store published table  changes and manage new keys     I The default value for dw res_limits max_samples  if set to NULL  is 32   J The default value for dw res_limits max_instances  if set to NULL  is  1     The number of keys that the DDSDataWriter is allowed to manage places an upper limit  on the number of rows that the related table in the database can have     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used   changes_queue_maximum_size    This column is available only for connections to a MySQL database  The value of the  column configures the maximum size of the queue that maintains the list of uncommit   ted changes  Note that there is a separate queue per table     A value of  1 is used to indicate unlimited size     4 5 Meta Tables       4 5 1 1 21 RTIRTC_SCN    4 5 2    The System Change Number  SCN  column is available only for connections to a  MySQL database  The value of this column is automatically maintained by RTI Real   Time Connect and is usually of no interest to the application  For more information about  the RTIRTC_SCN column see Section 4 6     Subscriptions Table    When e
118. mber of columns   For publications  625   650   1 000    may be considerably  See Section B 1 smaller  see Section B 2   Maximum column name a  length  characters  30 as 30  Not supported by RTC  CLOB BLOB support YES Pie by  Maximum record size  is 65535 bytes   CHAR maximun size  bytes   2000 8300 255P  VARCHAR maximum size 4000 4194304 65535    bytes   BINARY maximum size 2000 8300 255b   bytes   VARBINARY maximum size 2000 4194304 65535     bytes           a  This limit is imposed by RTI Real Time Connect  not MySQL  which allows column names of up to 64 characters      b  The maximum size of a row in MySQL 5 1 is limited to 65535  For example  you cannot have two fields of type VAR   CHAR 40000  because the total width of the columns would exceed 65535 bytes  For additional information on this  restriction  see http    dev mysql com doc refman 5 1 en column count limit html     spu eSOgDING    g    Appendix B       B 1    B 2    B 2       Maximum Columns for Oracle 11g    For RTI Real Time Connect subscriptions  the maximum number of columns is 1000  This  limit is imposed by the maximum number of columns in an Oracle 11g table     For RTI Real Time Connect publications  the maximum number of columns is limited by  the maximum size of the PL SQL programs that RTI Real Time Connect installs in the  Oracle 11g server  The size of the PL SQL programs depends on the column data types   For tables in which all the columns are numbers  RTI has been able to publish with  approx
119. ment variable   s   is required  15 Error opening the database connection  associated to the DSN   lt DSN gt    16 Error enabling database log  17  lt string gt  too long  maximum length            lt length gt                                                            Table A 1 RTI Real Time Connect Errors and Warnings  Code Message Details  18 Error creating connection to database log  19 The value of the column    column    in the  table   lt meta table gt   is not valid  Error generating   lt type gt   SOL statement The RTI Real Time Connect Daemon had a  20 string problem in generating the string for pre   Error generating SQL statement string paring or executing an SQL statement   21 Error skipping parameter for the field      lt column gt    Error binding parameter for the column  22     lt column gt    Error binding parameters  Supported SQL types are   SOQL_CHAR  SQL_WCHAR  SOL_VARCHAR  SOQL_WVARCHAR  SOQL_BINARY  t i SQL_VARBINARY  23 n e  lt column gt   has an unexpected SOL INTEGER  ype SQL SMALLINT  SQL_TINYINT  SQL_BIGINT  SQL_REAL  SQL_FLOAT  SQL_DOUBLE  SQL_TIMESTAMP  24 Error opening configuration file    filename     25 Error reading configuration file    filename     26 Error parsing configuration file    filename     27 The maximum length for a  lt type gt  field is   lt length gt   oe  A problem occurred when serializing a  28 Error serializing record table row for publishing as a DDSTopic   A problem occurred when deserializing  29 Error deserializing RT
120. mon will create it with the table owner set to the user name of the database con   nection as specified in the daemon   s configuration file  see Section 4 4  The schema and  meaning of the columns of this table are described in the next section     Users may insert new rows or modify the column values of existing rows in this table at  anytime  For a new row  the daemon will first check to see if the designated user table  exists  If so  it will immediately create the DDSDataWriter with the QoS values as speci   fied by the entry  The name of the DDSTopic to publish may be specified by the  topic_name column or be automatically constructed as  lt table_owner gt   lt table_name gt   if the topic_name entry is NULL     If the user table does not exist  the RTI Real Time Connect Daemon will look for the type   code associated with the type defined in the type_name column  If it finds the typecode   the daemon will create the user table with a SQL table schema derived from the type   code following the IDL type to SQL type mapping described in Chapter 5  IDL SQL  Semantic and Data Mapping  Then the daemon will proceed to create the associated  DDSDataWriter  More about the creation of user tables by the daemon can be found in  User Table Creation  Section 4 6      How the daemon discovers and stores typecodes is described in Typecodes  Section  4 1 4   If the RTI Real Time Connect Daemon has not yet have a typecode associated with  the type_name  it will defer the creation of th
121. n    4 1    2 1 The Edge to Enterprise Integration Solution           sss sssssrsssssesrtststeritsstesttsnserntnsntenttssneentes 2 1  2 2 RTI Real Time Connect   s Unique Features            cccceccecsscsssesescsceseecececssseseesessseneseseeasees 2 3  22 1  Interconnecting Standards visi sicccccisssesessscesssdcsssassesssessaseatesessassaneseesasssnsseesoesvan cease 2 4  2 2 2 Connectivity To Edge Devices issiria eiee 2 4  22 3 Flexibility and Scalability  sii  cscccescdsssies css castes coe hetida esiin risaie 2 5  2 2 4 Matching Real Time Performance          ccccccesesessessssseessesenseeseseseseseseseseeeesescsens 2 5  22 9  High Avala DUA EY cascco sc  eeen aee EErEE EE E CEEE KEE EEEn e Esee 2 5  2 2 6 Additional Benefits of RTI Real Time Connect        cccccccccsesecsecssesseesecsseeseeeeeees 2 6  3 Architecture  3 1 RTI Real Time Connect Architecture          ccccccccescessssscessesscessecsecsecssessecsseesceeseeeeeesenseseeees 3 1  3 1 1 RTI Real Time Connect Daemon          cccecccccessessssseesseeecescecsecseecsecssesassseceseeeeeerees 3 2  3 1 2 RTI Real Time Connect   s Unique Features          cccccccccsesseteseseesetesceceneessssanenenees 3 3  3 2 Capturing Real Time Data in a DBMS         cccccccessssessecenesesesesnsneseseeceescassnaneneseseeeneaeaees 3 4  3 3 Remote Real Time Notification of Table Changes            cccccscsssesesesescsenesesescseeseeeeseee 3 5  3 4 Bidirectional Integration sneren rriei ariii a a 3 6  3 5 Bridging between DDS DOMAINS seeni
122. n Cache Connect to  Oracle     Thus the in memory database can act as a fast data cache in front of terabytes of data  storage and tremendous analysis capability of a disk based database  RTI Real Time Con   nect solves the    impedance mismatch    between real time and enterprise applications     High Availability    Availability is an essential requirement for most distributed real time applications  Sys   tems built in the Defense and Aerospace industries are typically safety critical and are  required to operate in crisis situations  In telecommunications  a minute of system  downtime may mean many millions of dollars in lost revenue  With RTI Real Time Con   nect  automatic data caching and replication can serve as the foundation technology for  high availability  Applications can use RTI Real Time Connect to maintain copies of SQL  database tables on two or more hosts in the network  In the event of a host failure  cop   ies of the tables are available from other hosts to continue operation     RTI Real Time Connect   s automated replication management and no single point of fail   ure guarantees the availability of critical information  With RTI Real Time Connect  tables  can be stored on multiple hosts  allowing applications and services to concurrently read  and write in multiple tables  Conflict resolution can be based on application defined  timestamps     2 5    UOHONPONU  Z    Chapter 2       Figure 2 3 High Availability with RTI Real Time Connect    RTI Real Tim
123. n User Table Creation   Section 4 6      This column is useful in the case that the user wants the RTI Real Time Connect Daemon  to both publish and subscribe to a DDSTopic for the same user table  The value set in   lt table_history_depth gt  will enable the daemon to create the user table correctly if the  user wants to store more than a single value for an instance of the DDSTopic in the table     The possible values for  lt table_history_depth gt  column are     LJ NULL or 0    These values should be used if the user does not want to store more than a single  value for an instance of a DDSTopic in the table     If the RTI Real Time Connect Daemon creates the table  it will not add any meta   columns for table history to the table schema     LJ Any other value    For any non zero value in this column  the RTI Real Time Connect Daemon will  add meta columns for table history to the table schema when it creates the user  table automatically     A table   s schema or definition cannot be changed to accommodate the table his   tory meta columns after a table has been created  So a non zero value for this col   umn is useful if the user wants the table to be created with the ability to store  historic values in support of entries in the RTIDDS_SUBSCRIPTIONS table  that may be made later     resolution_column    This column is used to designate one of the columns of the user table for use as the time   stamp when data changes are published with the DDSDataWriter  Instead of usin
124. nly applies when filter_duplicates   Section 4 5 2 1 10  is set to 1  The subscription state is used on restore by RTI Real Time  Connect in order to avoid receiving duplicate samples     sub present access_scope  sub present ordered_access    These two columns map directly to the DDS_PresentationQosPolicy of the  DDS_SubscriberQos used by the DDSSubscriber that is created with the DDSDa   taReader for storing received data in the table  The DDS_PresentationQosPolicy speci   fies how the data instances sent by a publishing application are ordered before they are  received     The values of these columns must be coordinated with the values of the  DDS_PresentationQosPolicy used by the DDSPublisher in the sending application or  else published data may not be received by the DDSDataReader     The possible values for the  lt sub present access_scope gt  column are     LJ    INSTANCE_PRESENTATION_QOS     This also the default value if the column is NULL     4 65      po  uuo   SU     De  y  La Buisn    7    Chapter 4       4 5 2 1 14    4 5 2 1 15    4 66    LI    TOPIC_PRESENTATION_QOS     LI    GROUP_PRESENTATION_QOS       The possible values for the  lt sub present ordered_access gt  column are     LI 0  default value if the column is NULL   d1    For the best performance of the RTI Real Time Connect Daemon  you should set   lt sub present access_scope gt  to    TOPIC_PRESENTATION_QOS    and  lt sub pres   ent ordered_access gt  to 1  This will require that the corresponding v
125. ntries  rows  are added to the meta table RTIDDS_SUBSCRIPTIONS  the RTI  Real Time Connect Daemon will try to create a DDSDataReader  and DDSSubscriber  along with a DDSDomainParticipant if required  and use it to receive data via the RTI  Data Distribution Service for a DDSTopic and store values into the designated user table     If the RTIDDS_SUBSCRIPTIONS table does not exist at startup  the RTI Real Time Con   nect Daemon will create it with the table owner set to the user name of the database con   nection as specified in the daemon   s configuration file  see Section 4 4  The schema and  meaning of the columns of this table are described in the next section     You may insert new rows or modify the column values of existing rows in this table at  any time  For a new row  the daemon will first check to see if the designated user table  exists  If so  it will immediately create the DDSDataReader with the QoS values speci   fied by the entry  The name of the DDSTopic to subscribe to may be specified by the  topic_name column or automatically constructed as  lt table_owner gt   lt table_name gt  if  the topic_name entry is NULL     If the user table does not exist  the RTI Real Time Connect Daemon will look for the type   code associated with the type defined in the type_name column  If it finds the typecode   the daemon will create the user table with a SQL table schema derived from the type   code following the IDL type to SQL type mapping described in Chapter 5  IDL SQL 
126. on     licenseFile  lt file gt      help     lt 0 1 gt      0 6     and it is used to find a  lt real_time_connect gt   matching tag in the configuration files  Application name  Used to name the DDS domain participants  Default   cfgName  Log file  Run as a regular process  Messages are sent to  stdout and stderr  Enables compatibility with  RTI Data Distribution Service 4 2e  This option should be used when compatibility  with 4 2e is required and the topic data types  contain double  long long  unsigned long long   or long double members  Location of the library rtirtc_oracleq  Default  SORACLE_HOME bin  Domain ID of the channel connecting the MySQL  server with RTI Real Time Connect  Default  1  Transport used to communicate the MySQL server  with RTI Real Time Connect    1  UDPv4    2  Shared Memory  Default  2  Shared memory   Type mode  Specifies whether the names and semantics of  the data types follow Oracle or TimesTen type  rules  Default  0  Oracle type mode                 RTI Real Time Connect verbosity  0   silent    exceptions  DDS and service     warnings  service     information  service     warnings  DDS and service     tracing  service   6   tracing  DDS and service   Default  1  exceptions         F F F F  OPFWN PF    Prints the RTI Real Time Connect version  License file  This parameter is optional       Displays this information    4 2 Command Line Parameters       Table 4 1 Command line Options       Option    Description           appName  lt applicat
127. onfigured  using the QoS values of a profile when the attribute  is_default_qos  is set to 1 in that  profile  see the RTI Data Distribution Service User   s Manual for additional details      4 5 1 1 6 topic_name  type_name    These columns define the DDSTopic that will be used to publish the changes in the asso   ciated table  The  lt topic_name gt  and  lt type_name gt  entries need to match the DDSTopic  used by subscriptions in user applications that expect to received data changes from the  table     If the RTI Real Time Connect Daemon has discovered the typecode associated with the   lt type_name gt  and the user table does not exist in the database  the daemon will use the    4 42    4 5 Meta Tables       4 5 1 1 7    4 5 1 1 8    typecode to create the table using entries in the  lt table_owner gt  and  lt table_name gt  col   umn  See User Table Creation  Section 4 6  for more details     table_history_depth    The  lt table_history_depth gt  column in the RTIDDS_PUBLICATIONS determines  whether or not the RTI Real Time Connect Daemon will create the user table with addi   tional meta columns that support the storing of historic  or past  values of instances of  DDSTopics by DDSDataReaders created with the RTIDDS_SUBSCRIPTIONS table  It  is only used if the daemon creates the table because it does not exist     More about the ability to store historic data in the table as well as the added meta col   umns can be found in table_history_depth  Section 4 5 2 1 4  and i
128. onnect Daemon     4 5 Meta Tables       4 5 2 1 11    4 5 2 1 12    4 5 2 1 13    ordered_store    This column specifies whether or not the samples associated with a DataWriter identi   fied by a virtual GUID  x   see Chapter 11  Mechanisms for Achieving Information Durabil   ity and Persistence  in the RTI Data Distribution Service User   s Manual  must be stored in  the database in order  The field only applies when filter_duplicates  Section 4 5 2 1 10   is set to 1     Ordered storage means that given a DataWriter with virtual GUID  x   a sample with vir   tual sequence number  sn 1  will be stored after a virtual sample with virtual sequence  number  sn   If there is only one DataWriter with virtual GUID  x  in the system  for  example  if there are no RTI Persistence Services  the value of this column does not  affect behavior     Note  RTI Real Time Connect stores samples in the database as soon as they are received  by the RTI Real Time Connect subscriptions  RTI Data Distribution Service DataReaders    If ordered_store is set to 1 and there are multiple DataWriters with the same virtual  GUID in the system  old samples will not be stored in the database  A sample with  sequence number  sn  will be ignored if a sample with sequence number  sn 1  for the  same virtual writer has been already stored in the database     persist_state    This column specifies whether or not the state of a RTI Real Time Connect subscription  must be persisted into the database  The field o
129. persist_state TT_TINYINT    sub present access_scope  TT_VARCHAR 25     sub present ordered_access  TT_TINYINT    sub partition name  TT_VARCHAR  256     dr durability kind  TT_VARCHAR  30     dr reliability kind  TT_VARCHAR  27     dr destination_order kind  TT_VARCHAR  43     dr liveliness lease_dur sec  TT_INTEGER    dr liveliness lease_dur nsec  TT_INTEGER    dr deadline period sec  TT_INTEGER    dr deadline period nsec  TT_INTEGER     dr  history kind  TT_VARCHAR  21     dr  history depth  TT_INTEGER    dr ownership kind  TT_VARCHAR  23     dr time_filter min_sep sec  TT_INTEGER    dr time_filter min_sep nsec  TT_INTEGER    dr res_limits max_samples  TT_INTEGER    dr res_limits max_instances  TT_INTEGER    dr unicast receive_port  TT_INTEGER    dr multicast receive_address  TT_VARCHAR  39     dr multicast receive_port  TT_INTEGER    PRIMARY KEY  table_owner  table_name  domain_id  topic_name         Oracle Database 11g                                                                                                                                                                          Create Table RTIDDS_SUBSCRIPTIONS    table_owner VARCHAR 128  NOT NULL        4 54    4 5 Meta Tables       table_name VARCHAR 128  NOT NULL   domain_id NUMBER 10  NOT NULL   topic_name VARCHAR 200    type_name VARCHAR  200    table_history_depth NUMBER 10    process_batch NUMBER 10     process_period sec  NUMBER     process_period nsec  NUMBER  commit_type VARCHAR 17    cache_maximum_size 
130. provided below   change    in RTIDDS_SUBSCRIPTIONS meto table    UPDATE            delete existing    change  DDS sub    INSERT    4 Yes  Goes user  table exist  croata new  if necessary  create  DDSDomainParticipant    No         does type   code exist     Yes create user   table in DB    No  defer creation until tyoecode is discovered    4 5 Meta Tables       4 5 2 1    Subscriptions Table Schema  The RTIDDS_SUBSCRIPTIONS table is created with the following SQL statement   Oracle TimesTen  with command line option  typeMode 1      Create Table RTIDDS_SUBSCRIP1        TIONS      table_owner VARCHAR 128  NOT NULL     table_name VARCHAR  128     domain_id INTEGER NOT NULL   topic_name VARCHAR  200    type_name VARCHAR  200      table_history_depth INTEGER   process_batch INTEGER    process_period sec    process_period nsec   commit_type VARCHAR 17    cache_maximum_size INTEGER                 INTEGER   INTEGER                          cache_initial_size INTEGER     delete_on_dispose INTEGER                       NOT NULL     idl_member_prefix_max_length INTEGER           idl_member_suffix_max_length INTEGER        profile_name VARCHAR 255    filter_duplicates TINYINT     ordered_store TINYINT   persist_state TINYINT                  sub present access_scope  VARCHAR 25       sub present ordered_access     TINYINT      sub partition name  VARCHAR 256    durability kind  VARCHAR  30       ar   rdr   rdr   tar   ndr   ndr   tar    die    die   ads ae   dr   Wars   ar    dies  tdr
131. r  2 P eis app  ng_ names are mapped to the database   0 or 1  CpHons column names  See Section 4 4 4 2       1 or more  required  if running  Configures a connection to a  sirte mysql    lt mysql_connection gt  MySQL database  See F 7      Section 4 4 4 3  0 or more  ignored  if running other  DBMS version of the daemon      1 or more  required  if running  Configures a connection to an rtirte oracle    lt oracle_connection gt  Oracle database  See   i      Gaction 44 45  0 or more  ignored  if running other  DBMS version of the daemon      1 or more  required  if running  Configures a connection to an rtirtc timesten    lt timesten_connection gt    Oracle TimesTen database  See F            Saction 6 4 4 9  0 or more  ignored  if running other  DBMS version of the daemon  4 4 4 1 General Options  Table 4 4 describes the general options  these attributes are independent of any particu   lar database connection made by the RTI Real Time Connect Daemon   4 4 4 1 1 Enabling Table Replication       Enabling database replication will automatically configure the QoS values of DDS pub   lications and subscriptions to provide conflict resolution and table initialization  see  Table 4 5 and Table 4 6   The attribute also enables automatic table creation  see   lt typecode_from_table_schema gt  in Table 4 4  and propagation of NULL values     4 20    4 4 Configuration File       Table 4 4 General Options Tags    Table       Tags within   lt general_options  gt     Description    Numbe
132. r  of Tags  Allowed        lt max_objects_per_thread gt     This parameter controls the maximum number of  objects per thread that DDS can store  If you run into  problems related to the creation of DDS entities   increasing this number may be necessary  See the RTI  Data Distribution Service User   s Manual for more infor   mation     Default  DDS default  1024     Oorl        lt enable_table_replication gt     RTI Real Time Connect can be configured to perform  real time  lazy database replication  see Section 3 7  by  setting this attribute to true     Default  false    Oorl           lt typecode_from_table_schema gt        This tag can be used to enable typecode generation  from table schemas     If this parameter is set to true and a publication or sub   scription is created for a database table without an  associated typecode  RTI Real Time Connect will create  the typecode from the table schema     The new typecode will be made available to other  DDS applications or RTC daemons via DDS discovery  traffic    When RTI Real Time Connect is used for table replica   tion  the default value for this parameter is true allow   ing automatic table creation in the replicas    Default  false  except when enable_table_replication is  set to true         Oorl                   45 DataWriter QoS Changes when  lt enable_table_replication gt  is true  QoS Change Purpose  reliability kind   RELIABLE_RELIABILITY_QOS Enables reliability          destination_order kind      BY_SOURCE_TIM
133. r VARCHAR 128  NOT NUI          LL        table_name VARCHAR 128  NOT NULI  domain_id INTEGER NOT NULL   topic_name VARCHAR  200      iy    4 37    JOO UUOD SU     De  y  La Buisn    7    Chapter 4       4 38    type_name VARCHAR 200    table_history_depth INTEGER   resolution_column VARCHAR  255      idl_member_prefix_max_length INT          idl_member_suffix_max_length INT    profile_name    VARCHAR  255      EGER   EGER      pub present access_scope  VARCHAR 25       pub present    pub partition  durability  liveliness  liveliness  deadline   deadline   history kind  VARCHA  history depth   ownership kind  VARCHAR  23    ownership_strength value   publish_mode kind  VARCHAR  29  res_limits max_samples   res_limits max_instances      dw    dw    dw    dw    dw    dw    dw    dw    dw    dw    dw    dw        ordered_access    name  VARCHAR  256    kind  VARCHAR  30     lease_dur sec     lease_dur nsec   period sec  INTEGER  period nsec  INTEGE  R 21    ER              INT       EG        IN    INT    TINYINT                      EG                R        TEG          ER          INTE    GER           IN       a          EGER       ER   INTEGER     t         PRIMARY KEY table_owner table_name domain_id topic_name     Oracle TimesTen  with command line option  typeMode 0      Create Table RTIDDS_PUBLICATIONS    table_owner 1  table_name TI    domain_id TT_     T_VARCHAR  128                 topic_name TI       type_name TT_VARCHAR  200       _VARCHAR  128  NOT NUL  INTEGER N
134. r the  lt pub present ordered_access gt  column are     LI 0  default value if the column is NULL   J1    4 45    po  uuo   SU     De  y  La Buisn    7    Chapter 4       4 5 1 1 12    4 5 1 1 13    4 46    For the best performance of the RTI Real Time Connect Daemon  you should set   lt pub present access_scope gt  to    TOPIC_PRESENTATION_QOS    and _  lt pub pres   ent ordered_access gt  to 1  This will require that the corresponding values in the  DDS_PresentationQosPolicy of the DDSSubscriber in the receiving applications to be  changed to those values as well     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also sub present access_scope  sub present ordered_access  Sec   tion 4 5 2 1 13      pub partition name    For publishing table changes  RTI Real Time Connect creates a DDSDataWriter per table   The pub partition name column maps directly to the DDS_PartitionQosPolicy of the  DDS_PublisherQos used by the DDSPublisher that is created with the DDSDataWriter   The DDS_PartitionQosPolicy introduces a logical partition concept inside the    physical     partition concept introduced by the domain ID  A DDSPublisher can communicate with  a DDSSubscriber only if they have some partition in common  The value of the pub parti   tion name column specifies a list of partitions separated by commas to which the DDS   Publisher belongs     See the RTI Data Distribution Service documentation for more details on how th
135. ransaction  log  Consequently  RTI Real Time Connect will not  work for DSN configurations where logging is  turned off  Logging 0   This limitation applies only  to Oracle TimesTen In Memory Database  not to Ora   cle Database 11g or MySQL     1  required         lt user_name gt     Specifies the user name to connect to the database     This attribute is mandatory for Oracle and MySQL  databases  since there is no default user for database  connections     It is optional for Oracle TimesTen  if this attribute is  missing  then the connection to the database will use  the username of the UID who owns the RTI Real   Time Connect Daemon process     1  required  in   lt mysql_connection gt   and   lt oracle_connection gt     0 or 1  optional  in   lt timesten_connection gt         lt password gt      lt send_period gt           Specifies the password to connect to the database     The send_period value specifies the milliseconds  interval at which the RTI Real Time Connect Daemon  publishes database changes  The value must be  greater than or equal to 0  With a value of 0 the dae   mon publishes database changes as soon as they are  available  A shorter time interval reduces latency     Default  100 ms       1  required  in   lt mysql_connection gt   and   lt oracle_connection gt     0 or 1  optional  in   lt timesten_connection gt     Oorl          4 27    JOoUuUOD eu     De  y  La Buisn    7    Chapter 4       Table 4 8 Common Tags for all Database Connections       Common Tag
136. re  SQL identifiers are a superset of IDL identifiers  Because of that  an IDL  identifier can always be used as an SQL identifier  However  there are some SQL identi   fiers that cannot be used as IDL identifiers  For example  SQL allows special characters  like         to be part of an identifier  whereas IDL does not     There are two kind of SQL identifiers  quoted identifiers and basic identifiers  The quoted  identifiers can use any combination of characters  Those identifiers need to be sur   rounded by double quotes when referenced  The definition of a basic identifier changes  depending on the database vendor     In Oracle TimesTen  a basic identifier can consist of any of letters  A to Z   decimal digits   0 to 9            or underscore  _   The first character must be a letter     In Oracle  a basic identifier can consist of any of letters  A to Z   decimal digits  0 to 9          or underscore  _   The first character must be a letter     In MySQL  a basic identifier can consist of any letters  A to Z   decimal digits  0 to 9       or underscore  _      If the daemon creates the user table  it will use quoted strings for the identifiers of the  table and column names only if they cannot be considered as basic identifiers according    5 4    5 2 Data Representation Mapping       to the previous definitions  Thus  user applications should also use quoted strings when  referring to those column and table names in their SQL statements     Ordinarily  the name of a fi
137. red before received data is stored in the database  The period can be set to 0 only if   lt process_batch gt  is set to 1  This means that the daemon will store each data sample as  it is received so there is no need for periodic processing of the received samples  Use  these values to have the daemon store the data with minimal latency  at the cost of  lower overall throughput      Finally  using the column  lt commit_type gt   you can choose whether or not the SQL  UPDATE INSERT statements are committed when each data sample is stored or after  all of the data being processed have been stored  There is significant performance    jO UUOD OU       De  y  La Buisn    7    Chapter 4       4 62    enhancement if the storing of multiple data samples is committed as a single transac   tion     However  if there is a problem during an SQL commit  for example  the transaction log  of the database is full  then the entire transaction is rolled back which means that none  of the received data in that batch will be stored in the table  If the storing of each data  sample is committed separately  then an error committing any one sample will only  result in the loss of that sample     The possible values of the  lt process_batch gt  column are     Lln gt 0    The daemon will process data samples in batches of n  A value less than or equal  to 0 will result in an error that is logged by the daemon     A value of n   1 means that the daemon will store each data sample as it arrives     The
138. rom the database  If delete_on_dispose is initialized to 1  all the rows associ   ated with the DDS instance will be deleted from the database     idl_member_prefix_max_length  idl_member_suffix_max_length    These columns define how RTI Real Time Connect maps IDL member identifiers into col   umn names  In particular  they control how the column names are formed by using as a  prefix n characters from the identifier   s prefix and m characters from the identifier   s suf   fix     They can assume any value greater than or equal to  1  They cannot both be set to zero     4 63    jOoUuUOD SU     De  y  La Buisn    7    Chapter 4       4 5 2 1 9    4 5 2 1 10    4 64    If a positive value n is provided for idl_member_prefix_max_length  RTI Real Time  Connect will use the first n characters from the IDL member identifier to compose the  associated column name  A value of 0 tells RTI Real Time Connect to compose the column  name using only the last characters of the identifiers  as defined by the     idl_member_suffix_max_length    column  A value of  1  instructs RTI Real Time Connect  to use all the available characters     If a positive value n is provided for idl_member_suffix_max_length  RTI Real Time Con   nect will use the last n characters from the IDL member identifier to compose the associ   ated column name  A value of 0 tells RTI Real Time Connect to compose the column  name using only the first characters of the identifiers  as defined by the     idl_member_prefix_m
139. ror creating  lt waitset type gt  guard condi    tion  1043 Error attaching condition  1044 Error registering type   lt type gt    1045 Error taking REDA buffer  1046 Error creating mutex  1047 Error creating  lt thread gt  thread  1048 Error creating REDA fast buffer  1049 Error taking semaphore  1050 Error giving semaphore  1051 Error creating worker factory  1052 Error creating worker  1053 Error creating clock  1054 Error creating event manager                   Table A 1    RTI Real Time Connect Errors and Warnings       Code Message Details          1055 Error creating timer       1056 Error posting event       1057 Error getting time       1058 Error creating semaphore       1059 Error loading DDS XML Profile       1060 Error getting TypeCode       1061 Error cloning TypeCode             1062 Error parsing TypeCode       2048   4095 ODBC related errors  These message are produced through the interaction of the RTI Real Time Connect Daemon with the  database through the ODBC driver  More information on each error can be found by examining the  native ODBC errors codes that will be logged with these messages         lt message gt   2048 General ODBC error message      lt message gt    lt ODBC driver error message gt              4096   8191 DBMS Log Connection related errors  These messages are produced through the interaction of the RTI Real Time Connect Daemon with  the RTI Data Distribution Service  More information on each error can be found by examining the  native 
140. s  Section 4 2    LJ Environment Variables  Section 4 3    LI Configuration File  Section 4 4    LJ Meta Tables  Section 4 5     J User Table Creation  Section 4 6     4 1      po  uuoy SU     De  y  La Buisn    7    Chapter 4       4 1    4 1 1    4 2       Introduction to the RTI Real Time Connect Daemon    RTI Real Time Connect bridges the world of DDS and the world of relational databases   The main element of the bridge is an executable that must run on the same host as the  database management system  DBMS   This executable is called the RTI Real Time Con   nect Daemon  it interacts with both the DDS and database worlds     RTI Real Time Connect uses RTI Data Distribution Service and supports three databases   Oracle Database 11g  Oracle TimesTen In Memory Database 11 2 1  and MySQL 5 1   There is a separate executable that you must run depending on which database you are  using    L Oracle Database  rtirtc_oracle  exe    J Oracle TimesTen In Memory Database  rtirtc_timesten  exe    L  MySQL  rtirtc_mysql  exe     These executables can be executed as foreground processes during development or as  background processes or as a service on Windows systems  You can configure the gen   eral behavior of the RTI Real Time Connect Daemon by using command line parameters   environment variables and configuration files  Meta tables in the database are used to  configure the specific topics and tables that are bridged by the daemon     Besides using compatible versions of RTI Data 
141. s  for   lt mysql_connection gt     lt oracle_connection gt     lt timesten_connection gt     Description    Number of Tags  Allowed           lt database_logging gt    lt enabled gt    lt history_depth gt     If enabled  the RTI Real Time Connect Daemon   s log  messages will be stored in a table named     RTIRTC_LOG    in the database specified by the  DSN     Optionally  you can specify the history depth of the  log  This value limits the size of the table   RTIRTC_LOG  in the database that the daemon uses  for logging messages  The default is 1000 rows  and a  value of  1 implies no limit  When the table is filled   new log messages will replace the oldest messages   effectively using the table as a circular buffer     Default  disabled    Oorl        lt publications gt     This tags allows inserting publications in the table  RTIRTC_PUBLICATIONS when the daemon starts  up  See Initial Subscriptions and Publications  Sec   tion 4 4 4 4      Oorl        lt subscriptions gt           This tags allows inserting subscriptions in the table  RTIRTC_SUBSCRIPTIONS when the daemon starts  up  See Initial Subscriptions and Publications  Sec   tion 4 4 4 4         Oorl       4 28       4 4 Configuration File       Table 4 9 Tags for MySQL Connections       Additional Tags  Allowed within     lt mysql_connection gt     Description    Number of    Allowed    Tags              lt transaction_max_duration gt     Provides an estimation of the maximum duration of a data   base transaction
142. s QoS  policy may be used     dr res_limits max_samples  dr res_limits max_instances    These columns set some parameters for the DDS_ResourceLimits QosPolicy for the  DDSDataReader created to subscribe to DDSTopic data that is stored in the table  In par   ticular  they control the amount of memory that the system is allowed to allocate for  storing published data values as well as the total number of data instances  different  primary keys  that can be handled by the DDSDataReader     A value of  1 for either of these columns means infinite  This is also the default value for  these columns if they are NULL  An infinite setting means that the DDSDataReader is  allowed to allocate memory as needed to store received table changes and manage new  keys     The number of keys that the DDSDataReader is allowed to manage places an upper  limit on the number of rows that the related table in the database can have     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used   dr unicast receive_port    This column is used to configure the unicast port on which the DDSDataReader will  receive data  When the default value  NULL or 0  is used  the actual port number is  determined by a formula as a function of the domain ID     dr multicast receive_address    This column is used to set a multicast address for the DDSDataReader to receive values  for the DDSTopic  The column maps to the DDS_TransportMulticastQosPolicy of the  DDSDataReader
143. s that are fed  back to remote sensors and devices to control their behavior and mode of operation     Figure 3 4 Storing Published DDS Data in a SQL Database           DDS RTI Real Time Connect           F         gt   Daemon  SQL    Table Tracks Table Passengers  Fit Lat  Long  Fit Name Addrs    C129 34 5 102 3 C129 A  Johnson        C054 27 7 46 8 C054 J  Smith            Embedded So SSS SEETTTTT ESS TISTT ESSE TT IS Enterprise    3 6    3 5 Bridging between DDS Domains          3 5 Bridging between DDS Domains    Figure 3 5 shows how RTI Real Time Connect can be used as a bridge between two DDS  domains by configuring the RTI Real Time Connect Daemon to subscribe to data in one  domain and publishing the same data in a different domain  Data sent by DDS applica   tions in the first domain are stored by the daemon in a local in memory table  Since  changes in the table are sent by the daemon into a second DDS domain  the data is ulti   mately received by DDS applications in the second domain  There is no feedback cancel   lation needed since the data is being bridged across domains  Usually DDS domain  bridges have to be written by users and modified whenever data types or DDS topics  change  Using RTI Real Time Connect  no programming is required to create a high per   formance bridge for any topic of any data type between any domains     Figure 3 5 Storing Published DDS Data in a SQL Database    a     Relatiot                   Embedded   Embedded    3 7    OINjOoIYDIY  
144. separate columns     When the RTI Real Time Connect Daemon creates a table schema from a DDS Topic  it  will automatically flatten hierarchical data structures into tables  In doing so  the names  of columns that store the fields of embedded structures will have hierarchical names   For example  given this IDL definition     struct bar   struct foo    long one  bar element   long two  Fi    3    The table constructed from a DDSTopic which uses the foo type would have the follow   ing schema by default        CREATE table foo   INTEGER element one  INTEGER element two                        The RTI Real Time Connect Daemon allows the configuration of the separator character            using the attribute IdentifierSeparatorChar defined in the general options of the con   figuration file  described in Section 4 4 4 1      5 5    Bulddo opoq pup    OHUDWUSS TOS 1AI  S    Chapter 5       5 6    While for most embedded structures  the hierarchical naming of columns is not needed  for the RTI Real Time Connect Daemon to handle type translation correctly  the proper  hierarchical naming of columns is essential for the daemon to serialize and deserialize  IDL unions and sequences  These types are variable in length  however the table must  have enough columns to hold the maximum size of the IDL data type  Hierarchical  naming allows the RTI Real Time Connect Daemon to identify columns that form a  embedded  complex element     Wt    For variable length types  other than sequences of 
145. setting  the value in  lt dw history depth gt  is ignored     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dw durability kind  Section 4 5 1 1 13  and  dw res_limits max_samples  dw res_limits max_instances  Section 4 5 1 1 19      dw ownership kind  dw ownership_strength value    These columns directly map to the DDS_OwnershipQosPolicy and DDS_Ownership   StrengthQosPolicy for the DDSDataWriter created to publish table changes  These poli   cies control whether or not DDSDataReaders are allowed to receive changes to an  instance of a DDSTopic from multiple DDSDataWriters simultaneously     The possible values of the  lt dw ownership kind gt  and  lt dw ownership_strength value gt   columns are     LI    SHARED_OWNERSHIP_QOS     default value if the column is NULL     This setting allows DDSDataReaders to receive updates for an instance of a  DDSTopic from multiple DDSDataWriters at the same time     Ll    EXCLUSIVE_OWNERSHIP_QOS       This setting prevents a DDSDataReader from receiving changes from more than  a single DDSDataWriter for an instance of a DDSTopic at the same time     The DDSDataReader will receive changes for a topic instance from the DDS   DataWriter with the greatest value of ownership strength  If the liveliness of the  DDSDataWriter fails or if the DDSDataWriter fails to write within a deadline  period  then the DDSDataReader will receive published changes to the topic  instance from th
146. sh table changes  The values set for this QoS policy affect the  DDS_ReliabilityQosPolicy and the DDS_DurabilityQosPolicy     Using a    KEEP_ALL_HISTORY_QOS    will ensure that reliable DDSDataReaders will  receive every change to the table reliably  With a    KEEP_LAST_HISTORY_QOS     the  RTI Real Time Connect Daemon will only guarantee that the last  lt dw history depth gt   changes for each data instance are sent reliably     If the  lt dw durability kind gt  column of the row is set to    TRANSIENT_LOCAL_DURA   BILITY_QOS     then these columns determine how many past data changes are sent to  new subscribers to table changes     The possible values of the  lt dw history kind gt  and  lt dw history depth gt  columns are     L     KEEP_LAST_HISTORY_QOS       For this setting  the column  lt dw history depth gt  determines how many pub   lished changes for each data instance in the table are stored in the DDS   DataWriter to support reliability or durability      lt dw history depth gt  should be set to an integer greater than 0  The default value  for history depth is 1 if this column is NULL     LI    KEEP_ALL_HISTORY_QOS     default value if the column is NULL     4 5 Meta Tables       4 5 1 1 17    This setting implies that the DDSDataWriter created to publish table changes  will store all of the changes to the table that it has sent  The total number of  changes that can be stored is limited by the value in the   lt dw res_limits  max_samples gt  column     For this 
147. ss_period sec  INTEGER    process_period nsec  INTEGER   commit_type VARCHAR 17    cache_maximum_size INTEGER   cache_initial_size INTEGER   delete_on_dispose INTEGER   idl_member_prefix_max_length INTEGER   idl_member_suffix_max_length INTEGER   profile_name VARCHAR 255    filter_duplicates TINYINT   ordered_store TINYINT   persist_state TINYINT    sub present access_scope  VARCHAR 25     sub present ordered_access  TINYINT    sub partition name  VARCHAR 256     dr durability kind  VARCHAR  30     dr reliability kind  VARCHAR  27     dr destination_order kind  VARCHAR  43     dr liveliness lease_dur sec  INTEGER    dr liveliness lease_dur nsec  INTEGER    dr deadline period sec  INTEGER    dr deadline period nsec  INTEGER     dr  history kind  VARCHAR 21      dr  history depth  INTEGER    dr ownership kind  VARCHAR 23     dr time_filter min_sep sec  INTEGER    dr time_filter min_sep nsec  INTEGER    dr res_limits max_samples  INTEGER    dr res_limits max_instances  INTEGER    dr unicast receive_port  INTEGER    dr multicast receive_address  VARCHAR  39     dr multicast receive_port  INTEGER   RTIRTC_SCN BIGINT DEFAULT 0    PRIMARY KEY  table_owner table_name  domain_id  topic_name                                                                                                                          1  See Starting the MySQL Server in ANSI_QUOTES mode  Section 4 1 2 4      4 56    4 5 Meta Tables       Users should use the same SQL statement in their own applications if they
148. t         lt idl_member_prefix_  max_length gt         lt idl_member_suffix_  max_length gt            lt profile_name gt        Inserts the tag value into the column with the same  name in the table RTIDDS_PUBLICATIONS     If the value is not specified  NULL is inserted   See Section 4 5 1       Oorl          4 5 Meta Tables       4 5       Meta Tables    After the RTI Real Time Connect Daemon has started and successfully made a connection  to a database  the user will still need to configure the daemon to publish table changes  as DDSTopics as well as subscribe to DDSTopics for storing received data into a table   This configuration is done by inserting entries into two _ tables  RTIDDS_PUBLICATIONS and RTIDDS_SUBSCRIPTIONS  These tables will be cre   ated by the RTI Real Time Connect Daemon if they do not already exist in the database     The two tables are referred to as meta tables since their data is not user data but informa   tion used by the daemon to create DDSDataWriters and DDSDataReaders  as well as  corresponding user tables in the database  The tables are just ordinary tables that users  can create themselves before starting the RTI Real Time Connect Daemon if so desired   However  if the user chooses to do so  it is important that the tables be created with the  exact tables schemas presented below  otherwise the daemon may not work correctly  If  the daemon finds existing meta tables upon startup  it will process every row in the  tables as if they were newly
149. t dr res_limits max_samples gt  column     For this setting  the value in  lt dr history depth gt  is ignored     See the RTI Data Distribution Service documentation for more details on how this QoS  policy may be used  See also dr res_limits max_samples  dr res_limits max_instances   Section 4 5 2 1 23      4 5 Meta Tables       4 5 2 1 21    4 5 2 1 22    dr ownership kind    These columns directly map to the DDS_OwnershipQosPolicy and DDS_Ownership   StrengthQosPolicy for the DDSDataReader created to subscribe to DDSTopic data that is  stored in the table  These policies control whether or not the DDSDataReader is allowed  to receive changes to an instance of a DDSTopic from multiple DDSDataWriters simulta   neously     The possible values of the  lt dr ownership kind gt  column are     LI    SHARED_OWNERSHIP_QOS     default value if the column is NULL     This setting allows the DDSDataReader to receive updates for an instance of a  DDSTopic from multiple DDSDataWriters at the same time     Ll    EXCLUSIVE_OWNERSHIP_QOS       This setting prevents the DDSDataReader from receiving changes from more  than a single DDSDataWriter for an instance of a DDSTopic at the same time     The DDSDataReader will receive changes for a topic instance from the DDS   DataWriter with the greatest value of ownership strength  If the liveliness of the  DDSDataWriter fails or if the DDSDataWriter fails to write within a deadline  period  then the DDSDataReader will receive published changes to
150. t subscrip   tion gt   see Section 4 4 4 4      l  By referring to a profile in the profile _name column of  the tables RTIDDS_PUBLICATIONS or  RTIDDS_SUBSCRIPTIONS  see Section 4 5 1 and  Section 4 5 2      0 or more           lt types gt        Defines types that can be used to create database tables     The type description is done using the RTI Data Distribution  Service XML format for type definitions  For more informa   tion  see Section 3 4 in the RTI Data Distribution Service  User   s Manual    For example      lt types gt    lt struct name  Point  gt    lt member name  x  type  long   gt    lt member name  y  type  long   gt    lt  struct gt    lt  types gt     RTI Real Time Connect supports automatic table creation by  using the types defined within this tag or the typecode sent  by DDS applications     See Section 4 6 for additional information on user table cre   ation        Oorl          4 4 Configuration File       Table 4 2 Top Level Tags       Tags within  lt dds gt  Description    Number of  tags Allowed           lt real_time_connect gt    Real Time Connect Daemon Daemon to connect to a database       Specifies an RTI Real Time Connect configuration     This tag is used to specify the set of databases to which the  daemon will connect     Note  There is no way to dynamically configure the RTI 1 de  mor                required   after it has started  All database connections must be speci     fied within this tag before the daemon starts   See Table 4 3 for
151. table changes in Oracle TimesTen In Memory databases propagated to corresponding  tables in Oracle 11g or MySQL 5 1 databases  and vice versa     3 9      IN o  JyIy  E    Chapter 3       3 10    Chapter 4 Using RTI Real Time Connect    This chapter provides detailed information on using the RTI Real Time Connect Daemon  to subscribe to and store data received as DDSTopics into relational databases  as well as  to publish as DDSTopic changes in relational database tables     The contents of this chapter assume you have a working knowledge of DDS  specifically  the RTI Data Distribution Service  and relational databases  especially the MySQL  Oracle  and or Oracle TimesTen In Memory databases  The chapter also assumes familiarity  with IDL  Interface Definition Language   the DDS and SQL specifications and APIs   Finally  you should be able to create and run applications using DDS to publish and sub   scribe to data  as well as applications that can access Oracle databases using SQL  through either ODBC or JDBC interfaces     Users can configure the RTI Real Time Connect Daemon to subscribe to DDS Topics and  store received values in a table  or to publish database changes as DDS Topics using a  combination of methods     J Command line parameters    J Environment variables   I Configuration file   L Configuration tables in the database  This chapter includes the following sections    LJ Introduction to the RTI Real Time Connect Daemon  Section 4 1    LJ Command Line Parameter
152. that exist in the table  that  the RTI Real Time Connect Daemon maintains for each DDSDataReader  When a data  instance is received  the daemon first checks the cache to see if a row corresponding to  the data already exists in the table  If the key is in the cache  then the daemon executes  an SQL UPDATE to store the data in the table     If the key does not exist in the cache  then the RTI Real Time Connect Daemon will  INSERT a row with the key instead  The key cache can greatly enhance the performance  of the daemon in storing data into the database by saving an SQL operation each time  data is received  Without a cache  the daemon would need to execute 2 SOL statements   to store data  with the cache  only 1     The trade off is the memory used to store keys versus the performance gain     The default values of  lt cache_maximum_size gt  and  lt cache_initial_size gt  are 0 if the col   umns are NULL  The sizes are specified as the number of keys     For small tables  the cache could be sized to hold all of the keys  Thus the size of the  cache would be the maximum number of rows in the table  However  this is not practi   cal for large tables and thus the cache will be smaller     delete_on_dispose    This column configures the behavior of the RTI Real Time Connect Daemon when a DDS   DataWriter disposes an instance stored into the database  When delete_on_dispose is  initialized to 0  the default value   the rows corresponding to the DDS instance will not  be deleted f
153. the above approaches        1  x stands for the version letter of the current release     4 15    JOeUuUOD SU     De  y  La Buisn    7    Chapter 4       4 4 2 XML Syntax and Validation    The XML configuration file must follow these syntax rules   LJ The syntax is XML  the character encoding is UTF 8   L  Opening tags are enclosed in  lt  gt   closing tags are enclosed in  lt   gt      LL  A tag value is a UTF 8 encoded string  Legal values are alphanumeric characters   The routing service   s parser will remove all leading and trailing spaces  from the  string before it is processed     For example     lt tag gt  value  lt  tag gt   is the same as   lt tag gt value lt  tag gt     J All values are case sensitive unless otherwise stated   J Comments are enclosed as follows   lt     comment    gt    I The root tag of the configuration file must be  lt dds gt  and end with  lt  dds gt      RTI Real Time Connect provides DTD and XSD files that describe the format of the XML  content  We recommend including a reference to one of these documents in the XML file  that contains the RTI Real Time Connect   s configuration   this provides helpful features  in code editors such as Visual Studio and Eclipse  including validation and auto com   pletion while you are editing the XML file     The DTD and XSD definitions of the XML elements are in  lt RTI Real Time Connect  installation directory gt  resource schema rti_real_time_connect dtd and  lt RTI Real   Time Connect installation dire
154. thod requires  restarting the MySQL server     Windows Systems     L  Copy the  dll files to the system directory  WINDOWS  System32 or WIN   DOWS  System        Alternatively  you can add the directories containing the libraries to the System  variable Path as follows     Using the dialog opened with Start  Settings  Control Panel  System  Advanced  tab  Environment Variables button  add the directories  with backslash         and  semicolon separators          containing the libraries to the System variable    Path     If  the MySQL server is running as a service  you will need to reboot the computer  for this change to take effect     Starting the MySQL Server in ANSI_QUOTES mode    The MySQL server can operate in different sql modes  The RTI Real Time Connect Dae   mon requires the MySQL server to be configured in ANSI_QUOTES mode  Under that    4 7    JOoUuUOD SU     De  y  La Buisn    7    Chapter 4       4 8    snr    configuration  the MySQL server treats  string quote character     To verify if the MySQL server is already configured in ANSI_QUOTES mode  run the  following SQL statement     as an identifier quote character instead of a    SELECT   global sql_mode     If the string    ANSI_QUOTES    is not part of the result  the MySQL server needs to be  configured in ANSI_QUOTES mode using the option   sql_mode    ANSI_QUOTES    to  start the server       That same effect can be achieved at runtime by executing the following SQL statement     SET GLOBAL sql_mode     
155. tion through the exe   cution of the associated SELECT statement  The schema of the metatables is not valid   37 Invalid metatable schema It is possible that those tables were created  with a previous version of RTI RTC   38 Error deleting key from cache  39 Error deleting a row from   lt table gt   There was a problem deleting a row from a  user data table   The user tried to create a publication sub   ji Error creating publication  subscription for   scription for a table without a primary key        the   lt table gt   without primary key        RTI Real Time Connect to Oracle does not  support tables without primary keys                                                        Table A 1 RTI Real Time Connect Errors and Warnings  Code Message Details  Non primitive IDL keys are not supported   When RTI Real Time  Connect tries to create a table with complex  keys  it will report this error message   Example with supported keys   struct SupportedKeysSt    string id_str     key  long id_long     key  43 Key not supported short id_short     key  IF  Example with unsupported keys   struct KeySt    long id_long      struct NonSupportedKeysSt    KeySt id_st     key     44 Error creating subscriber state queue  45 Error updating subscription state  46 Error creating   lt object gt    47 Path too long The path to the configuration file is too  long   The RTI Real Time Connect Daemon had a  48 Error creating database publication cache problem creating the publication database  cache 
156. to interconnect the real time   embedded world with the analysis and high level decision making processes of the    enterprise world     Figure 2 2 Example System Using RTI Real Time Connect    Sensor 1 Sensor 2 Business System 1                                                 tracks    Data Fusion    Oracle  _ Database  saree                      O                Summary and  Statistics                               675          User apps  DDS   User apps  SQL     RTI Real Time Connect  daemon   Oracle TimesTen  In Memory database  Oracle BPEL Process  Manager    2 3    uoonpou     Z    Chapter 2       2 2 1    2 2 2    2 4    In Figure 2 2  sensors of physical processes produce data that must be filtered  fused   and stored for use in business processes  In addition  multiple user consoles must have  concurrent access to both raw and fused data  RTI Real Time Connect is used to store the  raw data at high rates into an Oracle TimesTen In Memory database where Oracle  Cache Connect is then used to propagate the data into an Oracle 11g database for per   manent storage  Enterprise applications used for analysis or applying other business  logic can access the data stored in Oracle using SQL or other standards such as JMS   XML  and HTTP via a BPEL process manager     RTI Real Time Connect is the bridge that connects real time high performance to com   plex analysis  edge devices to business systems  and embedded to enterprise     Interconnecting Standards    Until recently  d
157. ues to insert in these tables     For example      lt mysql_connection gt      lt subscriptions delete  true  gt    lt subscription gt    lt table_owner gt user lt  table_owner gt    lt table_name gt mytablel lt  table_name gt    lt domain_id gt 54 lt  domain_id gt    lt topic_name gt mytopicl lt  topic_name gt    lt type_name gt mytypel lt  type_name gt    lt  subscription     lt subscription gt    lt  subscription gt    lt  subscriptions gt      lt publications gt     lt publication overwrite  true  gt    lt table_owner gt user lt  table_owner gt    lt table_name gt mytable2 lt  table_name gt    lt domain_id gt 54 lt  domain_id gt    lt topic_name gt mytopic2 lt  topic_name gt    lt type_name gt mytype2 lt  type_name gt     lt  publication gt      lt publication gt    lt  publication gt      lt  publications gt    lt  mysql_connection gt     Within  lt subscriptions gt  and  lt publications gt  tags  you can specify as many  lt subscrip   tion gt  and  lt publication gt  tags as you want  The content of each tag inside  lt subscrip   tion gt   lt publication gt  represents the value for a column with the same name in the table  RTIDDS_SUBSCRIPTIONS RTIDDS_PUBLICATIONS  Each of these  lt subscription gt      4 3     jOeuUOD SU     De  y  La Buisn    7    Chapter 4        lt publication gt  tags may result in the insertion or update of a row in the corresponding  meta table     All the rows in the tables can be deleted before inserting new rows if the attribute     delete    
158. upport provided by RIT s messaging technology  while retaining interoperability with existing enterprise applications  see Figure 2 1     RTI Real Time Connect is a fully standards based solution for the integration of enter   prise applications and high performance real time applications  Enterprise applications  typically use Structured Query Language  SQL  and Extensible Markup Language   XML  for data access and Java Message Service  JMS   Service Oriented Architectures   SOAs   and Web services for integration     The most commonly adopted standard in high performance real time systems  for both  integration and data access  is Object Management Group s  OMG  Data Distribution  Service for Real Time Systems  DDS   RTI Real Time Connect enables interoperability by  bridging between enterprise and embedded standards at the data and communications  levels  allowing existing applications to be integrated with few or no changes     2 1    UOHONPOMU  Z    Chapter 2       Figure 2 1    2 2    RTI Real Time Connect Bridges Embedded and Enterprise Applications    RTI Real Time Connect BPEL Process  Daemon Manager    DDS ODBC Cache    Connect to  Oracle       High performance Permanent storage    RTI Real Time Connect also mitigates the performance mismatch between enterprise and  embedded applications  Real time applications using DDS can deliver messages and  data at rates between 10 and 100 times faster than can be accepted by enterprise applica   tions  RTI Real Time Connect d
159. ution Service  is a standard API used to send and receive data  between networked applications following a publish subscribe paradigm  Oracle pro   vides both file based and in memory products that allow applications to store and  retrieve data following a relational database paradigm  The corresponding standard  API in the database world is SQL  Both DDS and SQL APIs have various language bind   ings in C C   and Java     How RTI Real Time Connect maps actions  semantics  and data types  data representa   tion  from DDS to SQL and vice versa is described in the following sections     I Semantic Mapping  Section 5 1   I Data Representation Mapping  Section 5 2        Semantic Mapping    In DDS  applications publish and subscribe to topics which are named data structures  using functions like DDSDataWriter  write   and DDSDataReader  read    Relational  databases contain tables that applications access data using SQL operations such as  INSERT  UPDATE  DELETE and SELECT  Table 5 1 describes the mapping between  DDS and relational database semantic models     5 1    Buiddpoy opoq pup  SYUDWSS TOS 1AI  S    Chapter 5                Table 5 1 DDS DBMS Semantic Models  Data Distribution  Service Relational Database Details  Accessed via DDS API Accessed via SQL    Various language bindings   e g  C C    Java     Various language bind   ings  e g  C C   and          Identified by a name  string    DDSDataWriter can pub   lish values for DDSTopics  and DDSDataReaders can  subscribe 
160. utomatically  replicated to tables on all of the other nodes  Figure 3 7 shows how RTI Real Time Con   nect can be used to perform lazy table replication between distributed databases     With lazy replication  an update is sent to the subscribers after the transaction is com   mitted into the local database  The advantages of lazy replication are short response  time and high concurrency  since locks in the data cache are immediately released after a  transaction commits and before it is sent on the network     Figure 3 7 Replicating Tables Across Databases       N SQL J N SQL J  PEEN T     4 B RTI Real Time Connect 4    RTI Real Time Connect  Relational Daemon Relation  Databas SQL SQL Database   J s X    i es  Table Tracks Table Passengers    Table  Tracks  Fit Lat  Long  Fit Name Add    Table Passengers  Fit Name Ad       C129 A  Johnson       C129 34 5 102   C054 27 7 46 8    y       C054 J  Smith         o y    C054 27 7 46 8 C054 J  Smith      2 y H V       Enterprise  lt fanannannnnnnnnnnnnnnnnnnnnnnnnnnnans Enterprise    By setting different QoSs for the DDS publications and subscriptions created by the RTI  Real Time Connect Daemon  features such as remote table initialization and application  timestamp based conflict resolution are enabled  RTI Real Time Connect provides an ini   tialization attribute that automatically sets the QoS values associated with database rep   lication     Even different DBMSs can be synchronized by the RTI Real Time Connect Daemon with  
161. values to use   The values defined in the meta table have precedence  over the values defined in the configuration file      Suffixes    Suffixes are also needed for column names when multiple IDL primitive types map into  the same SQL type  Because there are more IDL primitive types than SQL primitive  types  a full mapping will result in the use of the same SQL type to hold more than one  IDL type  For example  an IDL    long double    has no equivalent in SQL  Thus  an SQL  BINARY 16  does double duty and is used to store both an IDL    long double    as well as  an IDL    octet 16         If a    long double    could be treated the same as an    octet 16     by the RTI Real Time Con   nect Daemon  then there would be no issue and no special name mapping would be  needed  However  because the representation of a    long double    is Endianess depen     5 2 Data Representation Mapping       5 2 2    dent while an    octet 16     is not  the RTI Real Time Connect Daemon must use the column  name to decide whether or not an SQL BINARY 16  value needs to be byte swapped or  not when converting to an IDL data type  Since    long double    has no equivalent SQL  type  a     ld    must be appended to the name of an SQL BINARY 16  column that is used  to store one     Similarly  a suffix of     str    is used to indicate that an SQL VARCHAR x  stores IDL     string     which is a NULL terminated sequence of the primitive type    char     Without  the suffix in the column name  an 
162. ver requires an ODBC driver manager  In Windows  the ODBC  driver manager is automatically installed with the OS  For Solaris and Linux systems we  recommend the use of UnixODBC 2 2 12  or higher   a complete  free open ODBC solu   tion for Unix and Linux systems  The driver manager can be downloaded from http      www unixodbc org     Installing and Configuring the MySQL Server to Access  lib rtirti_mysqlq  so  dll     To work with a MySQL database  there is a shared library distributed with RTI Real Time  Connect that must be installed correctly on the host of the MySQL database server  Com   munication by the RTI Real Time Connect Daemon with the MySQL server is accom   plished through user defined functions  UDF  executed by the MySQL server when  triggers installed by the RTI Real Time Connect Daemon are fired  These functions are  provided in a shared library  on UNIX based systems  or DLL  on Windows systems   called  lib rtirtc_mysqlq  so  dIl      This library is distributed with RTI Real Time Connect and can be found in the lib  lt plat   form gt  directory of the installation directory  The correct version of the library to use  depends on the platform on which MySQL server is running  For example   lt platform gt   can be     LI x64Linux2 6cc4 1 1 for Red Hat Enterprise Linux 5 systems on 64 bit x86 processors  LI i86Linux2 6cc4 1 1 for Red Hat Enterprise Linux 5 systems on 32 bit x86 processors  L  i86Win32 for Windows systems on 32 bit x86 processors    To insta
163. ws in the same table of the database   supporting both real time and off line analysis based on historical data     LJ Configurable QoS    RTI Real Time Connect exposes many of the QoS attributes defined by the DDS  standard  This gives the user full control over the quality of service when captur   ing real time data or subscribing to changes in the database  Supported QoS  attributes include reliability  durability  multicasting  delivery ordering  and  many others     3 3    oInjoopyoiy  E    Chapter 3       3 2       Capturing Real Time Data in a DBMS    Figure 3 2 shows how RTI Real Time Connect can be used to capture real time data  streams generated by embedded DDS applications into one or more tables in a  in mem   ory  DBMS  In this scenario  the RTI Real Time Connect Daemon has been configured  with user customizable QoSs to subscribe to DDS topics  When new values arrive  the  daemon stores the data in the appropriate table in the database  The mapping of the  DDS topic described by IDL to the equivalent SQL table schema is done automatically  by the daemon with no user configuration necessary     Figure 3 2 Storing Published DDS Data in a SQL Database    3 4        DDS write              DDS write  gt  RT  Real Time Connect  gt     Daemon       Relational  Database    DDS take SQL  UPDATE INSERT  Table Tracks Table Passengers  Fit Lat  Long  Fit Name Addrs   DDS write C129 34 5 102 3 C129 A  Johnson        C054 27 7 46 8 C054 J  Smith               Embedded    Ent
164. x_instances INTEGER YES  Infinite Section 4 5 2 1 23  dr unicast receive_port INTEGER YES J0 Section 4 5 2 1 24  dr multicast_receive_address VARCHAR 15   YES  None Section 4 5 2 1 25  dr multicast receive_port INTEGER YES  0 Section 4 5 2 1 26  RTIRTC_SCN BIGINT YES Next SCN number Section 4 5 2 1 27          a  Primary key column     4 5 2 1 1 table_owner  table_name    These columns specify the user table into which data received by a DDSDataReader will  be stored  Because a DBMS uses a combination of  lt table_owner gt   lt table_name gt  to iden   tify a table  both of these columns must have valid values should the user want these  entries to refer to an existing table     If no table exists in the database with the identifier     lt table_owner gt   lt table_name gt     at  the time that the daemon sees this entry in the RTIDDS_SUBSCRIPTIONS meta table   it will create a user table with this name automatically  see User Table Creation  Section  4 6      Note  In MySQL  the value of the table_owner column corresponds to the table schema  or database name     4 58    4 5 Meta Tables       4 5 2 1 2    4 5 2 1 3    4 5 2 1 4    domain_id    This column specifies the DDS domain ID that will be used to subscribe to DDSTopics  whose values will be stored in the table  Before creating a DDSDataReader  if no DDS   DomainParticipant has previously been created with the DDS domain ID  the RTI Real   Time Connect Daemon will create a DDSDomainParticipant with the specified ID    
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Collegamento della stazione di base MicroBar 9745  VisualCAM 2006 User Guide - Photo Data & JD Photo  e Electro Industries/Gauge Tech Doc # E145703 V1.07 Q-1  Samsung NC221 Priručnik za korisnike  Asunto: Solicitud de apoyo para extensión de beca CONACYT de  ALCATEL Mobile Phones 906 User's Manual  Samsung GT-I9100G/C 用户手册(IceCream_QQ)  Mode d`emploi - Département de l`Isère  rackmount lcd console kvm switch user manual  Year One Phonics 170512    Copyright © All rights reserved. 
   Failed to retrieve file