Before delving into the topic, let's gain some understanding of what a repository is...........
What is a repository?
A repository is a centralized storage location where data, files, documents, or other digital assets are stored and managed. It serves as a single source of truth for organizing, versioning, and accessing these assets.
In the context of software development, a repository typically refers to a version control system, where developers store and manage source code, configuration files, documentation, and other project-related files. Version control systems like Git, Subversion (SVN), and Mercurial are commonly used repositories in software development.
In addition to version control systems, repositories can also refer to databases, file systems, content management systems (CMS), or any other structured storage system used to manage digital assets.
Overall, a repository provides a structured and organized way to store and manage digital assets, facilitating collaboration, versioning, access control, and tracking of changes over time.
In Pega, repositories are utilized for storing artifacts and attachments. Today, we'll explore how to integrate and leverage third-party repositories to store attachments within the Pega platform.
The default storage location for attachment files in Pega is the database. While using the database is suitable for most cases, if dealing with a large volume of files, it's advisable to consider alternative repositories such as Amazon S3, JFrog Artifactory, Microsoft Azure, or a file system. This is recommended for the following reasons:
1.Storing data directly in the database can be resource-intensive. The system converts FileStream into Base64 Strings and stores them in a Blob field, increasing the size by approximately 33%. Additionally, retrieving data through SQL and decoding it back into a file can be time-consuming. Utilizing a repository significantly reduces the workload on the database.
2.When using the database, if an end user attempts to attach a file to a case, the system temporarily loads the entire file into memory twice. For example, if the attachment file is 1GB, approximately 2.6667GB of the app node's heap size is consumed. In contrast, utilizing a repository allows for the direct upload of the file to the repository without loading it onto the Pega app node.
Additionally, it's important to note that a repository isn't restricted solely to file attachment usage but can accommodate any file storage requirements. For instance, if you intend to install Deployment Manager on-premises, you'll require a separate repository for storing product files. A database cannot fulfill this use case.
Below are some of the repositories commonly used in Pega, along with the details required for their configuration:
In this article, we will explore JFrog Artifactory.
1-8. By navigating to Application > Artifacts and clicking on your Repository Key, you'll find detailed information. Take note of the URL. In this example, it is: https://ethpega.jfrog.io/artifactory/ETHPega/
1-6. Ensure that you select "Basic" for the Type. Unlike Amazon S3 or Microsoft Azure, there is no specific type of authentication profile for JFrog Artifactory.
2-1. Now, let's configure the repository for your attachment files. In the application rule, specify "Artifactory" in the Content storage section as shown below.
2-2. If there are no directories in JFrog Artifactory, you will only find the "/" (root) directory, as shown below. Select "/" to proceed.
Comments
Post a Comment