-
Notifications
You must be signed in to change notification settings - Fork 619
Environment
This page contains information that is intended to help start hacking on Peloton. It covers a wide set of topics related to software development, like development environment, debugging, version control etc. We are only attempting to provide biased suggestions that we think are invaluable for low-level software development. Feel free to deviate from them in case you are comfortable with other tools that solve similar problems. Special thanks to Florian Funke. This guide is heavily inspired by a similar one written by him.
We prefer the Linux OS for development and testing. You can use any other OS for development as long as your modified source code can be built and run on Linux.
In case you are a Mac OS or Windows user, we encourage you to consider using Virtual Box and Vagrant. Virtual Box is a hypervisor for x86 computers, and Vagrant is a tool for sharing easy to configure virtual development environments. More information is available here.
We are developing Peloton in C++. In particular, we are following the C++11 standard. C++ provides a lot of leeway in DBMS development compared to other high-level languages. For instance, it supports both manual and automated memory management, varied styles of programming, stronger type checking, different kinds of polymorphism etc.
Here's a list of useful references :
-
CPP Reference is an online reference of the powerful
Standard Template Library(STL). - C++ FAQ covers a lots of topics.
Here's a list of C++11 features that you might want to make use of:
-
autotype inference - Range-based
forloops - Smart pointers, in particular
unique_ptr. - STL data structures, such as
unordered_set,unordered_map, etc. - Threads, deleted member functions, lambdas, etc.
Please refrain from using any libraries other than the STL (and googletest for unit testing) without contacting me. Finally, here are some general guidelines :
Please comment your code. Comment all the class definitions, non-trivial member functions and variables, and steps in your algorithms.
These tools are installed by the Vagrantfile.
- eclipse-4.4 Eclipse Luna
- tmux Terminal Multiplexer
- zsh Z Shell
We use Eclipse for development. First, install the EGit plug-in that enables Eclipse to work with Git repositories.
-
Create a new workspace for Eclipse (if necessary).
-
Select
File -> Import -> Git -> Projectsfrom Git. -
When the next panel comes up, click the
Clonebutton. In the next window, enter the path to the Github repository into the URI field at Location:[email protected]:cmu-db/peloton.git. Then, clickNext. -
In the next panel you can select which branches you wish to clone from the remote repository. You most likely only need to clone the
masterbranch. Then, clickNext. -
Select the location on your local machine where you wish to store your cloned repository. You can leave the other defaults. Then, click
Finish. -
It will now begin to pull down the repository. Once it’s finished, select
peloton. Then, clickNext. -
In the next panel, select the
Import Existing Projectsoption at the top. Then, clickNext. -
In the next page, select the
pelotoncheckbox. ClickFinish. Have fun hacking !