<div dir="auto"><div>Hi Bill,<div dir="auto"><br></div><div dir="auto">Flask supports Python 3.5+, and I've used it across all of those versions up to and including 3.8 with no problem.</div><div dir="auto"><br></div><div dir="auto">If we can, I'd love to be exclusive to Python 3 as, like you mentioned, Python 2 is going to be unsupported in less than a month anyway.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Evan</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019, 1:39 PM Engelke, Bill <<a href="mailto:bill.engelke@ua.edu">bill.engelke@ua.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_9068647052141048142WordSection1">
<p class="MsoNormal">Hello Dave & Evan –<u></u><u></u></p>
<p class="MsoNormal">Let’s gravitate toward Python then.  The framework that Evan mentioned (Flask) does seem to be of a lightweight variety, and should allow us to implement all the screens we need for controlling the TangerineSDR.  (I have attached the latest
 version of the Detailed Design for what is planned to run in the SBC for review and comment.  My idea is to implement all the web screens in the spec using whatever framework we pick).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">One question, to try and avoid “interdependency hell” – the latest GNUradio runs well with Python V3.6.9. (I’m hoping we can avoid using Python2, as I have seen a continuous feed of warnings that support is phasing out).   I hope that Flask
 plays nice with Python3 (??)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">All feedback is most welcome… 73- Bill AB4EJ<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> David Witten <<a href="mailto:wittend@wwrinc.com" target="_blank" rel="noreferrer">wittend@wwrinc.com</a>> <br>
<b>Sent:</b> Tuesday, December 3, 2019 12:17 PM<br>
<b>To:</b> Engelke, Bill <<a href="mailto:bill.engelke@ua.edu" target="_blank" rel="noreferrer">bill.engelke@ua.edu</a>>; Evan <<a href="mailto:em328@njit.edu" target="_blank" rel="noreferrer">em328@njit.edu</a>>; <a href="mailto:tangerinesdr@lists.tapr.org" target="_blank" rel="noreferrer">tangerinesdr@lists.tapr.org</a><br>
<b>Subject:</b> Re: [TangerineSDR] Webserver for local host<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">The power of the board is not really the issue for me.  <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">There are SO many options!<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">I dislike Tomcat and Java-based solutions for many reasons.  I have seen many supposedly 'Open' projects fail  or just limp along due to poor choice of implementation language. Much of the good SDR software
 available is crippled by dependence on non-portable code and dependence on proprietary environments such as whatever Microsoft calls
<a href="http://dot.net" target="_blank" rel="noreferrer">dot.net</a> this week.  Java is a similar island in a world of alternatives.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">You can't keep everyone happy, but the single-board world seems heavily oriented towards Python these days.  <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">The services need to be coded completely in an Open Source environment that is being taught to end users.  There is no need to squander CPU resources and no reason to alienate future maintainers.  You can
 probably write a five line web server in COBOL these days.  But who wants to? How do you keep it standards-compliant and secure?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">I have a long list of personal likes and dislikes of course.  I'm cranky and old.  But some combinations (language + open libraries + user familiarity) stand out:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">#1 Python - provides: portability, libraries to talk to hardware, extremely large user base and battle hardened framework support.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">#2 node.js - advantages similar to Python, simpler interaction with client-side code (javascript both ends) and efficient low level services.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">#3 go / golang - similar to the above, more rigorous language implementation, designed for this type of work, but less well known.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">#4 lightweight Web servers such as civetweb (one of many)  One example: <a href="https://github.com/civetweb/civetweb" target="_blank" rel="noreferrer"><span style="font-size:12.0pt">https://github.com/civetweb/civetweb</span></a> - many
 features, lightweight.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">#5 full blown standard web servers:
<a href="https://www.nginx.com/resources/wiki/" target="_blank" rel="noreferrer">Nginx</a>, <a href="https://www.apachelounge.com/" target="_blank" rel="noreferrer">
Apache</a> + really almost any backend (except Java) - overkill, but extremely well supported, available in any distro, intense security maintenance.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">I do not see much need for complication with more than very lightweight 'frameworks'.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">I would propose an architecture where the localhost runs a simple web service loop.  This loop would be launched at boot and principally serve  two pages - one page that just provides status information without
 authentication.  The other would be a page requiring login by the owner/controller of the localhost that allows control of services and presentation of data to the owner/controller of the device.  All data would be served over secure, certificated connections. 
 All interaction would be through small, purpose-built service handlers that autostart but allow management through the owner/controller's page.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">In many cases, such as the transfer of bulk data to the central repository, connections would be best handled using Web Sockets or some similar mechanism directly by the service process with only lightweight
 progress reporting directed through the Web interface.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">These are just my thoughts right now, I'm sure that I can come up with more opinions if anyone wants to hear them.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Dave Witten, KD0EAG<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Dec 3, 2019 at 11:10 AM Engelke, Bill <<a href="mailto:bill.engelke@ua.edu" target="_blank" rel="noreferrer">bill.engelke@ua.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Dave – well, my testing has shown the Odroid to have the processing capability of a typical modern desktop (as opposed to a typical SBC like the Raspberry). Be that as it may, could
 you make a suggestion or two on what to use instead?   -73- Bill<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><b>From:</b> TangerineSDR <<a href="mailto:tangerinesdr-bounces@lists.tapr.org" target="_blank" rel="noreferrer">tangerinesdr-bounces@lists.tapr.org</a>>
<b>On Behalf Of </b>David Witten via TangerineSDR<br>
<b>Sent:</b> Tuesday, December 3, 2019 10:41 AM<br>
<b>To:</b> <a href="mailto:tangerinesdr@lists.tapr.org" target="_blank" rel="noreferrer">tangerinesdr@lists.tapr.org</a><br>
<b>Cc:</b> David Witten <<a href="mailto:wittend@wwrinc.com" target="_blank" rel="noreferrer">wittend@wwrinc.com</a>><br>
<b>Subject:</b> [TangerineSDR] Webserver for local host<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">All concerned,</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">I deeply oppose the use of tomcat and any form of java-based services on the local host.  I will not be writing any code to support the use of Java,
 JSP, or Mono on single-board computers.  Almost any other toolset will do.  These are tools rarely used in the single-board computer world.  They may be suitable for banks and corporate monoliths (or not!), but not for small systems.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Dave Witten, KD0EAG</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

</blockquote></div></div></div>