Skip to main content

Introduction

A tech stack is the set of technologies used in order to develop an application, including programming languages, frameworks, databases, front-end and back-end tools, and APIs.

TypeScript + Node.js

Pure Node.js is used in New-Api microservice, while others are utilizing TypeScript.

Redis

Redis's main purpose is server load reducing by caching data with high level of nesting, such as exercises with classes, groups, users and etc. in it. Every time we change a class, group, etc., we delete the cache, it’s automatically generated upon request.

RabbitMQ

RabbitMQ is used to create queues of asynchronous tasks when microservices' communication or high load is possible.

MongoDB, Presto

MongoDB is a NoSQL document-oriented database, which features BSON data format similar to JSON. It provides better performance for big amounts of data and JavaScript-like data format, which is corresponding to our technology stack. We utilize Presto for transforming SQL-queries to similar Mongo ones.

ElasticSearch

It is used for full-text search.

Seneca.js

There are times when you can't do without requests to another microservice. For example, calculating the statistics for an exercise. All stats are stored in one database, and all user solutions are stored in another. Statistics are based on solutions. Accordingly, requests are made for a Soluiton microservice in order to then process them in some specific way and turn the whole thing into statistics.

The main disadvantage of Seneca is that it can be used with microservices written in JS only, i.e. we cannot write a microservice in Python for example and work with Seneca.

Socket.io

Web-Sockets are used to transfer some events from the server to the client. HTTP-protocol's requests are always initiated by client, while sometimes server needs to transfer data to client. For example, an exercise has been updated (for example, the teacher has added another task), then we send an exerciseUpdated message from the server to the client via a Web-Socket connection with the transfer of the exerciseId, and if the student is in a state of solving this exercise, the client will receive a message, compare the ID of the current exercise with what came in the message, and if they are equal, will make GET /exercises/id to update the exercise in real time.

We've got plenty of such messages and customers should be able to respond to them in a good way.

Docker

Everything we have is built using Docker containers. Any pull request to the develop, master branches leads to the automatic creation of a Docker container on the Docker Hub, as well as release of a new version.