[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A proposal for a General Clustering Framework



On Tue, 5 Jun 2001, Alan Robertson wrote:

>
> I am cool with this idea except for one thing:  XML-RPC retains the worst
> aspect of 'C' calling sequences - which is potentially deadly for an HA
> system - positional parameters.
>

???

<struct>
   <member>
      <name>lowerBound</name>
      <value><i4>18</i4></value>
      </member>
   </struct>

I can clearly see the <name> tage right there in the spec.

You just define your API like this: log_message( xmlrpc_struct );
In version 1, your struct looks like this:

<struct>
   <member>
      <name>format</name>
      <value><string>someformat</string></value>
      </member>
   <member>
	<name>args</name>
	<array> <data>
		<value> <string> "something to log" </string> </value>
		<value> <string> "something else" </string> </value>
	<data> </array>
   </member>
   </struct>


In version 2 of your log_message API, your struct now looks like this:
<struct>
   <member>
     <name>priority</name>
      <value><i4>someformat</i4></value>
      </member>
   </member>
   <member>
      <name>format</name>
      <value><string>someformat</string></value>
      </member>
   <member>
        <name>args</name>
        <array> <data>
                <value> <string> "something to log" </string> </value>
                <value> <string> "something else" </string> </value>
        <data> </array>
   </member>
   </struct>


As long as your code always access parameters in the struct by name, you
are fine.
--
Michael



> The usual problem with positional parameters is that they assume that
> everyone is compiled against the same version of the function definition.
> Within limits, this is fine for a single non-HA system.


Linux-cluster: generic cluster infrastructure for Linux
Archive:       http://mail.nl.linux.org/linux-cluster/