17 January 2019

What did I do during my semester as a research assistant on ViLO?

What is ViLO and what problem did I come in to solve?


ViLO is a learning resource which gives students a visual and interactive way to explore content and develop their understanding of topics. My mission was to figure out how we could leverage cutting edge technology to store and serve educational content to users.

What did I research?


The original version of ViLO used a hybrid database, but this made development difficult due to the database's lack of documentation and support, so we needed to select a new database. I researched various database models (relational, document, and graph databases) and the differences between the most well-supported databases for each model.

But to evaluate which package would be best suited for ViLO, I first needed to understand our data model. Our data model has two key characteristics: many-to-many relationships between nodes, and the relationships between nodes are just as valuable as the nodes themselves. Given this requirement, it quickly became clear that Neo4j (a graph database) would be the best suited for ViLO because graph databases are built to fulfil those two requirements.

Next, I began researching how we can facilitate content sharing between institutions (for instance, how could a St Andrews lecturer make their Java resources available to lecturers in the Netherlands?) and investigating how to model and query data in Neo4j. For this, I created some demo queries (available in Notion, see link below) to emulate real-world usage and to help determine our schema. During this research, I came across GraphQL, a specification and query language which can be used to create APIs for querying and mutating data on a server (instead of using a REST API). We ultimately selected GraphQL as a better fit for our purpose than a REST API.

Regarding content sharing, I concluded that a model where users can import resources from user-created public repositories (hosted on services like GitHub or GitLab) would enable open and decentralised collaboration between institutions without requiring that we build and maintain a service to host the content. Importantly, this lowers our maintenance burden and protects us from any possible copyright implications that can come with storing user-generated content and.

What did I build?


After the research into databases, content sharing models, modelling and querying data in Neo4j, and GraphQL APIs, I began building the new back-end for ViLO. To make it easier for other developers to pick up my code and start using it (without having to manage various dependencies and possibly encountering versioning issues), I chose to use Docker to containerise each service in the project (there are three services: front-end, back-end server, and database). This isolates each service and ensures that every developer’s environment will be homogenous. My prior experience with Docker was quite limited, so getting this development environment set up involved diving into numerous Docker tutorials and documentation.

With the development environment set up, I built the GraphQL API server (in JavaScript using Node.js) to serve and mutate data in the database. Next came the user interface. For this, I wrote a simple web client (in JavaScript using React.js) to query the back-end and display that data in text. I built the web client as a demonstration of how the API server can be accessed from a client; the primary focus of this project was the API server and database.

What have I learnt?


While working as a research assistant for ViLO during my first semester at St Andrew's, the team gave me the responsibility and autonomy to research and utilise a range of cutting-edge technologies. This includes technologies like Neo4j, GraphQL, Node.js, React.js, and Docker. Many of these technologies are in high demand in industry, so being given the opportunity to research and use them in a project has given me the confidence to continue diving deeper independently.

If you’d like to read my reports, you can find them here on Notion.

ViLO