GithubHelp home page GithubHelp logo

dms-prototype's Introduction

DMS-prototype - TMT Data Management System

This repository begins the implementation of the TMT Data Management System (DMS). This repository contains protyping code that addresses risks during the DMS final design phase. A different repository will be used for the full development phase in the future.

Quick Setup:

Pre-requisite

Postgres should be installed on your machine with postgres database, for more details refer csw docs

Start required csw services ( Location Service, Event Service and Database Service)

cs launch csw-services:4.0.0-M1 -- start -e -d

Start DMS Metadata Access Service and Collection Job

cs launch dms-services:commitSHA -- start -p 9999
  • Additionally, if required, add -i argument to initialize database
To pass external configurations use --keywords-conf and --keyword-mappings-conf argument.
  • Argument --keyword-mappings-conf should be repeated to pass mappings for each subsystem separately and should follow file name convention like {subsystem}-keyword-mappings.conf. e.g. IRIS-keyword-mappings.conf
cs launch dms-services:commitSHA -- start -p 9999 --keywords-conf "/path/to/header-keywords.conf" --keyword-mappings-conf "/path/to/IRIS-keyword-mappings.conf" --keyword-mappings-conf "/path/to/WFOS-keyword-mappings.conf"

These can be standalone config files or composed config files written in HOCON format, for more details around what configurations are expected in these files refer existing access service resource files and collection service resource files.


Detailed Manual Setup:

Start Event Service and Database Service

cs launch csw-services:4.0.0-M1 -- start -e -d

Start postgres db server

User should have postgres server installed with postgres database and dmsuser user created.

Login to postgres from command line
psql -d postgres -h localhost -p 5432 -U dmsuser
create snapshots table and index
create table event_snapshots
(
    exposure_id    varchar(50) not null,
    obs_event_name varchar(50) not null,
    source         varchar(50) not null,
    eventname      varchar(50) not null,
    eventid        varchar(50) not null,
    eventtime      timestamp   not null,
    paramset       text
);


create index idx_exposure_id
    on event_snapshots (exposure_id);
create Keywords table and index
create table keyword_values
(
    exposure_id varchar(50) not null,
    keyword     varchar(50) not null,
    value       varchar(50) not null
);

create index idx_hdr_exposure_id
    on keyword_values (exposure_id);

Running Code:

Start Observe and other event Publisher

src/test/scala/simulator/PublisherAppWithPerfLikeSetup.scala

Start collection service:

src/main/scala/dms/metadata/collection/Main.scala

Note: You should see some data populated in tables : keyword_values and event_snapshots

Run access service:

src/main/scala/dms/metadata/access/HttpServer.scala

Test Api

Copy any exposureId from table : keyword_values, update apptest.http with ip, port and exp-id to do a get call

dms-prototype's People

Contributors

i-am-chauhan avatar kgillies avatar kpritam avatar mertia-himanshu avatar mushtaq avatar shubhamjay avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dms-prototype's Issues

Design and Prototype Metadata Collection (40%)

Metadata Service is a critical DMS service. This epic supports the prototyping of this DMS.SCI subsystem.

All issues and tasks related to the Metadata Collection prototyping should be contained within this epic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.