• Stars
    star
    129
  • Rank 270,101 (Top 6 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Coda is an advanced networked filesystem. It has been developed at CMU since 1987 by the systems group of M. Satyanarayanan in the SCS department.

Coda Distributed File System

Coda is an advanced networked filesystem. It has been developed at CMU since 1987 by the systems group of M. Satyanarayanan in the SCS department.

About this repository

This repository combines, to a best effort, the history from the official CVS repositories of Coda, as well as the supporting LWP, RPC2 and RVM libraries. The CVS repositories at this point only useful as a historical reference and further development will only be committed to the Git repository. The supporting libraries can be found in their respective directories under lib-src/.

The reasons the supporting libraries and their history have been merged with the Coda source tree are twofold. They were originally part of the Coda source tree but were separated out as over time other non-Coda users of the libraries emerged. By now Coda has outlived all other external users and merging them back to consolidate the development history seemed to make more sense.

For the past several Coda releases there have been new releases of the LWP, RPC2 and RVM libraries. Coordinating building and packaging of a single source tree is more straightforward than building four different ones, especially when there is a specific build/install ordering dependency and a new build could break a currently installed version. The current combined tree will ensure that everything builds and installs with the same library versions.

BUILDING CODA

Dependencies

Coda requires a working C/C++ development environment with gcc, gcc-c++, autotools, libtool, automake, pkg-config, flex, and bison. We require development headers for readline, ncurses5, and optionally the lua5.1 library.

On Redhat/Fedora/CentOS systems

yum install gcc gcc-c++ autoconf automake libtool pkgconfig flex bison \
    readline-devel ncurses5-devel lua-devel clang

On Debian/Ubuntu and derived systems

apt-get install build-essential automake libtool pkg-config flex bison \
    libreadline-dev libncurses5-dev liblua5.1-0-dev clang-format-6.0 valgrind \
    python3-attr python3-setuptools

Build

./bootstrap.sh
./configure --prefix=/usr --with-lua
make
sudo make install

RUNNING CODA

Configuring the Coda client

You need a configuration file in /etc/coda/venus.conf. The quickest way to get started is to run sudo venus-setup which will copy an example file with a suggested configuration, it will also create the directories that Coda uses for the local file cache and logs.

The first time the Coda client is started we need to force it to clean and initialize its 'recoverable virtual memory' (persistent state), this is done by running sudo venus -init.

Running the Coda client

The Coda client needs access to the file system services provided by the 'coda' kernel module, so to successfully start the client we have to make sure this module is loaded first. Once the kernel module is available, the client should be able to start and will automatically start running in the background as soon as it successfully mounts the file system on /coda.

sudo modprobe coda
sudo venus

Initially nothing will be visible under the /coda mountpoint, however any lookup for a Coda realm name, either through the file system, or through obtaining Coda credentials, will lead to a Coda server discovery request that, when successful, will make a permanent realm root appear.

$ ls /coda/testserver.coda.cs.cmu.edu
$ clog [email protected]
password: guest
$ ls /coda
testserver.coda.cs.cmu.edu

Because Coda persists its state in recoverable memory, the root will be visible even when Coda is restarted. To cleanly shut down the system, first unmount the file system and only then stop the daemon process, this way if any process has open references to files in Coda the unmount will fail and we avoid lost data.

sudo umount /coda && sudo killall venus

Configuring the Coda server

TBD

DEVELOPMENT

Pre-commit checks are run with the pre-commit framework, which is not automatically installed. You can install the pre-commit hooks with

pip3 install --user pre-commit
pre-commit install

It will automatically check and/or correct code-formatting and other issues every time a commit is made.

Although the source of LWP, RPC2, and RVM has been merged back into the main Coda repository, we are still trying to keep them mostly independent. This means that they retain their own build infrastructure and library versioning.

When updating supporting library sources make sure to properly follow the libtool library versioning guidelines. The version info is set using the CODA_LIBRARY_VERSION macro in configure.ac and consists of current:revision:age values which update according to the following basic rules.

  • If the library source code has changed at all since the last update, then increment revision (โ€˜c:r:aโ€™ becomes โ€˜c:r+1:aโ€™)
  • If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
  • If any interfaces have been added since the last public release, then increment age.
  • If any interfaces have been removed or changed since the last public release, then set age to 0.

Aside from this, we try to minimize overall version number changes so we skip updating if the corresponding version number change has already been applied since the last tagged stable release. This is different from libtool guidelines where they suggest updating only immediately before a public release, although in practice that is typically what happens.

Version updates are easily forgotten right before a release so it is better to update early, there is a helper script tools/version_check.sh that will show if there are any changes to the libraries. Developers don't have to care as much because they can run their binaries directly from the build tree in which case libtool will make sure the right library is used.

Tracing RVM transactions

Although RVM in general is (should be?) able to deal with multiple threads, the particular usage in the Coda client and server is single thread only. So there are a few strict requirements.

  • We must have an active RVM transaction whenever we modify data that was allocated in RVM and that we want to persist across application restarts.
  • We cannot begin a new transaction while there is an active one.
  • We should not yield our LWP thread during a transaction, because we don't know if another scheduled thread might need to start a new transaction.

Some of these constraints are now declared for function prototypes by using annotations REQUIRES_TRANSACTION, EXCLUDES_TRANSACTION, etc. These annotations can then be validated by using clang's thread safety analysis.

./configure CC=clang CXX=clang++
make

There will be compiler warnings that indicate when functions or methods are called in the wrong context, when transactions are not terminated in all possible exit branches from a function, etc.

More Repositories

1

openface

Face recognition with deep neural networks.
Lua
14,985
star
2

mega-nerf

Python
436
star
3

OpenTPOD

Open Toolkit for Painless Object Detection
CSS
118
star
4

gabriel

Wearable cognitive assistance using cloudlets
Java
65
star
5

diamond-android

Android library for running Diamond filters
C
56
star
6

elijah-cloudlet

Elijah cloudlet system
43
star
7

mega-nerf-viewer

C++
43
star
8

faceswap

Demo Application for Cloudlet
Java
34
star
9

vmnetx

Virtual Machine Network Execution
Python
31
star
10

elijah-openstack

Elijah OpenStack integration
Python
27
star
11

openrtist

Live video frames from the camera are stylized to look like famous paintings.
Java
22
star
12

deltaic

An efficient backup system supporting multiple data sources
Python
21
star
13

wireguard-tools

Pure python reimplementation of wireguard-tools
Python
19
star
14

opendiamond

Interactive search of non-indexed data
Python
19
star
15

elijah-provisioning

Cloudlet provisioning using VM synthesis
Python
18
star
16

gammaray

Distributed Streaming Virtual Machine Introspection
C
16
star
17

dronesearch

Bandwidth-efficient Live Video Analytics for Drones via Edge Computing
Python
13
star
18

vmnetx-android

VMNetX for Android
Java
8
star
19

openscout

Distributed Automated Situational Awareness
Python
7
star
20

change-detection

Python
6
star
21

nephele

nephele is a CLI utility that provides capabilities to create, manage, and migrate KVM virtual machines over the wide-area network.
JavaScript
6
star
22

optviewer

Web viewer for 3D data in image stacks
HTML
5
star
23

sinfonia

Manage discovery of cloudlets and deployment of backends for edge-native applications
Python
4
star
24

elijah-discovery-basic

Basic cloudlet registration and discovery
Python
4
star
25

steeleagle

Automated drone flights for visual inspection tasks
Python
4
star
26

matlabfind

MATLAB filter for OpenDiamond
C
3
star
27

PyEdgeSim

Python
3
star
28

hyperfind

Generic image search application for OpenDiamond
Java
3
star
29

diamond-core-filters

Common filters used by Diamond applications
C
3
star
30

GigaSight

GigaSight project
Java
2
star
31

gabriel-lego

Python
2
star
32

minirpc

A TCP-based remote procedure call library
C
2
star
33

diamond-example

Diamond example code
Python
2
star
34

isr-next

OpenISR reimagined on the VMNetX codebase
Python
2
star
35

gabriel-ikea

Wearable Cognitive Assistant for assembling an Ikea lamp
Python
2
star
36

quiltview

Crowd-sourced, query-driven video of the real world via Google Glass
Python
2
star
37

kimberley

Transient customization of mobile computing infrastructure
C
2
star
38

vmnetx-packaging

Distribution packaging for VMNetX
Shell
2
star
39

linux-coda

Coda kernel module to build out-of-tree for Linux kernels
C
2
star
40

coda-packaging

Packaging files for Coda releases
Shell
2
star
41

dermshare

DermShare web application and filters
Python
2
star
42

coda-git-conversion

Scripts and files to assist in the conversion of the Coda CVS repositories to Git
Python
2
star
43

cloudlet-launcher

Java
2
star
44

strangefind

A Diamond anomaly detection application
Java
2
star
45

opendiamond-java

Java client library for OpenDiamond
Java
2
star
46

django-s3

Amazon S3 storage for Django
Python
1
star
47

sinfonia-tier3

Manage discovery of cloudlets and deployment of backends for edge-native applications
Python
1
star
48

gabriel-instruction

Clients for wearable cognitive assistance applications that provide instructions
C#
1
star
49

sec19-scalable-edge-native-applications

Towards scalable edge-native applications
Jupyter Notebook
1
star
50

opentpod-tools

Collection of command line tools to assist with extracting, merging, and training datasets from a CVAT installation.
Python
1
star
51

coda-doc

Source for the Coda Distributed File System's documentation
PostScript
1
star
52

gabriel-pingpong

Python
1
star
53

quetzal

Detection of Tunable and Explainable Salient Changes
Python
1
star
54

gabriel-python-common

Python
1
star
55

gabriel-stirling-engine

Wearable Cognitive Assistant for Stirling Engine
Java
1
star
56

NetworkLatencySegmentation

Python
1
star
57

gmapview

Python
1
star
58

OpenWorkflow

A suite of tools for creating wearable cognitive assistants.
JavaScript
1
star
59

rtface

Cloudlet-based Privacy Mediator
Python
1
star
60

openisr

Internet Suspend/Resume
C
1
star