serve icon indicating copy to clipboard operation
serve copied to clipboard

Serialize models to store in DDB

Open mycpuorg opened this issue 6 years ago • 6 comments

To allow for scaling of snapshots across server instances. Snapshot Serialization should allow for database storage such as DynamoDB. This must be made optional through config properties since most customers may not use such an option.

mycpuorg avatar May 18 '20 16:05 mycpuorg

@dhaniram-kshirsagar @harshbafna thoughts?

mycpuorg avatar May 18 '20 16:05 mycpuorg

@dhaniram-kshirsagar @harshbafna thoughts?

At a high level -

  • The credential for DDB client will be available via Default Credential Provider Chain
  • Table will be added/dropped in DDB via script [use best practice] (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/best-practices.html) to implement this]. This should be kept separate since user may not give permissions to create/alter schema at runtime.
  • Snapshot data will be serialized/deserialized via ddb Item apis
  • 'Strongly Consistency Read' can be used for GetItem i.e. restoring a snapshot
  • Local DDB mode support for local debugging/testing
  • Need to define policy [based on duration to keep etc.] for snapshot cleanup
  • Config param to switch between DDB/FS etc.

Assumptions -

  • AWS SDK jar for DDB will be added to build [check if same can be made conditional]
  • AWS DDB operational aspects i.e. data security, backup/recovery, monitoring of the table will be taken care by end-user admin

codinnvrends avatar May 19 '20 19:05 codinnvrends

@mycpuorg Can you share your feedback on this.

codinnvrends avatar May 25 '20 17:05 codinnvrends

@dhaniram-kshirsagar This sounds good to me, in addition:

  • Atomicity of save and restart operations (Which is the reason DDB is suitable)
  • DDB ops have to be completely outside the scope of this and logs should indicate failures
  • as a POC it's worth benchmarking mounting a remote FS on a local path (such as EBS)

@maaquib was interested in this too?

mycpuorg avatar May 27 '20 16:05 mycpuorg

@dhaniram-kshirsagar this sounds good. Please proceed and make a PR. Thanks.

mycpuorg avatar Jun 03 '20 00:06 mycpuorg

  • DDB ops have to be completely outside the scope of this and logs should indicate failures

Can you please elaborate on this?

codinnvrends avatar Jun 28 '20 10:06 codinnvrends