Saturday, September 28, 2013

VOS : SCADA Controls Test

Sample of the Real-Time Raphael Vector Controls Available in Vault-OS

I know most reasonable people have long abandoned the idea that Vault-OS will ever see the light of day. I don't want to bore you with all the code I have written that turned out to be not quite exactly what I needed it to be. For example, I wrote a bunch of DXF drawing server code that I chucked once I realized I could handle nearly all the "diagrams" in Vault-OS on the client side for display. I didn't know how this should work six years ago, I just assumed in order to draw a map or a layout on the screen I would have to do it by preparing a bitmap server side and sending it down in the cache. That was the wrong idea. I have thrown all that code out. I knew I could not do it via SVG because SVG has never been properly supported on older browsers like the thin clients I purchase for a buck and intend to serve as workstations in a Vault at very cheap cost of ownership.

I figured out how to get SVG import going on-the-fly into REST services on the browser side and then break it down into controllable chunks for the SCADA system for display. So it can get stored as an SVG and displayed with dynamic control in Raphael even on very old machines and systems.

The code you see above was tested on Internet Explorer 5.5 and I found both the JSON REST service and the JQuery/Raphael/JQUI all seem to run the exact same way they do on Firefox or IE 9. You would not believe how many nights of coding it took to get it this far.

Anyway, got quite a lot to do. This is really getting somewhere now, though. This runs in 814K, a single executable, no configuration, no additional files, no installation, no DLLs, no nothing. On DOS, Linux or Windows ... you just run it and it works. All configuration takes place internally.

Simple clock in upper right corner. I don't have a screen shot yet but in the authorized page there is a Telnet-like terminal running in the browser for power users to operate everything from the command line. Very crude at the moment but that is working, too.

Next up is regex wildcard matching for resource URLs in the built-in web server. At present I have hardcoded the JSON REST calls as a static address, this will never do for production code. My basic paradigm is an OAuth style scheme with the control sensor/switch/device addressed along a path interpreted and dispatched dynamically rather than just a literal lookup. I have some regex code that compiles to a 4K library I will be using for this.

The next time you see this program those crude buttons that act as a menu along the top will be replaced by a proper DHTML pulldown menu in JQuery-UI.

1 comment:

samhuih said...

Very impressive. Lots of mixed libraries.