[time-nuts] Re: [OT] Re: New Instrument Scan and Display software 3

Lux, Jim jim at luxfamily.com
Wed May 5 14:03:48 UTC 2021


On 5/5/21 1:06 AM, Dave B via time-nuts wrote:
>
> On 05/05/2021 08:30, xaos <xaos at darksmile.net> wrote:
>> Ideally, you want them on a web page.
>
> Why a "Web Page"?   That's for simple publishing, not comparing.
>
> If you want to compare results, best pull the data and put each 
> measurement data set in a spreadsheet (or similar) so you can compare 
> results and obtain numerical differences.
>
>
> A Web Page isn't going to help you with that.

Well, I've built systems where we used a webserver (i.e. flask) to 
implement an abstracted instrument interface - we could throw up a 
preview/quicklook image, and then you'd click on a link to retrieve the 
actual data file as csv. Or, since the URLs were structured well, you 
could directly retrieve the file using CURL (in a script) or appropriate 
web service calls (in a program)

Rather than calls to API functions (which mean you have to link with a 
library, typically), you were making HTTP GET requests to a IP 
address/socket.  We started out using just a socket with no http server 
behind it (i.e. you'd send a request to a socket, and you'd get packets 
back), but found that wrapping it in a easy webserver made debugging 
easier, because "everything" today has some sort of browser.  The http 
server solved a bunch of the grubby details of transferring the file, etc.

Technically it's flask + werkzeug, but generally you get them together 
when you install it.

A note - flask isn't super scalable - it's not going to support multiple 
users or clients very well.  Then you need to go to something bigger - 
nginx, apache, etc.
But you can get a simple app up and running in flask in a few hours.






More information about the Time-nuts_lists.febo.com mailing list