In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Abstract
Above (storage section) mentioned that the two important parts of the database are storage and computing, this article is for you to interpret the design practice of the query engine Query Engine in the graph database Nebula.
In Nebula, Query Engine is used to process Nebula query language statements (nGQL). This article will take you to understand the architecture of Nebula Query Engine.
The above picture shows the architecture of the query engine. If you are familiar with the SQL execution engine, you must be familiar with the above diagram. The Query Engine architecture diagram of Nebula is similar to the execution engine of modern SQL, except that the query language parser is different from the specific execution plan.
Session Manager
Nebula rights management uses role-based access control (Role Based Access Control). The client needs to authenticate when it connects to the Query Engine for the first time. When the authentication is successful, the Query Engine will create a new session and return the session ID to the client. All session are managed by Session Manger. Session records the current graph space information and permissions on the space. In addition, session records some session-related configuration information and temporarily saves some information across multiple requests within the same session.
The session shuts down after the client connection ends, or if there is no communication for a long time, it will be cut to idle. This idle time is configurable. The client must carry this session ID with each request, or the Query Engine will reject the request.
Storage Engine does not manage that session,Query Engine takes session information with it when it accesses the storage engine.
Parser
Query Engine parses nGQL statements from the client, and the parser is mainly based on the famous flex / bison toolset. Dictionary files (lexicon) and syntax rules (grammar) are located in the src/parser directory of the Nebula source code. By design, the syntax of nGQL is very similar to that of SQL, which aims to reduce the cost of learning. At present, there is no unified international standard for query language in graph database. Once ISO/IEC 's Graph query language (GQL) committee issues GQL international standard, nGQL will achieve compatibility as soon as possible. The abstract grammar tree (Abstrac Syntax Tree, or AST) produced by Parser is handed over to the next module: Execution Planner. Http://m.qd8.com.cn/yiyao/xinxi21_3709996.html
Execution Planner
The execution planner (Execution Planner) is responsible for parsing the abstract tree AST into a series of execution actions action (executable plan). Action is the smallest executable unit. For example, a typical action can be to get all the neighboring nodes of a node, or to obtain the attributes of an edge, or to filter nodes or edges based on specific filter criteria. When the abstract tree AST is transformed into an execution plan, all ID information is extracted to perform the reuse of the plan. This ID information is placed in the current request context, and the context also holds the variables and intermediate results. Jiaozuo traditional Chinese Medicine Gastrointestinal Hospital: http://jz.lieju.com/zhuankeyiyuan/37845056.htm/
Optimization
The execution plan generated by the Execution Planner is handed over to the execution optimization framework Optimization, where multiple Optimizer are registered. The Optimizer is called in turn to optimize the execution plan so that each Optimizer has the opportunity to modify (optimize) the execution plan. Finally, the optimized execution plan may be completely different from the original execution plan, but the optimized execution result must be the same as that of the original execution plan. Treatment of infertility in Zhengzhou Hospital: http://rgsj.zzfkyy120.com/
Execution
The last step of Query Engine is to execute the optimized execution plan, which is done by the implementation Framework (Execution Framework). Each executor in the execution layer processes only one execution plan at a time, and the action in the plan is executed one by one. Executors also have some targeted local optimizations, such as deciding whether to execute concurrently or not. According to the data and information needed by different action, the executor needs to communicate with them through the client of meta service and storage engine.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.