You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backends.rst
+6-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,12 @@
1
1
Backends
2
2
========
3
3
4
-
Backends connect users to DSI Core middleware and backends allow DSI middleware data structures to read and write to persistent external storage. Backends are modular to support user contribution. Backend contributors are encouraged to offer custom backend abstract classes and backend implementations. A contributed backend abstract class may extend another backend to inherit the properties of the parent. In order to be compatible with DSI core middleware, backends should create an interface to Python built-in data structures or data structures from the Python ``collections`` library. Backend extensions will be accepted conditional to the extention of ``backends/tests`` to demonstrate new Backend capability. We can not accept pull requests that are not tested.
4
+
Backends connect users to DSI Core middleware and backends allow DSI middleware data structures to read and write to persistent external storage.
5
+
Backends are modular to support user contribution. Backend contributors are encouraged to offer custom backend abstract classes and backend implementations.
6
+
A contributed backend abstract class may extend another backend to inherit the properties of the parent.
7
+
In order to be compatible with DSI core middleware, backends should create an interface to Python built-in data structures or data structures from the Python ``collections`` library.
8
+
Backend extensions will be accepted conditional to the extention of ``backends/tests`` to demonstrate new Backend capability.
9
+
We can not accept pull requests that are not tested.
5
10
6
11
Note that any contributed backends or extensions should include unit tests in ``backends/tests`` to demonstrate the new Backend capability.
Copy file name to clipboardExpand all lines: docs/contributing_readers.rst
+5-4
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
Making a Reader for Your Application
3
3
====================================
4
4
5
-
DSI readers are the primary way to transform outside data to metadata that DSI can ingest. Readers are Python classes that must include a few methods, namely ``__init__``, ``pack_header``, and ``add_rows``.
5
+
DSI readers are the primary way to transform outside data to metadata that DSI can ingest.
6
+
Readers are Python classes that must include a few methods, namely ``__init__``, ``pack_header``, and ``add_rows``.
6
7
7
8
Initializer: ``__init__(self) -> None:``
8
9
-------------------------------------------
@@ -65,13 +66,13 @@ Example alternate ``add_rows``: ::
65
66
my_data["joey"] = 20
66
67
my_data["amy"] = 30
67
68
68
-
self.set_schema2(my_data)
69
+
self.set_schema_2(my_data)
69
70
70
71
Implemented Examples
71
72
--------------------------------
72
73
If you want to see some full reader examples in-code, some can be found in
Copy file name to clipboardExpand all lines: docs/core.rst
+8-3
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,17 @@
1
1
Core
2
2
====
3
3
4
-
The DSI Core middleware defines the Terminal concept. An instantiated Terminal is the human/machine DSI interface. The person setting up a Core Terminal only needs to know how they want to ask questions, and what metadata they want to ask questions about. If they don’t see an option to ask questions the way they like, or they don’t see the metadata they want to ask questions about, then they should ask a Backend Contributor or a Plugin Contributor, respectively.
4
+
The DSI Core middleware defines the Terminal concept. An instantiated Terminal is the human/machine DSI interface.
5
+
The person setting up a Core Terminal only needs to know how they want to ask questions, and what metadata they want to ask questions about.
6
+
If they don’t see an option to ask questions the way they like, or they don’t see the metadata they want to ask questions about, then they should ask a Backend Contributor or a Plugin Contributor, respectively.
5
7
6
8
Core: Terminal
7
9
--------------
8
10
9
-
The Terminal class is a structure through which users can interact with Plugins (Readers/Writers) and Backends as "module" objects. Each reader/writer/backend can be "loaded" to make ready for use and users can further interact with backends by ingesting, querying, or processing data as well as generating an interactive notebook with data. All relevant functions have been listed below for further clarity.
11
+
The Terminal class is a structure through which users can interact with Plugins (Readers/Writers) and Backends as "module" objects.
12
+
Each reader/writer/backend can be "loaded" to make ready for use and users can further interact with backends by ingesting, querying, processing, or finding data as well as generating an interactive notebook with data.
13
+
14
+
All relevant functions have been listed below for further clarity. Examples section displays various workflows using this Terminal class.
10
15
11
16
Notes for users:
12
17
- All plugin writers that are loaded must be followed by calling transload() after to execute them. Readers are automatically executed upon loading.
@@ -44,7 +49,7 @@ Example 3: Querying data from a backend
44
49
45
50
.. literalinclude:: ../examples/core/query.py
46
51
47
-
Example 4: Processing data from a backend to generate an Entity Relationship diagram
52
+
Example 4: Processing data from a backend to generate an Entity Relationship diagram using a Writer
This will generate a wildfire.cdb folder with downloaded images from the server and a data.csv file of numerical properties of interest. This cdb folder is called a `Cinema`_ database (CDB). Cinema is an ecosystem for management and analysis of high dimensional data artifacts that promotes flexible and interactive data exploration and analysis. A Cinema database is comprised of a CSV file where each row of the table is a data element (a run or ensemble member of a simulation or experiment, for example) and each column is a property of the data element. Any column name that starts with 'FILE' is a path to a file associated with the data element. This could be an image, a plot, a simulation mesh or other data artifact.
The goal of the Data Science Infrastructure Project (DSI) is to manage data through metadata capture and curation.
5
+
DSI capabilities can be used to develop workflows to support management of simulation data, AI/ML approaches, ensemble data, and other sources of data typically found in scientific computing.
2
6
3
-
4
-
The goal of the Data Science Infrastructure Project (DSI) is to manage data through metadata capture and curation. DSI capabilities can be used to develop workflows to support management of simulation data, AI/ML approaches, ensemble data, and other sources of data typically found in scientific computing. DSI infrastructure is designed to be flexible and with these considerations in mind:
5
-
6
-
- Data management is subject to strict, POSIX-enforced, file security.
7
-
- DSI capabilities support a wide range of common metadata queries.
8
-
- DSI interfaces with multiple database technologies and archival storage options.
9
-
- Query-driven data movement is supported and is transparent to the user.
10
-
- The DSI API can be used to develop user-specific workflows.
7
+
DSI infrastructure is designed to be flexible and with these considerations in mind:
8
+
- Data management is subject to strict, POSIX-enforced, file security.
9
+
- DSI capabilities support a wide range of common metadata queries.
10
+
- DSI interfaces with multiple database technologies and archival storage options.
11
+
- Query-driven data movement is supported and is transparent to the user.
12
+
- The DSI API can be used to develop user-specific workflows.
11
13
12
14
.. figure:: data_lifecycle.png
13
15
:alt:Figure depicting the data life cycle
14
16
:class:with-shadow
15
17
:scale:50%
16
18
17
-
A depiction of data life cycle can be seen here. The Data Science Infrastructure API supports the user to manage the life cycle aspects of their data.
19
+
A depiction of data life cycle can be seen here. The DSI API supports the user to manage the life cycle aspects of their data.
18
20
19
-
DSI system design has been driven by specific use cases, both AI/ML and more generic usage. These use cases can often be generalized to user stories and needs that can be addressed by specific features, e.g., flexible, human-readable query capabilities. DSI uses Object Oriented design principles to encourage modularity and to support contributions by the user community. The DSI API is Python-based.
21
+
DSI system design has been driven by specific use cases, both AI/ML and more generic usage.
22
+
These use cases can often be generalized to user stories and needs that can be addressed by specific features, e.g., flexible, human-readable query capabilities.
23
+
DSI uses Object Oriented design principles to encourage modularity and to support contributions by the user community. The DSI API is Python-based.
20
24
21
25
Implementation Overview
22
-
=======================
26
+
-----------------------
23
27
24
28
The DSI API is broken into three main categories:
25
29
@@ -28,19 +32,19 @@ The DSI API is broken into three main categories:
28
32
- DSI Core: the *middleware* that contains the basic functionality to use the DSI API.
29
33
30
34
Plugin Abstract Classes
31
-
-----------------------
35
+
~~~~~~~~~~~~~~~~~~~~~~~
32
36
33
-
Plugins transform an arbitrary data source into a format that is compatible with the DSI core. The parsed and queryable attributes of the data are called *metadata* -- data about the data. Metadata share the same security profile as the source data.
37
+
Plugins transform an arbitrary data source into a format that is compatible with the DSI core.
38
+
The parsed and queryable attributes of the data are called *metadata* -- data about the data. Metadata share the same security profile as the source data.
34
39
35
-
Plugins can operate as data readers or data writers. A simple data reader might parse an application's output file and place it into a core-compatible data structure such as Python built-ins and members of the popular Python ``collection`` module. A simple data writer might execute an application to supplement existing data and queryable metadata, e.g., adding locations of outputs data or plots after running an analysis workflow.
40
+
Plugins can operate as data readers or data writers.
41
+
A simple data reader might parse an application's output file and place it into a core-compatible data structure such as Python built-ins and members of the popular Python ``collection`` module.
42
+
A simple data writer might execute an application to supplement existing data and queryable metadata, e.g., adding locations of outputs data or plots after running an analysis workflow.
36
43
37
44
Plugins are defined by a base abstract class, and support child abstract classes which inherit the properties of their ancestors.
38
45
39
46
Currently, DSI has the following readers:
40
47
41
-
- CSV file reader: reads in comma separated value (CSV) files.
42
-
- Bueno reader: can be used to capture performance data from `Bueno <https://github.com/lanl/bueno>`_.
43
-
44
48
.. figure:: PluginClassHierarchy.png
45
49
:alt:Figure depicting the current plugin class hierarchy.
46
50
:class:with-shadow
@@ -49,27 +53,32 @@ Currently, DSI has the following readers:
49
53
Figure depicting the current DSI plugin class hierarchy.
50
54
51
55
Backend Abstract Classes
52
-
------------------------
56
+
~~~~~~~~~~~~~~~~~~~~~~~
53
57
54
58
Backends are an interface between the core and a storage medium.
55
-
Backends are designed to support a user-needed functionality. Given a set of user metadata captured by a DSI frontend, a typical functionality needed by DSI users is to query that metadata by SQL query. Because the files associated with the queryable metadata may be spread across filesystems and security domains, a supporting backend is required to assemble query results and present them to the DSI core for transformation and return.
59
+
Backends are designed to support a user-needed functionality.
60
+
Given a set of user metadata captured by a DSI frontend, a typical functionality needed by DSI users is to query that metadata by SQL query.
61
+
Because the files associated with the queryable metadata may be spread across filesystems and security domains,
62
+
a supporting backend is required to assemble query results and present them to the DSI core for transformation and return.
56
63
57
64
.. figure:: user_story.png
58
65
:alt:This figure depicts a user asking a typical query on the user's metadata
59
66
:class:with-shadow
60
67
:scale:50%
61
68
62
-
In this typical **user story**, the user has metadata about their data stored in DSI storage of some type. The user needs to extract all files with the variable **foo** above a specific threshold. DSI backends query the DSI metadata store to locate and return all such files.
69
+
In this typical **user story**, the user has metadata about their data stored in DSI storage of some type.
70
+
The user needs to extract all files with the variable **foo** above a specific threshold.
71
+
DSI backends query the DSI metadata store to locate and return all such files.
63
72
64
73
Current DSI backends include:
65
74
66
-
- Sqlite: Python based SQL database and backend; the default DSI API backend.
67
-
- GUFI: the Grand Unified File Index system `Grand Unified File-Index <https://github.com/mar-file-system/GUFI>`_ ; developed at LANL, GUFI is a fast, secure metadata search across a filesystem accessible to both privileged and unprivileged users.
75
+
- SQLite: Python based SQL database and backend; the default DSI API backend.
76
+
- GUFI: the `Grand Unified File Index system <https://github.com/mar-file-system/GUFI>`_ ; developed at LANL. GUFI is a fast, secure metadata search across a filesystem accessible to both privileged and unprivileged users.
68
77
- Parquet: a columnar storage format for `Apache Hadoop <https://hadoop.apache.org>`_.
69
78
70
79
DSI Core
71
-
--------
72
-
73
-
DSI basic functionality is contained within the middleware known as the *core*. The DSI core is focused on delivering user-queries on unified metadata which can be distributed across many files and security domains. DSI currently supports Linux, and is tested on RedHat- and Debian-based distributions. The DSI core is a home for DSI Plugins and an interface for DSI Backends.
80
+
~~~~~~~~
74
81
75
-
Core Documentation
82
+
DSI basic functionality is contained within the middleware known as the *core*.
83
+
The DSI core is focused on delivering user-queries on unified metadata which can be distributed across many files and security domains.
84
+
DSI currently supports Linux, and is tested on RedHat- and Debian-based distributions. The DSI core is a home for DSI Plugins and an interface for DSI Backends.
Copy file name to clipboardExpand all lines: docs/plugins.rst
+3-3
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Note that any contributed plugins or extension should include unit tests in ``p
11
11
:class:with-shadow
12
12
:scale:100%
13
13
14
-
Figure depicts the current DSI plugin class hierarchy.
14
+
Figure depicts prominent portion of the current DSI plugin class hierarchy.
15
15
16
16
.. automodule:: dsi.plugins.plugin
17
17
:members:
@@ -29,15 +29,15 @@ Note for users:
29
29
- Plugin readers in DSI repo can/should handle data files with mismatched number of columns. Ex: file1: table1 has columns a, b, c. file2: table1 has columns a, b, d
30
30
31
31
- if only reading in one table, users can utilize python pandas to stack mulutiple dataframes vertically (CSV reader)
32
-
- if ingesting multiple tables at a time, users must pad tables with null data (YAML1 and TOML1 use this. YAML1 has example code at bottom of add_row())
32
+
- if ingesting multiple tables at a time, users must pad tables with null data (YAML1 uses this and has example code at bottom of add_row() to implement this)
33
33
.. automodule:: dsi.plugins.file_reader
34
34
:members:
35
35
36
36
File Writers
37
37
------------
38
38
39
39
Note for users:
40
-
- If runTable flag is True in Terminal instantiaton, the run table is only included in ER Diagram writer if data is processed from a backend. View Example 4 in Core Examples
40
+
- If runTable flag is True in Terminal instantiation, the run table is only included in ER Diagram writer if data is processed from a backend. View Example 4 in Core Examples
0 commit comments