Jazz 1.26.+
Loading...
Searching...
No Matches
core.h
1/* Jazz (c) 2018-2026 kaalam.ai (The Authors of Jazz), using (under the same license):
2
3 1. Biomodelling - The AATBlockQueue class (c) Jacques BasaldĂșa, 2009-2012 licensed
4 exclusively for the use in the Jazz server software.
5
6 Copyright 2009-2012 Jacques BasaldĂșa
7
8 2. BBVA - Jazz: A lightweight analytical web server for data-driven applications.
9
10 Copyright 2016-2017 Banco Bilbao Vizcaya Argentaria, S.A.
11
12 This product includes software developed at
13
14 BBVA (https://www.bbva.com/)
15
16 3. LMDB, Copyright 2011-2017 Howard Chu, Symas Corp. All rights reserved.
17
18 Licensed under http://www.OpenLDAP.org/license.html
19
20
21 Licensed under the Apache License, Version 2.0 (the "License");
22 you may not use this file except in compliance with the License.
23 You may obtain a copy of the License at
24
25 http://www.apache.org/licenses/LICENSE-2.0
26
27 Unless required by applicable law or agreed to in writing, software
28 distributed under the License is distributed on an "AS IS" BASIS,
29 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 See the License for the specific language governing permissions and
31 limitations under the License.
32*/
33
34
35#include "src/jazz_core/snippet.h"
36
37#if defined CATCH_TEST
38#ifndef INCLUDED_JAZZ_CATCH2
39#define INCLUDED_JAZZ_CATCH2
40
41#include "src/catch2/catch.hpp"
42
43#endif
44#endif
45
46
47#ifndef INCLUDED_JAZZ_BEBOP_CORE
48#define INCLUDED_JAZZ_BEBOP_CORE
49
50
56namespace jazz_core
57{
58
59using namespace jazz_elements;
60
61
89class Core : public BaseAPI {
90
91//TODO: Synchronize http://localhost:8888/jazz_reference/api_ref_core.html (Erase this only when Core is done.)
92//TODO: Use SNIPPET_STORAGE_ENTITY
93//TODO: Use ONNXRT_MAX_NUM_SESSIONS
94
95 public:
96
97 Core(pLogger a_logger, pConfigFile a_config, pChannels a_channels, pVolatile a_volatile, pPersisted a_persisted);
98 ~Core();
99
100 virtual pChar const id();
101
102 StatusCode start ();
104
105 virtual void base_names(BaseNames &base_names);
106
107 // API Container interface: (see docstring)
108
109 virtual StatusCode new_entity (pChar p_where);
110 virtual StatusCode new_entity (Locator &where);
111 virtual StatusCode put (pChar p_where,
112 pBlock p_block,
113 int mode = WRITE_AS_BASE_DEFAULT);
114 virtual StatusCode put (Locator &where,
115 pBlock p_block,
116 int mode = WRITE_AS_BASE_DEFAULT);
117 virtual StatusCode remove (pChar p_where);
118 virtual StatusCode remove (Locator &where);
119 virtual StatusCode header (StaticBlockHeader &hea,
120 pChar p_what);
121 virtual StatusCode header (pTransaction &p_txn,
122 pChar p_what);
123 virtual StatusCode header (StaticBlockHeader &hea,
124 Locator &what);
125 virtual StatusCode header (pTransaction &p_txn,
126 Locator &what);
127 virtual StatusCode get (pTransaction &p_txn,
128 pChar p_what);
129 virtual StatusCode get (pTransaction &p_txn,
130 pChar p_what,
131 pBlock p_row_filter);
132 virtual StatusCode get (pTransaction &p_txn,
133 pChar p_what,
134 pChar name);
135 virtual StatusCode get (pTransaction &p_txn,
136 Locator &what);
137 virtual StatusCode get (pTransaction &p_txn,
138 Locator &what,
139 pBlock p_row_filter);
140 virtual StatusCode get (pTransaction &p_txn,
141 Locator &what,
142 pChar name);
143 virtual StatusCode exec (pTransaction &p_txn,
144 Locator &function,
145 pTuple p_args);
146 virtual StatusCode modify (Locator &function,
147 pTuple p_args);
148
149 private:
150
151 // DataSpaces data_spaces; ///< The data spaces.
152 // Fields fields; ///< The fields.
153 // Bop bop; ///< The Bop compiler.
154};
155typedef Core *pCore;
156
157
158#ifdef CATCH_TEST
159
160// Instancing Core
161// -----------------
162
163extern Core COR;
164
165#endif
166
167} // namespace jazz_core
168
169#endif // ifndef INCLUDED_JAZZ_BEBOP_CORE
BaseAPI: The parent of API and Core.
Definition base_api.h:122
Core: The execution unit is now a wrapper around onnx-runtime.
Definition core.h:89
virtual StatusCode new_entity(pChar p_where)
Definition core.cpp:122
virtual StatusCode exec(pTransaction &p_txn, Locator &function, pTuple p_args)
Definition core.cpp:250
virtual void base_names(BaseNames &base_names)
Definition core.cpp:111
StatusCode shut_down()
Definition core.cpp:98
virtual StatusCode header(StaticBlockHeader &hea, pChar p_what)
Definition core.cpp:170
StatusCode start()
Definition core.cpp:82
virtual StatusCode modify(Locator &function, pTuple p_args)
Definition core.cpp:258
virtual StatusCode remove(pChar p_where)
Definition core.cpp:154
virtual StatusCode get(pTransaction &p_txn, pChar p_what)
Definition core.cpp:202
virtual pChar const id()
Definition core.cpp:72
virtual StatusCode put(pChar p_where, pBlock p_block, int mode=WRITE_AS_BASE_DEFAULT)
Definition core.cpp:138
Channels: A Container doing block transactions across media (files, folders, shell,...
Definition channel.h:244
A configuration file as a key/value store.
Definition utils.h:218
A simple logger.
Definition utils.h:248
Persisted: A Service to manage data objects in LMDB.
Definition persisted.h:111
Tuple: A Jazz Block with multiple Tensors.
Definition tuple.h:94
Volatile: A Service to manage data objects in RAM.
Definition volatile.h:243
A language to access any container by base using locators.
Definition base_api.cpp:39
Core * pCore
A pointer to a Core.
Definition core.h:155
The namespace for Jazz Utils, Blocks, Kinds, Tuples, Containers, etc.
Definition block.cpp:39
std::map< String, pContainer > BaseNames
A map of names for the containers (or structure engines like "map" or "tree" inside Volatile).
Definition container.h:166
char * pChar
A pointer to a char buffer.
Definition types.h:189
class Block * pBlock
A (forward defined) pointer to a Block.
Definition block.h:66
int StatusCode
Type returned by the Service API.
Definition utils.h:142
Locator: A minimal structure to define the location of resources inside a Container.
Definition container.h:198
A Binary Compatible BlockHeader without Index (and therefore constructors/destructors)
Definition types.h:270
Transaction: A wrapper over a Block that defines the communication of a block with a Container.
Definition container.h:176