CN104166699B - A kind of data access method based on REST frameworks - Google Patents
A kind of data access method based on REST frameworks Download PDFInfo
- Publication number
- CN104166699B CN104166699B CN201410378381.7A CN201410378381A CN104166699B CN 104166699 B CN104166699 B CN 104166699B CN 201410378381 A CN201410378381 A CN 201410378381A CN 104166699 B CN104166699 B CN 104166699B
- Authority
- CN
- China
- Prior art keywords
- jdbc
- data
- restful
- data source
- data base
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Abstract
The present invention relates to Computer Applied Technology field, is related specifically to a kind of data access method based on REST frameworks.The present invention interacted with data source using RESTful JDBC agreements, each data source by RESTful JDBC agreements be linked in cloud data base come;Described RESTful JDBC agreements are by traditional JDBC interface encapsulations into RESTful JDBC interfaces;The interface that RESTful JDBC are provided is essentially identical with JDBC interfaces, and the semanteme of interface is also consistent with JDBC.The present invention is to provide a kind of interactive mode based on REST frameworks between data source and cloud data base;Can be used for interacting for cloud data base and heterogeneous data source.
Description
Technical field
The present invention relates to Computer Applied Technology field, is related specifically to a kind of data access side based on REST frameworks
Method.
Background technology
During IT application in enterprise, due to each operation system construction and implement data management system stage,
The impact of technical and other economy and anthropic factor, causes enterprise to have accumulated in evolution a large amount of using different storages
The business datum of mode.The data management system that these data are adopted differs widely, including from simple document data bank to again
Miscellaneous network data base, constitutes the heterogeneous data source of enterprise.Although the data management system energy of these scattered different business
Enough meet business datum storage and management is required, but in many cases, Enterprises Leader will make a decision-making, generally require to look into
Multiple operation systems and external system based on various heterogeneous data sources are ask, can just be made a policy after carrying out mass data analysis.
Therefore, the integration of heterogeneous data source with integrated be that the reality that IT application in enterprise process is frequently encountered is asked
Topic, and the various applied information system construction of restriction enterprise and data degree of share, and informatization investment repetition or negative
One key factor of load weight.
Cloud Database Systems are the integration for carrying out heterogeneous data source and integrated important method.However, how to realize cloud number
Most important with interacting for heterogeneous data source according to storehouse.
Content of the invention
Present invention solves the technical problem that be to provide a kind of data access method based on REST frameworks, can be effective
Solve the interaction problems of cloud data base and heterogeneous data source.
The present invention solves the technical scheme of above-mentioned technical problem:
Interacted with data source using RESTful JDBC agreements, each data source is connect by RESTful JDBC agreements
Enter to cloud data base;Traditional JDBC interface encapsulations are connect by described RESTful JDBC agreements into RESTful JDBC
Mouthful;The interface that RESTful JDBC are provided is essentially identical with JDBC interfaces, and the semanteme of interface is also consistent with JDBC.
Described RESTful JDBC agreements have the key component DS of a realizationDescribed DSIt is
Agency between Wrapper and data base, Wrapper pass through DSInteract with data base;For Wrapper,
DSIt is a service end, for data base, DSIt is a client;Wrapper and DS
Using RESTful JDBC agreements, DSJDBC agreements are adopted with data base.
Realize that Wrapper supports that the method for RESTful JDBC agreements is:
Increase by a layer protocol manager below Wrapper, for the selection of two kinds of agreements, switching;
Or,
Increase a RESTful JDBC version for Wrapper.
Described DSSupport two kinds of deployment modes of proprietary mode and shared model;
Described proprietary mode, a data base monopolize a DSNow, a data base and a DSConstitute a data source;
Described shared model, one DS of multiple Database vendorsNow, multiple data bases and a DSConstitute a data source.
Described DSUsing Jetty as REST engines, RESTful JDBC are issued with Jetty;It is right to support
The management of database address and access authority, the management to data source address and access authority, data source address and data base ground
The accurate mapping of location, the accurate mapping of the access authority for accessing authority and data base of data source;Support that thread pool, data base connect
Connect the operation in pond;Aforementioned each support function is responsible for realization by DS2DB Manager.
The method of the present invention effectively solves the interaction problems of cloud data base and heterogeneous data source;Support multitype database system
System (MySQL, Oracle, SQL Server, DB2) and file system (Excel file, KV files).
Description of the drawings
The present invention is further described below in conjunction with the accompanying drawings:
Fig. 1 is the logical architecture figure of the present invention;
Fig. 2 is the deployment mode figure of the present invention;
Fig. 3 is the system realization figure of the present invention.
Specific embodiment
The RESTization of data source substantially by the RESTization of data source access protocol, provides a kind of REST forms for data source
Access interface.
At present, conventional data source is various relational databases, there is provided the access interface of JDBC, adopts with interacting for data source
It is JDBC agreements.After RESTization, we will be interacted with data source, each number using " RESTful JDBC agreements "
According to source by RESTful JDBC agreements be linked in cloud data base come.
As shown in drawings, RESTful JDBC agreements by traditional JDBC interface encapsulations into REST API, i.e.,
" RESTful JDBC interfaces ".The interface that RESTfulJDBC is provided is essentially identical with JDBC interfaces, the semanteme of interface also with JDBC
It is consistent.For example, query interface is provided in JDBC:
ResultSet executeQuery(String sql)
Should also there is an identical interface so in RESTful JDBC, possess identical semantic.But, tradition
The interface data provided in JDBC is too many, and these interfaces need not be realized in RESTful JDBC agreements one by one, it is only necessary to realized
The interface of part core.
DSIt is the key component for realizing RESTful JDBC agreements.DSIt is Wrapper and data base
Between agency, Wrapper pass through DSInteract with data base.For Wrapper, DSIt is one
Individual service end, for data base, DSIt is a client.Wrapper and DSUsing RESTful
JDBC agreements, DSJDBC agreements are adopted with data base.
After having RESTful JDBC agreements, each data source all supports that two ways is interacted with cloud data base.
In system, existing Wrapper only supports JDBC agreements, it is impossible to meet demand.There are two schemes solve the problem:
1. increase by a layer protocol manager below Wrapper, for the selection of two kinds of agreements, switching.At present in system
Wrapper realizes that close coupling JDBC agreement, this scheme are likely to result in the comparison of the realization modification to existing Wrapper
Greatly.
2. a RESTful JDBC version is increased for Wrapper, such as, for Oracle Wrapper, there is provided two
Version:JDBC versions and RESTful JDBC versions, JDBC versions are interacted with oracle database by JDBC agreements,
RESTful JDBC versions are interacted with oracle database by RESTful JDBC agreements.This scheme can cause existing in system
There is Wrapper quantity double, benefit is without modifying to the realization of existing Wrapper.
According to " opening and closing design principle ", development cost is considered, using second scheme, be that Wrapper increases by one
RESTful JDBC versions.
DSSupport two kinds of deployment modes:
1. proprietary mode:One data base monopolizes a DSNow, a data base and a DS
Constitute a data source.The benefit of this pattern is DSPerformance bottleneck will not be become, have the disadvantage to be likely to result in system
In there is substantial amounts of DSExample, increases the cost of deployment and management.
2. shared model:One DS of multiple Database vendorsNow, multiple data bases and a DS
Constitute a data source.The benefit of this pattern is DS in systemExample fewer, have the disadvantage DSCan
Can become the performance bottleneck of access;
In practice specifically using which kind of deployment mode, the demand according to application is needed, and the constraint of deployed environment comes
Consider.
DSIt is the core component for realizing the DAP, provides DS in detail belowConcrete
Embodiment.
The realization of 1.Jetty be a Java realize, increase income, measured, and the Http with abundant function
Server and Web container, DSRealization using Jetty as REST engines, issue RESTful with Jetty
JDBC.
2. the management of authority is supported to database address and accesses, for example:
A) database address:jdbc:oracle:thin:@192.168.1.100:1521:orcl;
B) database access authority:The username and password of Accessing Oracle Database;
The address of data base and access authority voluntarily configured by the user of data base, the address of data base and access with
According to being sightless to cloud data base.The access authority of data base needs to be encrypted storage, to prevent in multiple data bases altogether
Enjoy a DSPattern when, the username and password in leak data storehouse;
3. the management of authority is supported to data source address and accesses,
A) data source address:rest:oracle@192.168.1.100:8080/orcl;
B) the access authority of data source:By the username and password of RESTful JDBC protocol access data sources, with visit
Ask that the user of data base is different with password;
The address of data source and access authority voluntarily configured by the user of data base, the address of data source and access with
According to sightless to cloud data base.The access authority of data source needs to be encrypted storage, to prevent in multiple Database vendors
One DSPattern when, the username and password in leak data source;
4. the accurate mapping of data source address and database address is supported, that supports data source accesses authority and data base's
Access the accurate mapping of authority;
5. thread pool, the operation of database connection pool are supported, to prevent DSBecome performance bottleneck;DS2DB
Manager is mainly responsible for realizing above-mentioned 2,3,4 functions.
Claims (5)
1. a kind of data access method based on REST frameworks, it is characterised in that:Using RESTful JDBC agreements and data source
Interact, each data source by RESTful JDBC agreements be linked in cloud data base come;Described RESTful JDBC
Agreement is by traditional JDBC interface encapsulations into RESTful JDBC interfaces;The interface that RESTful JDBC are provided realizes the core of JDBC
Heart interface, the semanteme of interface are consistent with JDBC;
Described RESTful JDBC agreements have the key component DS of a realizationDescribed DSIt is Wrapper
Agency between data base, Wrapper pass through DSInteract with data base;For Wrapper, DSIt is a service end, for data base, DSIt is a client;Wrapper and DSUsing
RESTful JDBC agreements, DSJDBC agreements are adopted with data base.
2. data access method according to claim 1, it is characterised in that:Realize that Wrapper supports RESTful JDBC
The method of agreement is:
Increase by a layer protocol manager below Wrapper, for the selection of two kinds of agreements, switching;
Or,
Increase a RESTful JDBC version for Wrapper.
3. data access method according to claim 1, it is characterised in that:Described DSSupport proprietary mode and
Two kinds of deployment modes of shared model;
Described proprietary mode, a data base monopolize a DSNow, a data base and a DS
Constitute a data source;
Described shared model, one DS of multiple Database vendorsNow, multiple data bases and a DS
Constitute a data source.
4. data access method according to claim 2, it is characterised in that:Described DSSupport proprietary mode and
Two kinds of deployment modes of shared model;
Described proprietary mode, a data base monopolize a DSNow, a data base and a DS
Constitute a data source;
Described shared model, one DS of multiple Database vendorsNow, multiple data bases and a DS
Constitute a data source.
5. the data access method according to any one of claim 2 to 4, it is characterised in that:Described DSUsing
Jetty issues RESTful JDBC as REST engines with Jetty;Support to database address and access authority management,
To data source address and access the management of authority, the accurate mapping of data source address and database address, the access of data source with
Accurate mapping according to the access authority with data base;Support thread pool, the operation of database connection pool;Aforementioned each support function by
DS2DB Manager are responsible for realization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378381.7A CN104166699B (en) | 2014-08-03 | 2014-08-03 | A kind of data access method based on REST frameworks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378381.7A CN104166699B (en) | 2014-08-03 | 2014-08-03 | A kind of data access method based on REST frameworks |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104166699A CN104166699A (en) | 2014-11-26 |
CN104166699B true CN104166699B (en) | 2017-03-15 |
Family
ID=51910512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410378381.7A Active CN104166699B (en) | 2014-08-03 | 2014-08-03 | A kind of data access method based on REST frameworks |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104166699B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789978A (en) * | 2016-12-07 | 2017-05-31 | 高新兴科技集团股份有限公司 | A kind of convergence system and method |
CN111367199B (en) * | 2018-12-26 | 2021-04-06 | 中国科学院沈阳自动化研究所 | Digital quantity instrument configuration method based on REST function packaging |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103220285A (en) * | 2013-04-10 | 2013-07-24 | 中国科学技术大学苏州研究院 | Access system based on RESTful interface in ubiquitous service environment |
CN103605698A (en) * | 2013-11-06 | 2014-02-26 | 广东电子工业研究院有限公司 | Cloud database system used for distributed heterogeneous data resource integration |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070198482A1 (en) * | 2006-02-21 | 2007-08-23 | International Business Machines Corporation | Dynamic data formatting during transmittal of generalized byte strings, such as XML or large objects, across a network |
-
2014
- 2014-08-03 CN CN201410378381.7A patent/CN104166699B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103220285A (en) * | 2013-04-10 | 2013-07-24 | 中国科学技术大学苏州研究院 | Access system based on RESTful interface in ubiquitous service environment |
CN103605698A (en) * | 2013-11-06 | 2014-02-26 | 广东电子工业研究院有限公司 | Cloud database system used for distributed heterogeneous data resource integration |
Non-Patent Citations (3)
Title |
---|
A Simple and Efficient Parallel Approach to Large-Scale Railway Freight Data Analysis;Yi Xie et al;《2010 12th IEEE International Conference on High Performance Computing and Communications》;20121231;第538-543页 * |
RESTify your SQL Data;Val Huber;《https://dzone.com/articles/restify-your-sql-data》;20140424;第1-16页 * |
一种基于REST服务和Mashup的分布式商品信息集成模型;孟健等;《现代图书情报技术》;20101231(第1期);第15-21页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104166699A (en) | 2014-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10997169B2 (en) | Data sharing in database systems | |
US9715536B2 (en) | Virtualization method for large-scale distributed heterogeneous data | |
US20110208780A1 (en) | Method for implementing fine-grained access control using access restrictions | |
US10657154B1 (en) | Providing access to data within a migrating data partition | |
US20230418818A1 (en) | Sharing materialized views in multiple tenant database systems | |
CN106599043A (en) | Middleware used for multilevel database and multilevel database system | |
US20060136464A1 (en) | System and method for object persistence | |
US10474697B2 (en) | Updating a partitioning column | |
Borkar et al. | Have your data and query it too: From key-value caching to big data management | |
US20120290588A1 (en) | Reorganizing database tables | |
Srivastava et al. | Analysis of various NoSql database | |
CN104166699B (en) | A kind of data access method based on REST frameworks | |
US10146833B1 (en) | Write-back techniques at datastore accelerators | |
Riegger et al. | Efficient data and indexing structure for blockchains in enterprise systems | |
Zubi | On distributed database security aspects | |
US11556532B2 (en) | Hash trie based optimization of database operations | |
US10366057B2 (en) | Designated computing groups or pools of resources for storing and processing data based on its characteristics | |
GB2460321A (en) | Database fine-grained access control employing hierarchical item level entitlement | |
Ghulam et al. | A Framework for Creating Global Schema Using Global Views from Distributed Heterogeneous Relational Databases in Multidatabase System | |
Pirzadeh | On the performance evaluation of big data systems | |
Mughees | Data migration from standard SQL TO NoSQL | |
Sadeg et al. | To have an Idea on NoSQL Databases | |
US11204909B2 (en) | Internal tables for accessing data stored in a database | |
Ali | A framework for creating Global Schema using proxy tables from distributed heterogeneous relational databases in Multidatabase system | |
Li et al. | A Data Rights Control Model for a SaaS Application Delivery Platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |