Situation-oriented databases provide processing of documents from heterogeneous data sources under the control of a hierarchical situational model. This article discusses the problem of processing database documents in JSON format, along with XML. Two implementation approaches are discussed: (1) on the fly JSON to XML document conversion and using Document Object Model for processing XML, and (2) loading the JSON document into an associative/indexed array followed by applying the template engine. The database interpreter works with external heterogeneous data extracted from files, databases, archives, web services, data is processed using virtual documents. Examples of processing JSON documents received from a web service are analyzed. Data from the San Francisco Open Data web server is used as the JSON test source. Query in Socrata Query Language used for JSON data extraction is presented. The implementation of approaches in the research situation-oriented database prototype based on Hypertext Preprocessor is considered.
Data stream processing in situational-oriented databases (SODB) is discussed. SODB is a heterogeneous data integrator operating under the control of the built-in hierarchical situational model (HSM). The processed data is defined in the HSM as virtual documents (VD) mapped to real data stores. HSM specifies the loading of a VD data into Data Processing Objects (DPO), the data transformation in DPO, and unloading of processing results to a VD. Stream processing of large documents that do not fit entirely into RAM is discussed. A VD model involving multiple pieces of data that can be processed separately is considered. Portions of data are extracted from the VD input stream, processed in the DPO, and then sent to the VD output stream. Invariance should ensure the independence of the DPO model when the VD model changes. Invariance to different schemes streaming data is discussed. Algorithms for loading and unloading DPO are considered, ensuring invariance due to the hidden cyclical processing of data portions. The proposed solutions are illustrated with examples of processing XML and JSON documents.
New features RESTful web services development, envisaged in the situation-oriented databases (SODB), are considered. SODB is a heterogeneous data integrator driven by an embedded hierarchical situational model (HSM), in which virtual documents are mapped onto heterogeneous physical data. Microservices and microservice architecture are discussed in terms of the benefits of scaling and modifying web applications. Elements of the situational model that define HTTP-request processing are considered in terms of access to request properties and attached data based on the concept of virtual documents. An HTTP-request processing design pattern developed to work with relational database tables for which data sources are external web services is discussed. The structure of the HSM-model, which performs selective processing depending on the type of request, is discussed in detail for HTTP-request methods GET and POST. An example of the practical implementation of microservices based on SODB for the problem of monitoring student views of educational videos on YouTube is given.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.