jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

MoneyNetworkAPI - fileGet and decrypt messages in demon process #261

Closed jaros1 closed 6 years ago

jaros1 commented 6 years ago

MoneyNetworkAPI should keep track of minimum interval between publish (16 seconds).

There already is a z_site_publish function in MN API. Must be extended to check for minimum interval between publish. And should also be extended for retry after failed published (30, 60, 120, 240 seconds between failed publish). z_site_publish will keep track of this client publishing.

Between MN clients (MN and wallet sessions) API messages publish_started, get_published and published are being used to exchange last published timestamp.

Now demon process is just sending filenames for new incoming messages to client code (process_incoming_messages callback) and fileGet and decrypt is done in callback code. It could be nice to let the demon fileGet and decrypt publish_started and published messages as information about last published timestamp is in MoneyNetworkAPILib.

Maybe an MoneyNetworkAPILib or MoneyNetworkAPI instance option to tell demon process to perform fileGet and decrypt operation before sending message to client.

Or maybe a special -p file -flag for published messages? Now using -i, -e, -o and -io filename extensions. Use -p extension for internal publish messages?

jaros1 commented 6 years ago

Added optional fileGet and decrypt to demon process in MoneyNetworkAPI.

jaros1 commented 6 years ago

fileGet and decrypt removed from MN

jaros1 commented 6 years ago

Moved fileGet and decrypt for incoming messages to MoneyNetworkAPILib.demon. OK for MN and W2. Todo: add special processing for published messages and implement 16 seconds limit between commits

jaros1 commented 6 years ago

Added MN publish queue.