|
@@ -92,15 +92,67 @@
|
|
|
requests and responses, and testing interfaces to allow developers to test
|
|
|
logic changes, data changes, or new features, as well as to interact with
|
|
|
the service directly using SOAP, XML, or JSON.</para>
|
|
|
+
|
|
|
+ <para></para>
|
|
|
</chapter>
|
|
|
|
|
|
<chapter id="DESDLWorkflowTutorial">
|
|
|
- <title>Workflow Tutorial</title>
|
|
|
+ <title>Dynamic ESDL Workflow Tutorial</title>
|
|
|
+
|
|
|
+ <sect1 id="DESDLBefore" role="nobrk">
|
|
|
+ <title>Before You Begin...</title>
|
|
|
+
|
|
|
+ <para>You will need:</para>
|
|
|
+
|
|
|
+ <itemizedlist>
|
|
|
+ <listitem>
|
|
|
+ <para>Access to an HPCC Cluster (version 6.4.2 or later) that you
|
|
|
+ can reconfigure using Configuration Manager. This can be one running
|
|
|
+ in a Virtual Machine.</para>
|
|
|
+
|
|
|
+ <para>You should have a basic understanding of Configuration Manager
|
|
|
+ and how to use it. You also need access to the server(s) with
|
|
|
+ sufficient rights to modify the environment.</para>
|
|
|
+ </listitem>
|
|
|
+ </itemizedlist>
|
|
|
+
|
|
|
+ <itemizedlist>
|
|
|
+ <listitem>
|
|
|
+ <para>Access to ECL Watch and WsECL (using a browser).</para>
|
|
|
+
|
|
|
+ <para>For purposes of this tutorial, we assume that you know how to
|
|
|
+ submit a published using WsECL.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>The ECL IDE (version 6.4.2 or later)</para>
|
|
|
+
|
|
|
+ <para>You won't need to know the ECL or ESDL languages to follow the
|
|
|
+ steps in this book, but you will need to understand both to develop
|
|
|
+ dESDL-based applications.</para>
|
|
|
+
|
|
|
+ <para>For purposes of this tutorial, you should know the basics of
|
|
|
+ using the ECL IDE including how to add files to your repository, how
|
|
|
+ to compile ECL Code, and how to publish a compiled query.</para>
|
|
|
+ </listitem>
|
|
|
+ </itemizedlist>
|
|
|
|
|
|
- <sect1 id="DESDLWorkflowOverview" role="nobrk">
|
|
|
+ <para><emphasis role="bold">dESDL and LDAP Security</emphasis></para>
|
|
|
+
|
|
|
+ <para>If your HPCC platform is configured to use LDAP security, you must
|
|
|
+ ensure any user who will be publishing ESDL Definitions has Access to
|
|
|
+ <emphasis role="bold">ESDL configuration service</emphasis> set to
|
|
|
+ <emphasis role="bold">Allow Full</emphasis>, as shown below.</para>
|
|
|
+
|
|
|
+ <para><graphic fileref="images/desdl-LDAP.jpg" /></para>
|
|
|
+
|
|
|
+ <para></para>
|
|
|
+ </sect1>
|
|
|
+
|
|
|
+ <sect1 id="DESDLWorkflowOverview">
|
|
|
<title>Overview</title>
|
|
|
|
|
|
- <para>In this section, we will:</para>
|
|
|
+ <para>In this tutorial, we will:</para>
|
|
|
|
|
|
<para></para>
|
|
|
|
|
@@ -113,68 +165,61 @@
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Write an ESDL Service Definition.</para>
|
|
|
+ <para>Write an ESDL Service Definition using the editor in the ECL
|
|
|
+ IDE.</para>
|
|
|
|
|
|
<para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Generate ECL from the ESDL Service Definition, copy it to your
|
|
|
- ECL repository, and the write the ECL query that will deliver the
|
|
|
- result (the business logic).</para>
|
|
|
+ <para>Generate ECL from the ESDL Service Definition within the ECL
|
|
|
+ IDE.</para>
|
|
|
|
|
|
- <para></para>
|
|
|
+ <para>This step automatically generates an ECL file in your ECL
|
|
|
+ repository. You will use the definitions in that ECL file when you
|
|
|
+ write the ECL query that will deliver the result (the business
|
|
|
+ logic).</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Compile the ECL business logic query and publish it to a Roxie
|
|
|
- cluster.</para>
|
|
|
-
|
|
|
- <para>At this point you can test the query using WsECL.</para>
|
|
|
+ <para>Write the ECL for the business logic of the query, compile it,
|
|
|
+ and then publish the query to a Roxie cluster.</para>
|
|
|
|
|
|
<para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Publish the Dynamic ESDL definition.</para>
|
|
|
+ <para>Publish the Dynamic ESDL definition from the ECL IDE.</para>
|
|
|
|
|
|
<para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Bind the service methods to the Roxie queries using a
|
|
|
- configuration XML file.</para>
|
|
|
+ <para>Bind the service methods to the Roxie queries in ECLWatch
|
|
|
+ using an XML formatted configuration.</para>
|
|
|
|
|
|
<para></para>
|
|
|
</listitem>
|
|
|
</itemizedlist>
|
|
|
|
|
|
- <para><emphasis role="bold">DESDL and LDAP Security</emphasis></para>
|
|
|
-
|
|
|
- <para>If your HPCC platform is configured to use LDAP security, you must
|
|
|
- ensure any user who will be publishing ESDL Definitions has Access to
|
|
|
- <emphasis role="bold">ESDL configuration service</emphasis> set to
|
|
|
- <emphasis role="bold">Allow Full</emphasis>, as shown below.</para>
|
|
|
-
|
|
|
- <para><graphic fileref="images/desdl-LDAP.jpg" /></para>
|
|
|
-
|
|
|
- <para></para>
|
|
|
-
|
|
|
<para></para>
|
|
|
</sect1>
|
|
|
|
|
|
<sect1 id="DESDLConfigureAndBind">
|
|
|
- <title>Configure and Bind a Dynamic ESDL service</title>
|
|
|
+ <title>Configure and Bind the dESDL Service</title>
|
|
|
|
|
|
- <para>This step adds an ESP service and a service binding that reserves
|
|
|
- a port for the dynamic ESDL service. This step is independent of the
|
|
|
- development and publishing of the actual Roxie query, so you can set it
|
|
|
- up before or after your query is ready.</para>
|
|
|
+ <para>In this portion of the tutorial, we will add an ESP service and a
|
|
|
+ service binding that reserves a port for the dynamic ESDL
|
|
|
+ service.</para>
|
|
|
+
|
|
|
+ <para>This step is independent of the development and publishing of the
|
|
|
+ actual Roxie query, so you can set it up before or after your query is
|
|
|
+ ready.</para>
|
|
|
|
|
|
<orderedlist>
|
|
|
<listitem>
|
|
|
- <para>If it is running, stop the HPCC system, using this
|
|
|
- command:</para>
|
|
|
+ <para>If it is running, stop the HPCC system, using this command in
|
|
|
+ a terminal window:</para>
|
|
|
|
|
|
<programlisting>sudo /etc/init.d/hpcc-init stop</programlisting>
|
|
|
|
|
@@ -229,9 +274,17 @@
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
+ <para>Check the <emphasis role="bold">Write Access</emphasis> box at
|
|
|
+ the top of the page.</para>
|
|
|
+
|
|
|
+ <para>Default access is read-only. Many options are only available
|
|
|
+ when write-access is enabled.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
<para>Right-click on <emphasis role="bold">Esp Services</emphasis>
|
|
|
- and select <emphasis role="bold">New Esp Services</emphasis> >
|
|
|
- <emphasis role="bold">Dynamic ESDL</emphasis>.</para>
|
|
|
+ and select <emphasis role="bold">Dynamic ESDL</emphasis> from
|
|
|
+ <emphasis role="bold">New Esp Services.</emphasis></para>
|
|
|
|
|
|
<para><graphic fileref="images/desdl-addDESDL.jpg" /></para>
|
|
|
</listitem>
|
|
@@ -239,7 +292,8 @@
|
|
|
<listitem>
|
|
|
<?dbfo keep-together="always"?>
|
|
|
|
|
|
- <para>Provide a name for the service.</para>
|
|
|
+ <para>Change the name for the service. For this tutorial, let's name
|
|
|
+ it <emphasis role="bold">MathService</emphasis>.</para>
|
|
|
|
|
|
<para><graphic fileref="images/dsdl-NametheService.jpg" /></para>
|
|
|
</listitem>
|
|
@@ -247,8 +301,8 @@
|
|
|
<listitem>
|
|
|
<?dbfo keep-together="always"?>
|
|
|
|
|
|
- <para>Select your ESP , then select the ESP Service Bindings
|
|
|
- tab.</para>
|
|
|
+ <para>Select your ESP, then select the <emphasis role="bold">ESP
|
|
|
+ Service Bindings</emphasis> tab.</para>
|
|
|
|
|
|
<para><graphic fileref="images/desdl-ESPSVCBinding.jpg" /></para>
|
|
|
</listitem>
|
|
@@ -263,14 +317,32 @@
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Provide a name, port, and then select the service. The service
|
|
|
- definition you added will display in the list of available
|
|
|
- services.</para>
|
|
|
+ <para>Provide a name, port, and then select the service from the
|
|
|
+ drop list.</para>
|
|
|
+
|
|
|
+ <para>For this tutorial, name it <emphasis
|
|
|
+ role="bold">MathService</emphasis>, set the port to <emphasis
|
|
|
+ role="bold">8003</emphasis>, and select <emphasis
|
|
|
+ role="bold">MathService</emphasis> from the service drop list. This
|
|
|
+ is service definition you added in an earlier step.</para>
|
|
|
|
|
|
<para><graphic fileref="images/desdl-NameSVCBinding.jpg" /></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
+ <para>Press the Save As button and name your new XML file <emphasis
|
|
|
+ role="bold">NewEnvironment</emphasis>.</para>
|
|
|
+
|
|
|
+ <para><graphic fileref="images/desdl-configSaveAs.jpg" /></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Return to the terminal window and press <emphasis
|
|
|
+ role="bold">ctrl+c</emphasis> to close the Configuration
|
|
|
+ Manager.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
<para>Copy the NewEnvironment.xml file from the source directory to
|
|
|
the /etc/HPCCSystems and rename the file to environment.xml</para>
|
|
|
|
|
@@ -307,12 +379,7 @@ sudo cp /etc/HPCCSystems/source/NewEnvironment.xml /etc/HPCCSystems/environment.
|
|
|
role="bold">/etc/HPCCSystems/</emphasis> on <emphasis
|
|
|
role="bold">every</emphasis> node.</para>
|
|
|
|
|
|
- <para>You may want to create a script to push out the XML file to
|
|
|
- all nodes. A sample script is provided with HPCC. The following
|
|
|
- command copies the XML files out to all nodes as required:</para>
|
|
|
-
|
|
|
- <para><programlisting>sudo /opt/HPCCSystems/sbin/hpcc-push.sh -s <sourcefile> -t <destinationfile>
|
|
|
-</programlisting></para>
|
|
|
+ <programlisting>sudo /opt/HPCCSystems/sbin/hpcc-push.sh -s <sourcefile> -t <destinationfile></programlisting>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
@@ -356,13 +423,112 @@ sudo cp /etc/HPCCSystems/source/NewEnvironment.xml /etc/HPCCSystems/environment.
|
|
|
<sect1 id="DESDLWriteDef">
|
|
|
<title>Write the ESDL Service Definition</title>
|
|
|
|
|
|
- <para>In this section, we will write a the Service Definitions. The
|
|
|
- program listing below shows a service called
|
|
|
- <emphasis>MathService</emphasis>. It contains one method,
|
|
|
- <emphasis>AddThis</emphasis>, with a simple request and a simple
|
|
|
- response defined.</para>
|
|
|
+ <para>In this portion of the tutorial, we will write the Service
|
|
|
+ Definitions in the ECL IDE. The program listing below shows an ESDL
|
|
|
+ service called <emphasis>MathService</emphasis>. It contains one method,
|
|
|
+ <emphasis>AddThis</emphasis>, with a request and a response
|
|
|
+ defined.</para>
|
|
|
+
|
|
|
+ <orderedlist>
|
|
|
+ <listitem>
|
|
|
+ <para>Start the ECL IDE (Start >> All Programs >> HPCC
|
|
|
+ Systems >> ECL IDE )</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Log in to your environment</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <?dbfo keep-together="always"?>
|
|
|
+
|
|
|
+ <para>Right-click on the <emphasis role="bold">My Files</emphasis>
|
|
|
+ folder in the Repository window, and select <emphasis
|
|
|
+ role="bold">Insert Folder</emphasis> from the pop-up menu.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Insert Folder</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-insertFolder.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+
|
|
|
+ <para>For purposes of this tutorial, let’s create a folder called
|
|
|
+ <emphasis role="bold">MathService</emphasis>.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <?dbfo keep-together="always"?>
|
|
|
+
|
|
|
+ <para>Enter <emphasis role="bold">MathService</emphasis> for the
|
|
|
+ label, then press the <emphasis role="bold">OK</emphasis>
|
|
|
+ button.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Enter Folder Label</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-insertFolder2.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Right-click on the <emphasis role="bold">MathService
|
|
|
+ </emphasis>folder, and select <emphasis role="bold">Insert
|
|
|
+ File</emphasis> from the pop-up menu.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <?dbfo keep-together="always"?>
|
|
|
+
|
|
|
+ <para>Enter <emphasis role="bold">MathService</emphasis> for the
|
|
|
+ label, select <emphasis>ESDL</emphasis> as the <emphasis
|
|
|
+ role="bold">Type</emphasis>, then press the <emphasis
|
|
|
+ role="bold">OK</emphasis> button.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Insert File</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-insertFile.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+
|
|
|
+ <para>An Editor Window opens.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>ESDL file</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-newDESDL.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+
|
|
|
+ <para>Notice that some text has been written for you in the
|
|
|
+ window.</para>
|
|
|
+
|
|
|
+ <para></para>
|
|
|
+ </listitem>
|
|
|
+ </orderedlist>
|
|
|
+
|
|
|
+ <?hard-pagebreak ?>
|
|
|
+
|
|
|
+ <orderedlist continuation="continues">
|
|
|
+ <listitem>
|
|
|
+ <para><?dbfo keep-together="always"?>Write the following code,
|
|
|
+ replacing what was written, in the editor workspace :</para>
|
|
|
|
|
|
- <programlisting>ESPservice MathService
|
|
|
+ <para><programlisting>ESPservice [auth_feature("None")] MathService
|
|
|
{
|
|
|
ESPmethod AddThis(AddThisRequest, AddThisResponse);
|
|
|
};
|
|
@@ -377,39 +543,51 @@ ESPresponse AddThisResponse
|
|
|
{
|
|
|
int Answer;
|
|
|
};
|
|
|
+</programlisting> <figure>
|
|
|
+ <title>ESDL Code in Editor Window</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-codeInEditor.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+ </listitem>
|
|
|
|
|
|
-</programlisting>
|
|
|
-
|
|
|
- <orderedlist>
|
|
|
<listitem>
|
|
|
- <para>Save the file as MathService.ecm.</para>
|
|
|
-
|
|
|
- <para></para>
|
|
|
+ <para><?dbfo keep-together="always"?>Save the file using <emphasis
|
|
|
+ role="bold">ctrl+s</emphasis> or the <emphasis role="bold">File
|
|
|
+ >> Save</emphasis> menu option.</para>
|
|
|
+
|
|
|
+ <para>Notice that a new ECL file is now in the repository folder.
|
|
|
+ Saving the ESDL file automatically generated a file named
|
|
|
+ <emphasis>MathService.ecl</emphasis> in the current directory. You
|
|
|
+ could generate this ECl using the dropdown button and selecting
|
|
|
+ <emphasis role="bold">Generate ECL</emphasis>.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Saving an ESDL file generates ECL</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-saveESDLFile.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+
|
|
|
+ <para>This provides the ECL Structures you will IMPORT and use in
|
|
|
+ the ECL code you write to support the service method.</para>
|
|
|
</listitem>
|
|
|
</orderedlist>
|
|
|
</sect1>
|
|
|
|
|
|
- <sect1 id="DESDLGenerateDefs">
|
|
|
- <title>Generate ECL definitions from the ESDL Service Definition</title>
|
|
|
-
|
|
|
- <para>In this section, we will generate ECL from this ESDL Service
|
|
|
- Definition file. This will use the esdl executable that is installed
|
|
|
- with Client Tools.</para>
|
|
|
-
|
|
|
- <para>You will find this in C:\Program Files
|
|
|
- (x86)\HPCCSystems\5.2.0\clienttools\bin on a Windows machine</para>
|
|
|
-
|
|
|
- <para>or /opt/HPCCSystems/bin/ on a Linux machine.</para>
|
|
|
-
|
|
|
- <para><orderedlist>
|
|
|
- <listitem>
|
|
|
- <para>From the command line, run:</para>
|
|
|
+ <sect1>
|
|
|
+ <title>Writing the ECL</title>
|
|
|
|
|
|
- <para><programlisting>esdl ecl MathService.ecm .</programlisting>This
|
|
|
- produces a file named MathService.ecl in the current
|
|
|
- directory</para>
|
|
|
+ <para>First, let's examine the generated ECL code in
|
|
|
+ MathService.ecl.</para>
|
|
|
|
|
|
- <programlisting><emphasis role="green">/*** Not to be hand edited (changes will be lost on re-generation) ***/
|
|
|
+ <programlisting><emphasis role="green">/*** Not to be hand edited (changes will be lost on re-generation) ***/
|
|
|
/*** ECL Interface generated by esdl2ecl version 1.0 from MathService.xml. ***/
|
|
|
/*===================================================*/</emphasis>
|
|
|
|
|
@@ -430,32 +608,118 @@ end;
|
|
|
/*===================================================*/</emphasis>
|
|
|
</programlisting>
|
|
|
|
|
|
- <para></para>
|
|
|
+ <para>Notice it created a file named MathService.ecl which has defined a
|
|
|
+ MODULE named MathService. Remember in ECL, the name of the file
|
|
|
+ (MathService) <emphasis>must always exactly match</emphasis> the name of
|
|
|
+ the single EXPORT definition (MathService) contained in that
|
|
|
+ file.</para>
|
|
|
+
|
|
|
+ <para>Next, we will write the ECL code to support the functionality of
|
|
|
+ the AddThis method. We will IMPORT the MathService module and reference
|
|
|
+ the request and response structures.</para>
|
|
|
+
|
|
|
+ <para><orderedlist>
|
|
|
+ <listitem>
|
|
|
+ <para>Right-click on the <emphasis role="bold">MathService
|
|
|
+ </emphasis>Folder, and select <emphasis role="bold">Insert
|
|
|
+ File</emphasis> from the pop-up menu.</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Copy the MathService.ecl file to a module in your ECL
|
|
|
- Repository. For example, myMathService.</para>
|
|
|
+ <para>Enter <emphasis role="bold">AddThis</emphasis> for the
|
|
|
+ label, select <emphasis>ECL</emphasis> as the <emphasis
|
|
|
+ role="bold">Type</emphasis>, then press the <emphasis
|
|
|
+ role="bold">OK</emphasis> button.</para>
|
|
|
+
|
|
|
+ <para>An Editor Window opens.</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
<para>Write ECL to support the service:</para>
|
|
|
|
|
|
- <programlisting>IMPORT MyMathService;
|
|
|
-rec_in := MyMathService.MathService.t_AddThisRequest;
|
|
|
+ <programlisting>IMPORT MathService;
|
|
|
+rec_in := MathService.MathService.t_AddThisRequest;
|
|
|
|
|
|
First_Row := ROW ([], rec_in) : STORED ('AddThisRequest', FEW);
|
|
|
-c:= first_row.FirstNumber + first_row.SecondNumber;
|
|
|
-ds_out := ROW ({c},MyMathService.MathService.t_AddThisResponse);
|
|
|
+
|
|
|
+res:= first_row.FirstNumber + first_row.SecondNumber;
|
|
|
+ds_out := ROW ({res},MathService.MathService.t_AddThisResponse);
|
|
|
OUTPUT(ds_out, NAMED('AddThisResponse')); </programlisting>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Compile and Publish to your Roxie cluster.</para>
|
|
|
+ <para><?dbfo keep-together="always"?>Using the <emphasis
|
|
|
+ role="bold">Target</emphasis> drop list, select
|
|
|
+ <emphasis>Roxie</emphasis> as the Target cluster.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Target Roxie</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-targetRoxie.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>In the Builder window, in the upper left corner the
|
|
|
+ <emphasis role="bold">Submit</emphasis> button has a drop down
|
|
|
+ arrow next to it. Select the arrow, then select <emphasis
|
|
|
+ role="bold">Compile</emphasis>.</para>
|
|
|
+
|
|
|
+ <figure>
|
|
|
+ <title>Compile</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-compileService.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para><?dbfo keep-together="always"?>When the workunit finishes,
|
|
|
+ it will display a green circle indicating it has compiled.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Compiled</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-compiled.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Select the workunit tab for the AddThis workunit that you
|
|
|
+ just compiled.</para>
|
|
|
+
|
|
|
+ <para>This opens the workunit in an ECL Watch tab.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Press the <emphasis role="bold">Publish</emphasis> action
|
|
|
+ button, then verify the information in the dialog and press
|
|
|
+ <emphasis role="bold">Submit</emphasis>.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Publish Query</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-publishQuery.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure>This publishes the AddThis query to the Roxie.</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Test the service using WsECL :<programlisting>http://<<emphasis>node ip </emphasis>>:8002 </programlisting></para>
|
|
|
+ <para>Test the service using WsECL :<programlisting>http://<<emphasis>esp ip </emphasis>>:8002 </programlisting></para>
|
|
|
</listitem>
|
|
|
</orderedlist></para>
|
|
|
</sect1>
|
|
@@ -464,70 +728,116 @@ OUTPUT(ds_out, NAMED('AddThisResponse')); </programlisting>
|
|
|
<title>Publish the ESDL Service Definitions and Bind the ESDL
|
|
|
Service</title>
|
|
|
|
|
|
- <para>In this section, we will publish the ESDL Service definitions to
|
|
|
- the System Data Store and bind the methods to he published Roxie
|
|
|
- query.</para>
|
|
|
+ <para>In this portion of the tutorial, we will publish the ESDL Service
|
|
|
+ definitions to the System Data Store and bind the methods to the
|
|
|
+ published Roxie query.</para>
|
|
|
|
|
|
<para><orderedlist>
|
|
|
<listitem>
|
|
|
- <para>Publish the Dynamic ESDL definition</para>
|
|
|
+ <para>Open the Dynamic ESDL definition file (MathService.esdl) in
|
|
|
+ the ECL IDE.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Press the <emphasis role="bold">Publish</emphasis>
|
|
|
+ button.</para>
|
|
|
|
|
|
- <programlisting>esdl publish MathService MathService.ecm -s nnn.nnn.nnn.nnn -p 8010 --version 1</programlisting>
|
|
|
+ <para>This publishes the ESDL Service definition to the ESP
|
|
|
+ Server. Next we will bind the <emphasis>AddThis</emphasis> method
|
|
|
+ to the <emphasis>AddThis</emphasis> published query.</para>
|
|
|
|
|
|
- <para>Replace nnn.nnn.nnn.nnn with your ECL Watch ESP server's IP
|
|
|
- address.</para>
|
|
|
+ <para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Create the configuration XML file</para>
|
|
|
-
|
|
|
- <programlisting><Methods>
|
|
|
- <Method name="AddThis" url="<RoxieIPRange>:9876" querytype="roxie" queryname="AddThis">
|
|
|
- <!--Optional Method Context Information start-->
|
|
|
- <Gateways>
|
|
|
- <Gateway name="mygateway" url="1.1.1.1:2222/someservice/somemethod/>
|
|
|
- <Gateway name="anothergateway" url="2.2.2.2:9999/someservice/somemethod/>
|
|
|
- </Gateways>
|
|
|
- <!--Optional Method Context Information end-->
|
|
|
- </Method>
|
|
|
-</Methods></programlisting>
|
|
|
-
|
|
|
- <para>Where name is the name of your method(s) and url is the
|
|
|
- Roxie server's IP address and port, finally queryname is the
|
|
|
- published name (alias) of the query. For a multi-node Roxie, you
|
|
|
- can use a range in the form of nnn.nnn.nnn.n-nnn. The ESP
|
|
|
- schedules requests to the target Roxie in a round-robin
|
|
|
- fashion.</para>
|
|
|
-
|
|
|
- <para>Optionally, your method could include context information as
|
|
|
- illustrated in the above example. The context information should
|
|
|
- be formated such that it is consumable by the target ECL query.
|
|
|
- The HPCC DESDL ESP does not impose any restrictions on the context
|
|
|
- information passed in the configuration file other than it must be
|
|
|
- valid XML.</para>
|
|
|
-
|
|
|
- <!-- /* Refer to DESDL XML Configurations? */ Ex. For more information on XXXX see XXXX.-->
|
|
|
+ <para>Open ECL Watch in your browser (<your ESP
|
|
|
+ ip>:8010)</para>
|
|
|
+
|
|
|
+ <para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Save the file as MathSvcCfg.xml</para>
|
|
|
+ <para>Select the Operations tab, then select <emphasis
|
|
|
+ role="bold">Dynamic ESDL</emphasis>.</para>
|
|
|
+
|
|
|
+ <para><figure>
|
|
|
+ <title>Dynamic ESDL in ECLWatch</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-ECLWatch1.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Bind the service methods to the queries using a the
|
|
|
- configuration XML.</para>
|
|
|
+ <para><?dbfo keep-together="always"?>Select the <emphasis
|
|
|
+ role="bold">Dynamic ESDL</emphasis> Tab, then expand
|
|
|
+ <emphasis>myesp</emphasis> by clicking on the triangle next to
|
|
|
+ it.</para>
|
|
|
|
|
|
- <programlisting>esdl bind-service myesp 8003 MathService.1 MathService --config MathSvcCfg.xml
|
|
|
- -s nnn.nnn.nnn.nnn -p 8010
|
|
|
-</programlisting>
|
|
|
+ <figure>
|
|
|
+ <title>Add Binding</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-addBinding.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure>
|
|
|
|
|
|
- <para>Where myesp is the name of your ESP process, 8003 is the
|
|
|
- port you reserved for your Dynamic ESDL service.</para>
|
|
|
+ <para></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Press the <emphasis role="bold">Add Binding</emphasis>
|
|
|
+ button, then select <emphasis>MathService.1</emphasis> from the
|
|
|
+ drop list and press the <emphasis role="bold">Apply</emphasis>
|
|
|
+ button.</para>
|
|
|
+
|
|
|
+ <para></para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Select the <emphasis role="bold">Binding</emphasis> tab,
|
|
|
+ then expand <emphasis>AddThis</emphasis> by clicking on the
|
|
|
+ triangle next to it.</para>
|
|
|
|
|
|
<para></para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
+ <para>Provide the Method Configuration (in XML format) in the text
|
|
|
+ box.</para>
|
|
|
+
|
|
|
+ <para><emphasis role="bold">Note: You must replace
|
|
|
+ <RoxieIPRange> with the IP Range of your Roxie
|
|
|
+ servers.</emphasis></para>
|
|
|
+
|
|
|
+ <programlisting><Method name="AddThis"
|
|
|
+ queryname="AddThis"
|
|
|
+ querytype="roxie"
|
|
|
+ url="http://<emphasis role="bold"><RoxieIPRange></emphasis>:9876"/>
|
|
|
+</programlisting>
|
|
|
+
|
|
|
+ <figure>
|
|
|
+ <title>Method Configuration</title>
|
|
|
+
|
|
|
+ <mediaobject>
|
|
|
+ <imageobject>
|
|
|
+ <imagedata fileref="images/desdl-methodConfiguration.jpg" />
|
|
|
+ </imageobject>
|
|
|
+ </mediaobject>
|
|
|
+ </figure>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
+ <para>Press the <emphasis role="bold">Save</emphasis>
|
|
|
+ button.</para>
|
|
|
+ </listitem>
|
|
|
+
|
|
|
+ <listitem>
|
|
|
<para>Test the service using the new interface:<programlisting>http://<<emphasis>node ip </emphasis>>:8003</programlisting></para>
|
|
|
</listitem>
|
|
|
</orderedlist></para>
|