<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span class=value><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>I was recommended to look at the
Twisted application framework for replacing a legacy application that relies on
RPC portmapper, so here&#8217;s my issue and question&#8230;<o:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=value><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span class=value><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>Currently, we use
an in-house designed application called 'Fileman', which acts as a combined
bi-directional shared library (client) and server system to transfer data files
between other 'Fileman' server points. The problem is that the Fileman
application requires portmapper under Linux which exposes all TCP ports (i.e. a
network security nightmare). Fileman also has the ability to send data in
either ASCII or binary format and at receiver end -- change directories, modify
user id (uid) and group id (gid) of file once data is received.</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><br>
<br>
<span class=value>---</span><br>
<br>
<span class=value>Here is what Fileman can perform via following functions from
client side code:</span><br>
<br>
<span class=value>struct StatResult &nbsp; *pFileMan_FileStat(char *host, char
*file, int userid, int groupid);</span><br>
<span class=value>struct StatResult &nbsp; *pFileMan_GetDirectoryList<wbr>ing(char
*host, char *dir, int userid, int groupid, int *entries);</span><br>
<span class=value>int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
iFileMan_PutAsciiFile(char<wbr> *host, char *file, char *cpBuf, int bMakeDir,
int userid, int groupid);</span><br>
<span class=value>char &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;*cpFileMan_GetAsciiFile(ch<wbr>ar *host, char *file, int userid, int
groupid, int *result);</span><br>
<span class=value>int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
iFileMan_PutBinaryFile(cha<wbr>r *host, char *file, char *cpBuf, int bMakeDir,
int userid, int groupid, int length);</span><br>
<span class=value>char &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;*cpFileMan_GetBinaryFile(c<wbr>har *host, char *file, int userid, int
groupid, int *result, int *length);</span><br>
<span class=value>int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
iFileMan_DeleteFile(char *host, char *file, int userid, int groupid);</span><br>
<span class=value>int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
bFileMan_Ping(char *cpHost);</span><br>
<span class=value>void &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;vFileMan_ResetStats(void);<wbr></span><br>
<span class=value>int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
iFileMan_GetNumOps();</span><br>
<span class=value>double &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;dFileMan_GetSecsSpent();</span><br>
<span class=value>void &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;vFileMan_SetTimeout(int iSecs);</span><br>
<br>
<span class=value>Above functions translates to 'over the wire' execution of:</span><br>
<span class=value>stat</span><br>
<span class=value>opendir, readdir</span><br>
<span class=value>fopen, fwrite with any necessary mkdir, chown/chgrp to given
group</span><br>
<span class=value>fopen, read, subject to uid/gid restrictions</span><br>
<span class=value>fopen, fwrite with any necessary mkdir, chown/chgrp to given
group</span><br>
<span class=value>fopen, read, subject to uid/gid restrictions</span><br>
<span class=value>unlink subject to uid/gid restrictions</span><br>
<span class=value>noop response from server</span><br>
<span class=value>Internal stat change</span><br>
<span class=value>Internal stat info</span><br>
<span class=value>Internal stat info</span><br>
<span class=value>Set network timeout parameters for operation</span></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Usage/Syntax from &#8216;Fileman&#8217; client:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>void printUsage()<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>{<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot;Usage: \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot;&nbsp; \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman Get [remote_host]
[remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman GetAscii
[remote_host] [remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman GetBinary
[remote_host] [remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman Put [remote_host]
[remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman PutAscii
[remote_host] [remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman PutBinary
[remote_host] [remote_file] [remote_uid] [remote_gid] [local_file] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman Stat [remote_host]
[remote_file] [remote_uid] [remote_gid] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot; fileman <st1:place w:st="on">Ping</st1:place>
[remote_host] \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; printf(&quot;&nbsp; \n&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><br>
<span class=value>---</span><br>
<br>
<span class=value>My question is can the Twisted framework be utilized in a way
that can do actions of sending and receiving data in either ASCII or binary
format, change uid or gid permissions of files once delivered, run as a
client/server client &amp; listener and utilize one (or two) TCP ports for both
sending and listening upon?</span><br>
<br>
<span class=value>Known application replacement requirements:</span><br>
<span class=value>1) Application must be able to run upon RHEL/CentOS 5.x Linux
platform.</span><br>
<span class=value>2) Application must be able to be locked down to one or two
TCP ports for listening and sending data upon.</span><br>
<span class=value>3) Application must be able to take command line (CLI)
instructions</span><br>
<span class=value>4) Application must be able to transfer data in ASCII or
binary format (i.e. graphic images)</span><br>
<span class=value>5) Application must be able to [at receiver end]: change
directories, modify user id (uid) and group id (gid) of file once data is
received.</span><br>
<br>
<span class=value>Current solutions we are actively looking at now:</span><br>
<span class=value>&nbsp;-- Apache's WebDAV: Uses port 80; Needs apache instance
on each server; cannot change uid or gid permissions of files</span><br>
<span class=value>&nbsp;-- Apache's ActiveMQ: Uses channel/queue/broker system;
requires trigger queue and external program for dumping queue data; Needs Java
platform</span><br>
<span class=value>&nbsp;-- JBoss Messaging: Suffers same issues as Apache's
ActiveMQ; Requires costly licensing</span><br>
<span class=value>&nbsp;-- IBM Websphere MQ: Suffers same issues as Apache's
ActiveMQ; Requires costly licensing</span></span></font><span class=value><o:p></o:p></span></p>

<p class=MsoNormal><span class=value><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>&nbsp;-- XML-RPC Library for C &amp;
C++ -- <a href="http://xmlrpc-c.sourceforge.net/">http://xmlrpc-c.sourceforge.net/</a><o:p></o:p></span></font></span></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><br>
<span class=value>Anyone have any ideas or other plausible solutions for
solving this problem?</span></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>-- Michael<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>---<br>
Michael Worsham<br>
Sr. System Engineer, IT Architect<br>
Morris Technology Services, IHS Division<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>