Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shared Storage Abstraction #115

Closed
4 tasks
FelipeGuzmanSierra opened this issue Nov 6, 2024 · 0 comments · Fixed by #116
Closed
4 tasks

Add Shared Storage Abstraction #115

FelipeGuzmanSierra opened this issue Nov 6, 2024 · 0 comments · Fixed by #116
Assignees
Labels
👍 Feature New feature or request

Comments

@FelipeGuzmanSierra
Copy link
Collaborator

Context

Currently, the shared storage doesn't have an abstraction defined on the project. The read-or-write process for each BOT defines a Read-or-write module depending on the shared storage service used for the BOT.

A better approach would be defining an abstraction of the shared storage, where the read or write process is already defined depending on the used service.

We need to define this abstraction following this pattern:

# Shared storage base abstraction
module SharedStorage
  class Base
    def initialize
    end
 
    protected

    def read
      # Depends on the service (PostgreSQL, MySQL, S3, kafka, etc...)
    end

    def write
      # Depends on the service (PostgreSQL, MySQL, S3, kafka, etc...)
    end
end

For this:

  • Define the base file for the abstraction
  • Define the shared storage PostgreSQL implementation.
  • Update the BAS bots to use the read and write method defined on the assigned shared storage.
  • Update tests
@FelipeGuzmanSierra FelipeGuzmanSierra added the 👍 Feature New feature or request label Nov 6, 2024
@FelipeGuzmanSierra FelipeGuzmanSierra self-assigned this Nov 6, 2024
FelipeGuzmanSierra added a commit that referenced this issue Nov 12, 2024
* Add a shared storage base and read type modules

* Add a shared storage module for postgres

* Add a shared storage default module

* Delete bots implementations

* Add bas to the modules namespace

* Remove unecessary test

* Update test

* Add test for the shared storage

* Update documentation

* Add missing test

* Improve README readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant