Ngha-Boris / Remind-Me

MIT License
1 stars 0 forks source link

Feature/storage #17

Closed Christiantyemele closed 6 months ago

Christiantyemele commented 6 months ago

For scenarios where you need to set or remove multiple key-value pairs at once, I think you can implement or consider adding methods for batch operations. This can improve performance compared to making multiple individual calls.

please can you be more explicit I don't understand what you mean

Motouom commented 6 months ago

For scenarios where you need to set or remove multiple key-value pairs at once, I think you can implement or consider adding methods for batch operations. This can improve performance compared to making multiple individual calls.

Please can you be more explicit I don't understand what you mean

Imagine you have a storage system where you store data using key-value pairs. Normally, you might update or modify these pairs one by one with individual requests, and this is time consuming since if you have a bulk of requests to make, there is going to be a regular back and forth communication between the user and the local storage.

Batch operations come in when you need to update or modify multiple key-value pairs at once. Instead of making separate requests for each change, you can group these changes into a single "batch" request. This batch gets sent to the storage system, which can process all the updates efficiently. In this our context of service storage and batch operations, key-value pairs are the fundamental unit of data storage.

Key: This acts like a unique identifier, similar to a label on a box in storage. It allows you to easily access specific data later. Value: This is the actual data you want to store. It could be anything: text, numbers, or even complex objects, depending on what our storage system needs to store......

Christiantyemele commented 6 months ago

For scenarios where you need to set or remove multiple key-value pairs at once, I think you can implement or consider adding methods for batch operations. This can improve performance compared to making multiple individual calls.

Please can you be more explicit I don't understand what you mean

Imagine you have a storage system where you store data using key-value pairs. Normally, you might update or modify these pairs one by one with individual requests, and this is time consuming since if you have a bulk of requests to make, there is going to be a regular back and forth communication between the user and the local storage.

Batch operations come in when you need to update or modify multiple key-value pairs at once. Instead of making separate requests for each change, you can group these changes into a single "batch" request. This batch gets sent to the storage system, which can process all the updates efficiently. In this our context of service storage and batch operations, key-value pairs are the fundamental unit of data storage.

Key: This acts like a unique identifier, similar to a label on a box in storage. It allows you to easily access specific data later. Value: This is the actual data you want to store. It could be anything: text, numbers, or even complex objects, depending on what our storage system needs to store......

I see what you mean, but the localstorage API does not provides a method to change multiple key-value pairs at once this is one of its disadvantage, but code which wants to do some can use async methods even though its still makes multiple request but more efficient.

Christiantyemele commented 6 months ago

if you want a system which make large amounts of requests then local storage might not be the best

Motouom commented 6 months ago

if you want a system which make large amounts of requests then local storage might not be the best

Okay I see. Its all good👍🏿