The JSON AIS format allows uploading multiple packets to aprs.fi at the same time. This is done to reduce the amount of HTTP requests required, and the amount of processing needed at aprs.fi to authenticate those requests and update receiver performance data for every request.
This client software does not do any buffering of data, but rather sends all positions as a separate HTTP request. This causes too much load on aprs.fi, and aprs.fi starts to block these requests now due to the high rate. aprs.fi does a lot of processing for every HTTP request, and for this client, aprs.fi now has to do that separately for every single AIS packet (of which there are many per second, the AIS data rate is pretty high).
Please implement:
A cache/dictionary of packets per originator MMSI, only retain the latest position (or perhaps one packet of each packet type) for each MMSI
Send the packets in a single request, once per about 30 seconds, and empty the cache after that
Only the latest position & information packet for each originator MMSI (ships move slowly, once per 30 seconds is really enough)
A limiter to prevent an unchanged position of an MMSI to be retransmitted more often than once per 120 seconds
The point of "about 30 seconds" is important - never synchronise to wall clock/NTP time when scheduling transmissions, to prevent all clients from sending at the very same time. Send a batch, and then send the next one after 28 + random.uniform(0, 4) seconds so that the requests are evenly distributed over time.
Hi,
The JSON AIS format allows uploading multiple packets to aprs.fi at the same time. This is done to reduce the amount of HTTP requests required, and the amount of processing needed at aprs.fi to authenticate those requests and update receiver performance data for every request.
This client software does not do any buffering of data, but rather sends all positions as a separate HTTP request. This causes too much load on aprs.fi, and aprs.fi starts to block these requests now due to the high rate. aprs.fi does a lot of processing for every HTTP request, and for this client, aprs.fi now has to do that separately for every single AIS packet (of which there are many per second, the AIS data rate is pretty high).
Please implement:
28 + random.uniform(0, 4)
seconds so that the requests are evenly distributed over time.Thanks!