buildframework/helium/doc/src/manual/messaging.rst
author srilekhas
Mon, 11 Oct 2010 11:16:47 +0100
changeset 646 a010554f8551
parent 628 7c4a911dc066
permissions -rw-r--r--
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     1
Messaging
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     2
=========
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     3
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     4
Currently the communication to external services (diamonds, ats, internal logging framework)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     5
are done within helium as REST / SOAP client, which is not scalable and had limitations
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     6
and lot of overheads in terms communication with those external services.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     7
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     8
 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     9
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    10
Overview
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    11
--------
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    12
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    13
The messaging framework is aimed to address this issue by defining
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    14
the input using which the data is exchanged to the external system. Currently the
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    15
main focus is to define the input format for the messaging framework and to work with
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    16
existing framework. In the future directly interact with the messaging system to exchange
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    17
data to the external system.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    18
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    19
Currently there are three types of messages could be defined, which works with
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    20
existing system to send data to diamonds.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    21
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    22
Text Message
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    23
~~~~~~~~~~~~
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    24
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    25
Any text message to be sent to the diamonds could be possible with the message type
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    26
definition. Example to use it as below,
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    27
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    28
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    29
.. code-block:: xml
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    30
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    31
      <hlm:textMessage id="initial-message" text="<diamonds-build>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    32
    <schema>21</schema><build>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    33
    <category>ido_BtDo_tb101-release_btservices_sbs-ec</category>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    34
    <name>IDO_BtDo_tb101-release_btservices_10.1.69</name>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    35
    <started>2010-08-04T13:23:54</started></build></diamonds-build>" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    36
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    37
File Message
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    38
~~~~~~~~~~~~
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    39
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    40
Any file which needs to be sent using messaging framework could be defined 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    41
using file message. Example to use it as below,
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    42
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    43
.. code-block:: xml
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    44
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    45
      <hlm:fileMessage id="initial-message" file="${build.output.dir}/initial-message.xml" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    46
      
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    47
Here the the attribute value for file attribute pointing to the file to be sent is forwarded
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    48
to the destination.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    49
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    50
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    51
FMPP Message
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    52
~~~~~~~~~~~~
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    53
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    54
Any message generated by processing the fmpp template data could be defined using
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    55
the fmpp message. Example is,
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    56
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    57
.. code-block:: xml
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    58
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    59
      <hlm:fmppMessage target="diamonds" sourceFile="tool.xml.ftl"&gt;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    60
          <data expandProperties="yes"&gt;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    61
          ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    62
          </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    63
      </hlm:fmppMessage>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    64
      
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    65
The above definition format is similar to fmpp conversion task, except that it has
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    66
limitation to convert one file using the template. Before sending data, the input template
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    67
is converted and an internal file message is created with the converted file path and 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    68
sent to the diamonds.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    69
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    70
TargetMessage Trigger
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    71
~~~~~~~~~~~~~~~~~~~~~
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    72
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    73
TargetMessageTrigger type maps a message to a particular target and could be used to
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    74
send the input message for the target execution. Example is as below,
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    75
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    76
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    77
.. code-block:: xml
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    78
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    79
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    80
        <hlm:targetMessageTrigger id="codescanner.id" target="ido-codescanner">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    81
            <hlm:fmppMessage sourceFile="${helium.dir}/tools/common/templates/diamonds/codescanner.xml.ftl">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    82
                <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    83
                    ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    84
                    doc: xml(${ido.codescanner.output.dir}/problemIndex.xml)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    85
                </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    86
            </hlm:fmppMessage>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    87
        </hlm:targetMessageTrigger>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    88
 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    89
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    90
In the above example, the target ido-codescanner contains an fmpp message. When
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    91
the target executes the target ido-codescanner at the end of execution which converts
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    92
the input file using template and the output file is sent to diamonds.