I have a javascript widget the loads JSON data from a Java webapp. I want to record impressions, and the ids of the data I return (5 or 10 longs).
I want to be able to process these and give a summary of how many impressions a person got on their widget, and record how many times each piece of data was seen.
I'm guessing it's not a great idea to store it all in my postgres database since it could probably be a lot of data (perhaps tens of impressions per second).
Right now I'm considering just writing it all to a log file and processing it every hour.
Is there a better way? Maybe with some kind of message system, or event system?