Tapestry : A New Way to Connect Course Content
The Tapestry Tool Beta is an open-source online learning platform that allows users to make visual connections between information, represented as interactive multimedia graphs of content, known as “tapestries.” The architecture of the current application is limited in its capacity to represent large-scale tapestries that contain a significant number of content connections. As a result, students may experience disruptions in their learning experience due to reduced performance in the application.
Together with Tapestry, the UBC Cloud Innovation Centre (CIC) has created a solution to evolve the application beyond this limitation by leveraging graph database architecture (an online database management system with ‘create,’ ‘update,’ and ‘delete’ operations for graph models). This solution aims to improve application efficiency and efficacy by enabling users to create more expansive graphs so that they may expand on their tapestries, enhance their learning experience and better their conceptual understanding.
Approach
Tapestry uses a WordPress content management system (a software used to build, modify and maintain websites) to present content in “nodes.” Nodes visually represent a concept or idea with multiple functions such as text, images, videos or web pages. Users link nodes to form connections between content and create a ‘tapestry.’ While the Tapestry tool is functional, the application’s performance becomes slower when users create large-scale tapestries with greater node connections.
To address this inefficiency, the UBC CIC team evolved the current WordPress architecture into a graph database (an online database management system with ‘create,’ ‘update,’ and ‘delete’ operations for graph models). As a result, the application now inserts, updates, and deletes content via API calls, thus improving processing speed. Moreover, the solution can graph components of user interactions and node conditions and automatically filter nodes based on “view” and “edit” permissions. This feature further enhances Tapestry’s current performance, making the overall tool more efficient and effective for online, collaborative study.
Supporting Artifacts
Architecture Diagram
![An image of the architecture diagram depicting the different AWS services used in Tapestry.](https://sandbox-cic-2021.sites.olt.ubc.ca/files/2022/08/Tapestry-Architecture-Diagram-940x703.png)
![Another image of the second architecture diagram depicting the different AWS services used in Tapestry.](https://sandbox-cic-2021.sites.olt.ubc.ca/files/2022/08/Tapestry-Architecture-Diagram-2-940x344.png)
User Interface
![An image of a tapestry showcasing how visual connections are made between nodes of content for a certain topic.](https://sandbox-cic-2021.sites.olt.ubc.ca/files/2022/08/Tapestry-Image-940x531.png)
Technical Details
The migration to graph database architecture improves the functionality and overall performance of the Tapestry tool by allowing users to create and explore larger tapestries. The plugin allows access control to the nodes. Users can access a node if they have permission to do so or if their role (e.g. administrator, authenticated, or custom roles) has permission to do so. To accomplish this, the MySQL version of the plugin leverages tables that store user permissions, user progress and lock/unlock conditions for each node.
Although a Tapestry is an actual graph, the plugin uses the MySQL database provided by WordPress. It stores the metadata of different entities used by the plugin into the wp_postmeta table. Three different entities are stored in the wp_postmeta table, each differentiated from the other by their meta_key. These types are tapestry, tapestry_node and tapestry_node_data.
Users can access Tapestry via WordPress using any web browser. When accessed, WordPress interacts with the Tapestry plugin installed to display the WordPress content. Next, an API Gateway acts as a proxy between the Amazon Web Services (AWS) Lambda functions and allows the user to make HTTP requests handled by the AWS Lambda functions.
Each time the API Gateway receives a request, an AWS Lambda authorizer is utilized to ensure the request is made by the Tapestry plugin exclusively. This function is completed by checking the request headers for tokens generated during CloudFormation by the function ‘getRandomToken’. If the request is authorized, the API Gateway proceeds to use the AWS Lambda function corresponding to the request; otherwise, the request responds with an HTTP error code 401 (Unauthorized) or 403 (Forbidden).
To access the database, the AWS Lambda functions must exist within the same Virtual Private Cloud (VPC) as the Amazon Neptune database cluster. There are, in total, 12 AWS Lambda functions contained within this layer, 11 of which interact with the Neptune database. These include: a) updateUserProgress, b) addUser, c) updateNodeData, d) deleteVertex, e) reverseEdge, f) addTapestry, g) getTapestryNodes, h) deleteEdge, i) addEdge, j) addNode, k) isChildNodeOfTapestry, l) getRandomToken. All node dependencies are included on a Lambda layer, which ensures that the dependencies are all centralized in one location. The Tapestry interface also uses an Amazon Neptune graph database cluster containing one database instance. This instance stores all the nodes and edges.
Link to the solution on GitHub:
Plugin: https://github.com/UBC-CIC/tapestry-wp-graphDB
Cloud Infrastructure: https://github.com/UBC-CIC/Tapestry-GraphDB-AWS
Acknowledgements
Photo by Tapestry
About the University of British Columbia Cloud Innovation Centre (UBC CIC)
The UBC CIC is a public-private collaboration between UBC and Amazon Web Services (AWS). A CIC identifies digital transformation challenges, the problems or opportunities that matter to the community, and provides subject matter expertise and CIC leadership.
Using Amazon’s innovation methodology, dedicated UBC and AWS CIC staff work with students, staff and faculty, as well as community, government or not-for-profit organizations to define challenges, to engage with subject matter experts, to identify a solution, and to build a Proof of Concept (PoC). Through co-op and work-integrated learning, students also have an opportunity to learn new skills which they will later be able to apply in the workforce.
![](https://sandbox-cic-2021.sites.olt.ubc.ca/files/2024/05/ubc-logo-2024-cloud-innovation-centre-aws.jpg)