Technical Design of QuickServerCheck

From Acacia Support Wiki
Revision as of 12:54, 25 September 2021 by Gmcollett (talk | contribs)
Jump to navigation Jump to search

This app was written based SwitfUI and on the use of the SwiftyPing package to send ICMP (pings) to remote hosts.

A timer continually scans the list of enabled hosts and pings them in a background thread. Throttling logic ensures that each host is only every pinged once every 2 seconds.

All details for each host are held in an array of name/value pairs and stored in user settings. When the app is restarted, previous host settings are used to automatically register these hosts and load up their details. This caching allows network request to be minimised.

If the user provides a new host name, the URL is cleaned up and passed into a DNS lookup to get and store the IP address.

As hosts are registered in the app, they are queued for the lookup of additional details such as GPS location from IPInfo.

All hosts that have registered GPS locations are automatically displayed on the Apple map.

As hosts are pinged, a geodescic line is drawn from the current host location to the remote host location. Ping results pushed into a FIFO queue and are graphed using the Charts package. Data is automatically re-scaled and the Y-Axis is recalculated to display the highest value.