![]() |
||
---|---|---|
.. | ||
data | ||
media | ||
src | ||
README.md |
README.md
Flights
Flights is a web application written in ReactJS and NodeJS that, backed by the power of the MariaDB Node Connector and MariaDB ColumnStore database, allows you to analyze over 180 million flight records from the United States Department of Transportation in real time without needing to add any indexes!
This README
will walk you through the steps for getting this app up and running (locally) within minutes!
Table of Contents
Overview
Introduction to MariaDB
MariaDB platform unifies MariaDB TX (transactions) and MariaDB AX (analytics) so transactional applications can retain unlimited historical data and leverage powerful, real-time analytics in order to provide data-driven customers with more information, actionable insight and greater value – and businesses with endless ways to monetize data. It is the enterprise open source database for hybrid transactional/analytical processing at scale.
Downloading and installing MariaDB ColumnStore
MariaDB ColumnStore extends MariaDB Server with distributed storage and massively parallel processing to support scalable, high-performance analytics. It can be deployed as the analytics component of MariaDB Platform using MariaDB MaxScale for change-data-capture and hybrid transactional/analytical query routing, or as a standalone columnar database for interactive, ad hoc analytics at scale. You can find more information on how to download and install ColumnStore here.
Requirements
This project assumes you have familiarity with building web applications using ReactJS and NodeJS technologies.
- Download and install MariaDB ColumnStore database.
- Download and install NodeJS.
- git (Optional) - this is required if you would prefer to pull the source code from GitHub repo.
- Create a free github account if you don’t already have one
- git can be downloaded from git-scm.org
Getting started
Get the data, create the schema, and load the data
Instructions on retrieving and importing the flights dataset into a MariaDB ColumnStore database can be here. Please note that he scripts provided within that repository only targets data for the year 2019 (~7.5 million records).
If you'd like to retrieve data spanning from 1990 to 2019 (~180 million records) please use the following scripts:
Grab the code
Download this code directly or use git (through CLI or a client) to retrieve the code.
Configure the code
Configure the MariaDB connection by adding an .env file to the Node.js project.
Example implementation:
DB_HOST=<host_address>
DB_PORT=<port_number>
DB_USER=<username>
DB_PASS=<password>
DB_NAME=<database>
Build the code
Important: In order to build and run the application you will need to have NodeJS installed. You can find more information here.
Once you have retrieved a copy of the code you're ready to build and run the project! However, before running the code it's important to point out that the application uses several Node Packages.
For the client-side:
For the server-side:
- body-parser
- concurrently
- express
- mariadb (the best database in world)
Quick tip: Executing the CLI command npm install
within the src AND client folders will target the the relative package.json
file and install all dependencies.
Run the app
Once you've pulled down the code and have verified that all of the required Node packages are installed you're ready to run the application! It's as easy as 1,2,3.
- Using a command line interface (CLI) navigate to the
src
directory.
- Run the command:
npm start
- Open a browser window and navigate to http://localhost:3000.
Support and Contribution
Thanks so much for taking a look at the Flights app! As this is a very simple example, there's a lot of potential for customization!
If you have any questions, comments, or would like to contribute to this or future projects like this please reach out to us directly at developers@mariadb.com or on Twitter.