Timeline storage and wiring #202

Merged
sarah merged 1 commits from dan/cwtch:storage-eb into master 2019-01-31 21:34:02 +00:00
Owner
  • created new "SteamStore" that acts like a storage stream for timeline storage

under the hood, it holds ~16kb (as per secret box recommendation) buffer and appends messages to that and saves to file, until full, then rotates files and starts again.

this completes a vast improvement, where as before we were storing all timeslines in one giant profile file which was terrible for performance (every message could trigger a full json serialization of all timelines and the profile) and far agaisnt secret box usages of 16kb chunks

the profile store initializes and manages streamstores for timelines

some basic wiring for events is now included. things should be stored and loaded properly

- created new "SteamStore" that acts like a storage stream for timeline storage under the hood, it holds ~16kb (as per secret box recommendation) buffer and appends messages to that and saves to file, until full, then rotates files and starts again. this completes a vast improvement, where as before we were storing all timeslines in one giant profile file which was terrible for performance (every message could trigger a full json serialization of all timelines and the profile) and far agaisnt secret box usages of 16kb chunks the profile store initializes and manages streamstores for timelines some basic wiring for events is now included. things should be stored and loaded properly
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/394
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/395
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/396
Author
Owner

updated with unit tests testing

  • stream store in isolation. it writes a line and a new one can read it
  • profile store:
    • tests basics like name and attribute save/load
    • tests group creation and message saving and loading

important breaking change for ui

there is no message sent when UI creates a group, so storage engine doesn't initialize a storage engine for the group, and when it gets messages for the group that ui created but it didn't initialize for, it seg faults...

updated with unit tests testing - stream store in isolation. it writes a line and a new one can read it - profile store: - tests basics like name and attribute save/load - tests group creation and message saving and loading **important breaking change for ui** there is no message sent when UI creates a group, so storage engine doesn't initialize a storage engine for the group, and when it gets messages for the group that ui created but it didn't initialize for, it seg faults...
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/397
sarah closed this pull request 2019-01-31 21:34:02 +00:00
Owner

Awesome!

Awesome!
Sign in to join this conversation.
No description provided.