-
Notifications
You must be signed in to change notification settings - Fork 0
Customize Data Repos
The PHYLOViZ Web Platform allows for customization of data repositories, providing flexibility in storing and managing phylogenetic data. By default, the platform utilizes a set of repositories to store the generated resources and user-uploaded files. However, it supports the integration of additional repositories, allowing users to tailor the data storage and retrieval process according to their specific needs.
-
Diverse Data Models: The platform's flexible architecture enables the use of multiple repositories with different data models simultaneously. This allows for the incorporation of various representations of phylogenetic data, accommodating diverse data structures and formats.
-
Efficient Resource Relations: Custom data repositories can focus on establishing efficient relationships between resources, optimizing querying and retrieval operations. By utilizing repositories specifically designed for phylogenetic data, such as PhyloDB, the platform ensures streamlined access to interconnected resources.
-
Scalability: Incorporating scalable solutions like Amazon S3 (Simple Storage Service) as a file repository allows for efficient storage of large files, such as typing data, distance matrices, or tree representations. This scalability ensures that the platform can handle increasingly larger datasets without sacrificing performance.
To seamlessly integrate repositories with different interfaces into the platform, adapters play a crucial role. Adapters transform or adapt existing code to conform to a common interface, ensuring compatibility between repositories and the platform. This approach, known as the Adapter design pattern, allows for the utilization of a variety of repositories without impacting the platform's core business logic. In the context of the PHYLOViZ Web Platform, the code for access to the data repositories can be referred to as "adapters," emphasizing their ability to adapt existing repositories to the common interface.
To incorporate a new data repository into the platform, some code in the backend application needs to be added for each of the resources that will have operations supported by this new repository. So, for each (affected) resource:
- Add a new class following DataRepository interface - implements the methods to be called by the service layer, each method properly adapting the access code to the platform's data model contract.
- Add a new class following DataRepositorySpecificData interface - specifies what data is stored within the metadata of the resource to identify the resource in the repository and provide information for its access.
- Add a new constant to the enum RepositoryId, that globally identifies the repository.
For example, to add a new repository able to handle trees, add a new TreeDataRepository, new TreeDataRepositorySpecificData, and a new constant on the TreeRepositoryId enum.
Custom data repositories offer enhanced functionality and performance for specific use cases. For example, when efficient storage and retrieval of distance matrices are required, incorporating a repository optimized for this purpose can provide significant advantages. By selectively utilizing specialized repositories alongside the default repositories, users can achieve more effective solutions tailored to their specific requirements.
By leveraging the customization capabilities of data repositories, users of the PHYLOViZ Web Platform can efficiently store, manage, and retrieve phylogenetic data in a manner that aligns with their unique research needs.
PHYLOViZ Web Platform: A Modular and Web-Based Tool for Phylogenetic Analysis