CN109324895A - 一种java统一数据源代理服务模型 - Google Patents

一种java统一数据源代理服务模型 Download PDF

Info

Publication number
CN109324895A
CN109324895A CN201810933637.4A CN201810933637A CN109324895A CN 109324895 A CN109324895 A CN 109324895A CN 201810933637 A CN201810933637 A CN 201810933637A CN 109324895 A CN109324895 A CN 109324895A
Authority
CN
China
Prior art keywords
module
data
interface
configure
java
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.)
Pending
Application number
CN201810933637.4A
Other languages
English (en)
Inventor
宋国徽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Wutong Network Technology Co Ltd
Original Assignee
Beijing Zhongke Wutong Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Zhongke Wutong Network Technology Co Ltd filed Critical Beijing Zhongke Wutong Network Technology Co Ltd
Priority to CN201810933637.4A priority Critical patent/CN109324895A/zh
Publication of CN109324895A publication Critical patent/CN109324895A/zh
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供了一种JAVA统一数据源代理服务模型,包括:数据库集群、统一数据访问接口和应用层,所述数据库集群包括Ibatis、Spring Data和Hibernatenate,所述统一数据访问接口包括Manager模块,Persistence framework框架、Adapter接口,Router模块、Cache模块、Merge模块、Parser模块、Configure模块,所述Manager模块和Configure模块分别连接Adapter接口,所述Configure模块包括相互连接的Router模块和Driver模块。本发明通过统一数据接口,将代理数据源统一处理,通过服务器负载均衡配置,实现数据的读写分离,通过定制化的均衡策略,监控代理服务器的状态,实现读写分离,降低数据库压力,支持事务处理失败,整个事务自动回滚,负载均衡符合高可用、高并发的架构方案,具有较高的使用价值。

Description

一种JAVA统一数据源代理服务模型
技术领域
本发明属于数据库访问技术领域,具体涉及一种JAVA统一数据源代理服务模型。
背景技术
Spring Data是一个用于简化数据库访问,并支持云服务的开源框架。其主要目标是使得对数据的访问变得方便快捷,并支持map-reduce框架和云计算数据服务,但SpringData存在以下的一些问题:数据源单一,切换困难,对多表查询支持较少,当多表联查只能取其中一列,因此查询性能较低,无法支持SQL自定义,也无法支持编写动态的SQL语句;而对于MyBatis,MyBatis是支持定制化SQL、存储过程以及高级映射的优秀的持久层框架,避免了几乎所有的JDBC代码和手动设置参数以及获取结果集,可以对配置和原生Map使用简单的XML或注解,将接口和Java的POJOs(Plain Old Java Objects,普通的Java对象)映射成数据库中的记录,但MyBatis数据源配置单一,读写分离切换不方便,要求SQL编写工作量大,对开发者要求较高,需要具备一定的SQL开发经验,SQL深度依赖数据库,无法随意切换数据库。
从上的分析可以得出,Spring Data和MyBatis数据库,均存在数据代理服务中间件过多,学习曲线大,无法做到多数据源的自由切换,数据更新操作无法异步操作,无法支持复杂的数据转换,无法达到任意结构化、半结构化数据源之间数据传输,因此,采用一种统一数据源服务模型,克服上述的缺陷。
发明内容
根据上述阐述,本发明的目的在于提供一种JAVA统一数据源代理服务模型,通过规范化的方法名称,代理数据源,通过服务器负载均衡配置,实现数据的读写分离,通过定制化的均衡策略,监控代理服务器的状态,通过定制化的代理异常,做统一的异常回滚处理,从而实现数据代理服务简单、快捷的目的。
本发明提供的技术方案:
一种JAVA统一数据源代理服务模型,包括:数据库集群、统一数据访问接口和应用层,所述数据库集群包括Ibatis、Spring Data和Hibernatenate,所述统一数据访问接口包括Manager模块,Persistence framework框架、Adapter接口,Router模块、Cache模块、Merge模块、Parser模块、Configure模块,所述Persistence framework框架连接并位于Adapter接口下方,所述Router模块、Cache模块、Merge模块和Parser模块并列连接并位于Adapter接口上方,所述Manager模块和Configure模块分别连接Adapter接口,所述Configure模块包括相互连接的Router模块和Driver模块。
本发明通过统一数据接口,将代理数据源统一处理,通过服务器负载均衡配置,实现数据的读写分离,通过定制化的均衡策略,监控代理服务器的状态,实现读写分离,降低数据库压力,支持事务处理失败,整个事务自动回滚,负载均衡符合高可用、高并发的架构方案,具有较高的使用价值。
附图说明
图1本发明的结构示意图;
具体实施方式
下面结合附图和具体实施方式对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
根据图1所示,一种JAVA统一数据源代理服务模型,包括:数据库集群、统一数据访问接口和应用层。
数据库集群包括Ibatis、Spring Data和Hibernatenate等传统常用的数据库,其目的在于通过本发明的统一数据访问接口实现数据库集群内的数据库中的数据进行格式处理,达到统一出口调用的目的。
统一数据访问接口包括Manager模块,该Manager模块定制均衡策略,设立数据调用规则,满足服务器负载的均衡配置。
统一数据访问接口包括Persistence framework框架完成数据的读入,通过Adapter接口将数据库集群内的数据库进行转换,数据通过Cache模块进行缓存,Parser模块进行数据分析,Merge模块对数据进行处理,合并,Router模块对数据进行传输,通过Configure模块中的Router模块和Driver模块实现数据的传输、驱动。
本发明的模型架构简单,Persistence framework框架连接并位于Adapter接口下方,Router模块、Cache模块、Merge模块和Parser模块并列连接并位于Adapter接口上方,实现数据的双向传输,Manager模块和Configure模块分别连接Adapter接口,Configure模块包括相互连接的Router模块和Driver模块。
本发明的模型架在执行数据转换后,更新数据语句使用标准格式,结果对象可以是Java Bean,Map实现和基本数据类型的包装类,如发生异常统一返回受影响的数据行数。
以上描述了本发明的基本原理和优点。本行业的技术人员应该了解,本发明不受上述实施案例的限制,上述实施案例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明的要求保护范围由所附的权利要求书及其等效物界定。

Claims (1)

1.一种JAVA统一数据源代理服务模型,包括:数据库集群、统一数据访问接口和应用层,所述数据库集群包括Ibatis、Spring Data和Hibernatenate,其特征在于:所述统一数据访问接口包括Manager模块,Persistence framework框架、Adapter接口,Router模块、Cache模块、Merge模块、Parser模块、Configure模块,所述Persistence framework框架连接并位于Adapter接口下方,所述Router模块、Cache模块、Merge模块和Parser模块并列连接并位于Adapter接口上方,所述Manager模块和Configure模块分别连接Adapter接口,所述Configure模块包括相互连接的Router模块和Driver模块。
CN201810933637.4A 2018-08-16 2018-08-16 一种java统一数据源代理服务模型 Pending CN109324895A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810933637.4A CN109324895A (zh) 2018-08-16 2018-08-16 一种java统一数据源代理服务模型

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810933637.4A CN109324895A (zh) 2018-08-16 2018-08-16 一种java统一数据源代理服务模型

Publications (1)

Publication Number Publication Date
CN109324895A true CN109324895A (zh) 2019-02-12

Family

ID=65263503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810933637.4A Pending CN109324895A (zh) 2018-08-16 2018-08-16 一种java统一数据源代理服务模型

Country Status (1)

Country Link
CN (1) CN109324895A (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101907993A (zh) * 2010-07-27 2010-12-08 华南理工大学 基于SpringDM的动态模型及其在RFID中间件持久层的应用
US8918412B1 (en) * 2007-11-15 2014-12-23 Progress Software Corporation Query proxy system for client-specified models
CN106647586A (zh) * 2017-01-20 2017-05-10 重庆邮电大学 一种基于b/s架构的虚拟机房可视化监控管理系统及方法
EP2425341B1 (en) * 2009-05-01 2018-07-11 Citrix Systems, Inc. Systems and methods for establishing a cloud bridge between virtual storage resources

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8918412B1 (en) * 2007-11-15 2014-12-23 Progress Software Corporation Query proxy system for client-specified models
EP2425341B1 (en) * 2009-05-01 2018-07-11 Citrix Systems, Inc. Systems and methods for establishing a cloud bridge between virtual storage resources
CN101907993A (zh) * 2010-07-27 2010-12-08 华南理工大学 基于SpringDM的动态模型及其在RFID中间件持久层的应用
CN106647586A (zh) * 2017-01-20 2017-05-10 重庆邮电大学 一种基于b/s架构的虚拟机房可视化监控管理系统及方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
拓守恒: "基于Hibernate和IBatis框架的混合持久化技术的应用", 《计算机时代》 *
石锐;许承毅;杨正益: "面向SOA的异构数据集成体系研究", 《微处理机》 *

Similar Documents

Publication Publication Date Title
US8321443B2 (en) Proxying open database connectivity (ODBC) calls
US6041344A (en) Apparatus and method for passing statements to foreign databases by using a virtual package
US20110213778A1 (en) Processor Implemented Systems and Methods for Using the Catalog Part of an SQL Identifier to Expose/Access Heterogeneous Data
US20120296866A1 (en) System and method for implementing on demand cloud database
CN111949693B (zh) 一种数据处理装置、数据处理方法、存储介质及电子设备
CN102081661A (zh) 基于xml的异构关系型数据库的数据集成方法和系统
US9507820B1 (en) Data modeling system for runtime schema extensibility
US20160092594A1 (en) Virtualizing schema relations over a single database relation
US20060294159A1 (en) Method and process for co-existing versions of standards in an abstract and physical data environment
CN104267932A (zh) 数据库操作方法、装置及服务器
CN110046170B (zh) 基于多文件管理的语句执行方法、装置、设备和介质
US20130254238A1 (en) Techniques for processing relational data with a user-defined function (udf)
US9665601B1 (en) Using a member attribute to perform a database operation on a computing device
US20030055921A1 (en) Method and apparatus for reengineering legacy systems for seamless interaction with distributed component systems
US20180300369A1 (en) Secure query interface
CN100440803C (zh) 模型化处理网格信息的方法
US20230401209A1 (en) Columnar Cache Query Using Hybrid Query Execution Plan
CN109324895A (zh) 一种java统一数据源代理服务模型
CN111752916B (zh) 数据采集方法及装置、计算机可读存储介质、电子设备
KR20100132752A (ko) 데이터베이스 분산을 통한 서비스 성능 향상을 위한 질의 데이터 분산 처리시스템
US20230289278A1 (en) Populating Datastores For Integration Testing
CN106980617A (zh) 一种基于json语句操作数据库的方法和系统
CN105138692A (zh) 一种大数据访问和管理的中间件定制系统与方法
CN114637734A (zh) 数据血缘管理方法、装置、电子设备和存储介质
CN111488360B (zh) 一种行级安全的实现方法、装置、设备及存储介质

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190212