This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Erik Roberts edited this page Mar 10, 2023
·
11 revisions
Glimpse is the codename for RPI TV's modern software infrastructure. It was conceptualized and started in late 2019 by Erik Roberts, with the ultimate goal of integrating all of RPI TV's custom software technologies into one large system.
This project is primarily maintained by Computer Science students at Rensselaer Polytechnic Institute, and as a result, most of this wiki is designed to be digestible by a first- or second-year Computer Science student. While reading through this wiki, you may come across words, technologies, paradigms, etc. which you have never heard of before. Additionally, this project introduces some custom "lingo". This glossary will hopefully assist you in understanding what is meant in those situations.
Term | Definition |
---|---|
Annotation | Applied the same way as a Decorator, however instead of adding custom logic, annotations just add metadata which is then processed elsewhere in the application. |
AST (Abstract Syntax Tree) | A language string parsed into a tree structure, where each node is a token (e.g. operator, string, variable, etc.) within the source string. When we discuss ASTs in the Glimpse API, we're usually talking about parsed GraphQL queries, however ASTs are used in lots of language compilers/interpreters/parsers. |
Container | A controlled environment for applications to run in, completely separating resources from the main operating system. This allows you to operate server applications without fear that one application will be able to interfere with other applications or services running on the computer, and helps alleviate the "it works on my machine" issue. |
CI/CD | Stands for "Continuous Integration/Continuous Delivery". CI/CD allows for automating actions, such as running tests or deploying your app. Usually triggered by some external action, such as a GitHub pull request. |
Credit | A type of unit that users can spend to submit GraphQL queries. Credits reset over time. |
Decorator | A function that encapsulates the value it is applied to, allowing you to mutate it and quickly apply custom logic in many places. Decorators are called at class definition time (essentially, when the application starts). |
Directive | The GraphQL equivalent of a decorator. |
Docker | A tool for creating and managing containers and container images. |
Docker Compose | A system allowing you to manage multiple Docker containers at once through YAML config files. |
DTO (Data Transfer Object) | An object which is intended to be serialized and transferred between two processes/systems. |
Express.js | An unopinionated Node.js framework for setting up HTTP servers. Nest.js is built on top of Express.js. |
Foreign Key | A connection between two rows in different tables within a database. For example, connecting a user column to the id column in a users table. The database will then require that a row with the corresponding ID exists. |
GraphQL | An alternative to REST APIs that allows clients to specify what data they want. GraphQL can be more complex to implement but saves bandwidth due to not sending large amounts of unused data. GraphQL also has built-in data streaming support (via Subscriptions), so you don't need to have your own Web Socket implementation for real-time data. |
Index | A lookup-table for finding data within a database much faster, like the index found below. |
JSON | Stands for "JavaScript Object Notation". JSON serves as a way to serialize objects within your application into a text format, which can be parsed back into the original object. JSON is often used to send data through a REST API. Some database columns in the Glimpse API also store their data in a JSON format. |
Mutation (GraphQL) | Functionally the same as a GraphQL query, but may (and is expected to) make changes to the server/database. |
NestJS | A server-side Node.js framework that runs the core of the Glimpse API. |
Node.js | A JavaScript runtime for running JavaScript applications on servers, instead of just for browsers. The entire Glimpse API is written in JavaScript and runs within the Node.js runtime. |
NPM | A package manager for Node.js applications. Also allows us to setup scripts within our package.json . |
NPX | A command-line tool to easily call CLI tools from NPM packages without having to manually download and install the package. |
OAuth | A multi-step HTTP-based protocol for authenticating with third parties. OAuth also lets applications request permission to perform certain actions on behalf of the authenticated user (e.g. Joining servers in Discord). |
Observable | A tool provided by the rxjs library which serves a similar purpose to JavaScript Promises, but allows data to be sent more than once. Has a bit of a learning curve. |
PostgreSQL / Postgres | The RDBMS used by Glimpse to store data in our database. |
Primary Key | Unique identifier for a row. No two rows in the same table can have the same value in the primary key column. Value also cannot be null. |
Prisma Client | A JavaScript ORM that lets us easily interact with the database without having to write our own SQL statements. |
Prisma Migrate | A command-line tool that serves as version control for the database, which allows you to easily deploy database schema changes. |
Resolver | A function which is responsible for retrieving a specific property within the GraphQL schema. |
REST | Stands for "Representational State Transfer". In general, REST APIs are likely what you think of when you think of a web API: You send a request to a URL and the server responds with data (usually in the form of JSON). |
Rule | A decorator for GraphQL resolver functions that determines whether the resolver should run or not, usually by checking whether the user has permission to perform the required action(s) for the resolver. |
Serialize | To convert an object from memory into a string or data stream, usually allowing the data to be saved to disk or sent over the wire. JSON is a common way to serialize data. |
Session | Sessions allow us to keep track of who is logged in across multiple HTTP requests. Session IDs are stored in browser cookies. |
Strategy | A method to allow users to log in, such as username/password or Discord OAuth. |
Subscription (GraphQL) | A GraphQL query that sends data over a websocket, allowing the server to send updated data in real-time. |
Transaction | One or more SQL queries on the database which can be rolled back. |
Unique Key | Same as a Primary Key, however there can be multiple unique keys, and unique key values can be null. |
Query (GraphQL) | A request for data from a GraphQL server, with the expectation that the resolver(s) will not change any data on the server/database. |