Skip to content
Santanu edited this page Jun 1, 2014 · 13 revisions

##What is it? Foxtrot is a multi-tiered database optimized for storing, querying and analyzing real time events. It uses HBase as it's primary data-source and uses Elasticsearch to help querying and analyzing the data. Foxtrot uses a distributed caching layer with time-dependent mutating hash keys to optimize data access by visualization widgets on consoles. The system provides a configurable widget based console builder that can be used to build, save and share consoles for use across teams.

##Basic constructs Foxtrot is based on the following very simple constructs.

###Table A table is a container used to logically namespace data coming in from multiple application domains. It maps to simple table constructs in traditional database systems. Tables can be managed using the Table management APIs.

###Document A document is the basic construct to represent an event in foxtrot. Every document consists of three fields:

id - The unique identified used to identify the event inside the table.

timestamp - This represents the time associated with the event. This is auto-generated by the system if not given during ingestion. This is the primary field of interest in all time based analytics like histogram and trends.

data - The body of the event. Consists of fields and objects associated with them. Must be a valid json object.

{
    "id" : "569b3782-255b-48d7-a53f-7897d605db0b", //ID of the event (not-null)
    "timestamp" : 1401650819000,                   //Persistence time in milli-seconds (default: Current time)
    "data" : {                                     //The event (not-null)
        "header" : {
            "evnetType" : "APP_LOAD",
            "os" : "android",
            "device" : "XperiaZ"
        },
        "data" : {
            "appVersion" : {
                "major" : "1",
                "minor" : "01"
            },
            "deviceTime" : 1401650817000
        }
    }
}

##Quick Start The following gives pointers on how to run and work with foxtrot. We assume that you have working HBase and elasticsearch clusters.

  • Clone the code from github

    $git clone [email protected]:flipkart-incubator/foxtrot.git

  • Build and using maven3

    $mvn install

Note This takes a long time to build due to large number of test-cases. To skip tests (not-recommended) add the "-DskipTests" flag to the above command.

  • Edit configuration file to fit your needs. We assume you have created a config called production.yml in config/ directory.

  • Start the service

    java -Dfile.encoding=utf-8 foxtrot-server/target/foxtrot-server-0.1.jar server config/production.yml

  • To push events use the even ingestion APIs. See the Event Ingestion page for API details.

  • See Using the data in Foxtrot to understand how to access your data.