Skip to content

ElasticSearch Schema

Sebastin Santy edited this page Apr 29, 2017 · 4 revisions

Current Implementation

This particular wiki page focuses on the currently implemented elasticsearch schema along with creation of tables corresponding to a schema. At the beginning only one index protocol is present

  1. When a user signs up (from the LoginView page), the protocol.credentials table is updated. The structure of protocol.credentials is of the form:
{
   "_index": "protocol",
   "_type": "credentials",
   "_id": "AVs9hj0my_m_18GwT3l7",
   "_score": 1,
   "_source": {
      "id": "AVs9hj0my_m_18GwT3l7",
      "email": "abc@xyz.com",
      "password": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
      "loginHash": "48cabcc4c3718bc11e3c11fde944edb818780a78013dcb9b66438921ac402311"
    }
}
  1. When an experiment is initiated(from the ExperimentView page), the protocol.info is updated (from the client-side, an extra field collaborators is added). The structure of protocol.info is of the form:
{
   "_index": "protocol",
   "_type": "info",
   "_id": "AVs9iYBJy_m_18GwT3l9",
   "_score": 1,
   "_source": {
      "id": null,
      "experimentName": "DNS_01",
      "description": "Analysing DNS Traffic PCAP",
      "experimenter": "Josh",
      "pcapPath": "/home/vagrant/darshini/data/packet/DNS_Traffic000.pcap",
      "collaborators": ""
      }
}
  1. ConfigPlaygroundView doesn't contribute to any changes in the elasticsearch tables. This view is only for checking the validity of the graphs being uploaded.

  2. When the Analyze button is clicked on the previous page, a new index is created of the form protocol_session_<SESSIONID> where the SESSIONID is provided from the backend. It has multiple tables (eg. ethernet) and all the anaylsis pertaining to this particular experiment is stored in this index. The structure of tables created are of the form:

{
   "_index": "protocol_session_-1632495948",
   "_type": "ethernet",
   "_id": "1",
   "_score": 1,
   "_source": {
      "packetId": 1,
      "ethertype": "0800",
      "dst_addr": "00:00:0c:07:ac:52",
      "src_addr": "78:84:3c:b0:ae:2b"
      }
}

Note: As can be seen from the above specified tables, there is no mapping between the protocol.info and protocol_session_* tables. This needs to be resolved. Issue #59 Completed

  1. When Load Experiment is clicked on the experiment page, the LoadView Page opens. On clicking a particular row, and then clicking Share after selecting the number of people, the protocol.info table's collaborators field is updated. Also the page reloads, in order to facilitate, a fresh global data for the collaborators.

Collaboration Work

BITS-Darshini is planned to be collaborative in nature. For that, a table protocol.delegate is desired , with these probable fields:

As suggested above, at present table protocol.info is updated with collaborators. This is in order to avoid unnecessary multiple requests to elasticsearch.

Clone this wiki locally