• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated almost 3 years ago

Reviews

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

Repository Details

A web interface for Apache Cassandra

Cassandra Web

A web interface to Apache Cassandra with AngularJS and server-sent events.

Installation

gem install cassandra-web

Usage

Run cassandra-web -h for help.

Quick Start

cassandra-web

Connect to a Cassandra Cluster requiring authentication

cassandra-web --hosts '10.0.2.2' --port '9042' --username 'cassweb' --password 'myPassword'

How it works

Cassandra web consists of an HTTP API powered by Sinatra and a thin HTML5/JavaScript frontend powered by AngularJS.

When you run cassandra-web script, it starts a Thin web server on a specified address, which defaults to localhost:3000. Openning http://localhost:3000, or whatever address you've specified in the browser, loads the AngularJS application and it starts interacting with the HTTP API of cassandra-web. This api uses the Ruby Driver to communicate with an Apache Cassandra cluster.

When the frontend has fully loaded, it subscribes to /events API endpoint, and begins receiving Server Sent Events. The API uses an event listener, which is registered with the Cluster instance created by the Ruby Driver, to stream events such as schema and node status changes to update the user interface without having to refresh the page.

You can see this feature in action by creating a keyspace using the execute button in the top-right corner of the UI and executing the following statement:

CREATE KEYSPACE example WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}

If the statement executed successfully, you should see a new keyspace show up on the left side of the UI.

Alt text

The web server, Thin, used by cassandra-web is asynchronous and uses only a single thread to handle requests. This enables efficient handling multiple of long running connections, which is a requirement for streaming and Server Sent Events, but also means that the application cannot perform blocking operations during request handling, since it would hang up all connections for the duration of the blocking operation. cassandra-web therefore uses Asynchronous Execution feature of the Ruby Driver to not block on statements execution. The application executes statements asynchronously, receiving a future from the Ruby Driver. It then registers future completion listeners to send a response (or error) whenever it becomes available.

Credits

Cassandra web is possible because of the following awesome technologies (in no particular order):

More Repositories

1

AvalancheImagineBundle

Image manipulation using Imagine and Twig Filters
PHP
319
star
2

symfony-docs-ru

Russian translation of Symfony2 documentations
82
star
3

doxphp

Dox for PHP, inspired by Dox for JavaScript
PHP
51
star
4

uvrb

Ruby bindings for libuv
Ruby
41
star
5

AvalancheSitemapBundle

SitemapBundle Reloaded
PHP
32
star
6

Transform

Object Transformation Library for PHP 5.3 In a need to map object data from one system to another, I was always using temporary, throw-away solutions, which turned out to be pretty ugly. PHP 5.3 Reflection API changes the game...
PHP
20
star
7

twilio-magento

This module integrates Twilio in Magento
PHP
15
star
8

node-console

a terminal in the browser
JavaScript
14
star
9

MicroKernelBundle

A micro kernel for Symfony 2, inspired by the Ruby Sinatra Web Framework
PHP
11
star
10

node-tinyurl

A tinyurl application implemented with NodeJS and MongoDB
JavaScript
8
star
11

ServerBundle

Symfony 2 HTTP webserver (PHP 5.3 only -- everything is HIGHLY EXPERIMENTAL -- things WILL change)
PHP
7
star
12

datastax-is-hiring

Come work with me on the most advanced clients for the most advanced distributed database
7
star
13

homebrew-rpmbuild

homebrew tap to provide rpmbuild formula
Ruby
7
star
14

nrperb

Execute nagios remote plugins from ruby
Ruby
5
star
15

inspector

a ruby validation library
Ruby
5
star
16

frank

an honest HTTP DSL for Ruby
Ruby
5
star
17

PHP-Stomp-Queue

A Stomp Protocol Queue adapter for Zend_Queue, more unit-tests, 'no-local' header, php 5.3 based
PHP
4
star
18

cli

Small Ruby command line tools library shared by various projects
Ruby
4
star
19

mastermind

The game of mastermind in Rails
Ruby
4
star
20

homebrew-juju

Central place for all the OSX Brew juju Tools
Ruby
2
star
21

data_structures

implementing various data structures
JavaScript
1
star
22

sinatra-rabbit

Rabbit is a Sinatra DSL extension for writing REST API's
Ruby
1
star
23

rdaux

RDaux creates beautiful documentation websites from markdown files
JavaScript
1
star
24

zeromqrb

Tiny wrapper around ffi-rzmq that raises errors
Ruby
1
star
25

uvmemcached

libuv memcached client and ruby bindings
C
1
star