Text back current arrival time for buses given a texted in bus stop number for People Mover. AddressLookup branch would allow texting "Arctic and Fireweed"
The bus app currently uses lowDB to write JSON file-based logs to disk. The way lowDB works requires it to hold the entire log in memory and then overwrite the entire log file with each hit. The current db.json file is 62MB and about 2.7 million lines! That's a lot of overhead for each hit and since there are two log files the app write both with each hit.
The bus app currently uses lowDB to write JSON file-based logs to disk. The way lowDB works requires it to hold the entire log in memory and then overwrite the entire log file with each hit. The current db.json file is 62MB and about 2.7 million lines! That's a lot of overhead for each hit and since there are two log files the app write both with each hit.
I propose moving to something like neB https://github.com/louischatriot/nedb (or similar if anyone has another idea).
The main advantages neBD has are:
The interface is about as simple as lowDB. It still hold the db in memory, which is less than ideal, but manageable if we can automate log rollovers.
It also has indexing which might speed up the /logPlot which is currently slow (and I think it also blocks).