#2 will allow for custom and varied interfaces. Postgres has notify/listen, as well as atomic operations, which makes it great for this.
The only problem is expiration of keys, which isn't a huge deal. It could be handled with a trigger (see http://stackoverflow.com/questions/26046816/is-there-a-way-to-set-an-expiry-time-after-wich-a-data-entry-is-automatically), or document and expect the user to manually clean old responses with whatever scheduling system they prefer. Expose a nice python-side method to clear the table as well.
#2 will allow for custom and varied interfaces. Postgres has notify/listen, as well as atomic operations, which makes it great for this.
The only problem is expiration of keys, which isn't a huge deal. It could be handled with a trigger (see http://stackoverflow.com/questions/26046816/is-there-a-way-to-set-an-expiry-time-after-wich-a-data-entry-is-automatically), or document and expect the user to manually clean old responses with whatever scheduling system they prefer. Expose a nice python-side method to clear the table as well.