On Mon, Mar 27, 2017 at 10:36:59PM +0300, Zvi Vered wrote: > My target is an embedded PC which runs windows \ linux. > The target contains HTML pages that are displayed in the host using httpd. > > The problem: The data in the HTML pages is updated (every 1 sec) by > another application that runs on the target. > > This application collects some telemetry info from the target. This > info should be displayed some how in the HTML pages. > > What is the right way doing this ? > > The HTML project contains also angular 2 java script files. Well, What's the Simplest Thing That Could Work? The collector could write out the HTML pages each time it takes a sample. I suspect that most versions of the files would be wasted motion, since they won't be read before they are replaced. Second approximation: have the collector write out the current sample's values as simple script-language assignment statements. Write a CGI script that creates the pages as needed, sourcing the sample file. The collector modification will be simpler and faster, but you still write that file every second whether you use it or not. I don't see enough of the design to go beyond that. The "right way" will depend on details of the data collection process. There may be several ways that are equally "right", or that all work but trade off among space, time, and complexity. All three of those can be particularly expensive in embedded systems. -- Mark H. Wood Lead Technology Analyst University Library Indiana University - Purdue University Indianapolis 755 W. Michigan Street Indianapolis, IN 46202 317-274-0749 www.ulib.iupui.edu
Attachment:
signature.asc
Description: PGP signature