Media Server
Introduction
The "media" within the ComUnity Platform's Media Services alludes to the diverse range of content types that the platform can handle, enriching the architecture of digital solutions. The Media Services component of the ComUnity Platform offers a robust layer that efficiently processes requests for every content type it supports. This encompasses two main categories: structured and unstructured data.
Structured Data Handling
Structured data transactions leverage the OData protocol, presenting a dual interface comprising an API for data manipulation and a URL-based query domain-specific language (DSL) for information retrieval. This approach ensures:
Data Parsing: Interprets OData requests to determine the appropriate data entities, supporting authorisation and adherence to data governance policies.
Value-Added Processing: Prior to data relay to the business logic layer, the system performs essential processing for optimisation.
Error Handling: Enhances the developer experience by appending diagnostic information to errors for quicker resolution.
Unstructured Data Management
Unstructured data, particularly a wide array of file types, is handled with robust capabilities:
Azure Blob Storage Integration: Seamlessly uploads and downloads large files (up to 270 GB), featuring functionalities such as de-duplication, download resumption, and cache management.
HTTP Feature Utilisation: Employs partial GET requests, enabling browsers to manage video playback efficiently when accessing large video files hosted on the platform.
Specialised Media Processing
The platform excels in media adaptation and optimisation through:
Image Transformation Pipeline: Utilises a declarative approach for dynamic image processing, which adapts content according to device capabilities to optimise bandwidth and processing requirements.
Caching Mechanism: Improves performance by caching image transformations, minimising CPU usage on subsequent requests.
Iconography Support
Delivering a comprehensive icon set handling, the server:
SVG API Utilisation: Offers access to standard icon repositories, including Font Awesome, Noun Project, and Material Design, complete with on-the-fly rasterisation connected to the image transformation pipeline for efficient icon generation.
By default the ComUnity Developer Toolkit Media Server supports anonymous public read access to storage resources, to increase the security of your applications you may opt to use the managed media server as it only allows permission based and time-bound access to storage resources.
Managing file uploads
SHA File Naming
All files uploaded to the media follow a SHA’s standard file naming convention:
Although use of the SHA File Naming convection prevents duplicate file uploads, its main disadvantage is that uploading an existing file/s are overwritten.
Image file types
Other file types
The Filenames Data Service maintains a mapping of the original file name (or friendly name) to the SHA name.
Upload a single file
Retrieve files
The format of the URL used to retrieve storage resources from a public Media server:
Notes:
Base URL
: this specifies the base url of your project, during development itshttps://toolkitv3.comunity.me
u
: this segment of the URL denotes the Media Server, it is required.args
represent various arguments or parameters which are used to define your search.
Image manipulation
When fetching images from the Media Server you can append optional arguments to the URL string which allow you to manipulate your images. These modifiers used to manipulate images are derived from Graphics Magick.
The table below describes the image modifiers supported in the Media Server:
The descriptions in the table below were generated using Chat GPT.