CN103257859A - Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups - Google Patents

Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups Download PDF

Info

Publication number
CN103257859A
CN103257859A CN2013100941496A CN201310094149A CN103257859A CN 103257859 A CN103257859 A CN 103257859A CN 2013100941496 A CN2013100941496 A CN 2013100941496A CN 201310094149 A CN201310094149 A CN 201310094149A CN 103257859 A CN103257859 A CN 103257859A
Authority
CN
China
Prior art keywords
data
aop
buffer memory
self
nutz
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
CN2013100941496A
Other languages
Chinese (zh)
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.)
NANJING SITONG TECHNOLOGY Co Ltd
Original Assignee
NANJING SITONG 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 NANJING SITONG TECHNOLOGY Co Ltd filed Critical NANJING SITONG TECHNOLOGY Co Ltd
Priority to CN2013100941496A priority Critical patent/CN103257859A/en
Publication of CN103257859A publication Critical patent/CN103257859A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups. The network cache Memcache and AOP interceptor technology are applied to solve the problems of high network resource consumption, data storage resource consumption and lower system efficacy under high-concurrency multi-user access scene of education website groups. Therefore, effective support of long-term trouble-free operation is realized, network and system resources are utilized effectively, system software-hardware is reduced, and processing capacity and expansion capacity of servers are increased.

Description

The AOP technology of high-performance buffer memory and NUTZ is in Educational website group's application
Technical field
The invention discloses a kind of method of Web Hosting, the AOP technology of a kind of high-performance buffer memory and NUTZ framework that relates in particular to is in Educational website group's application.
Background technology
Along with the development of IT application in education sector, the website that increasing educational unit need be built oneself is used as information disclosure and the external window of showing.The resource that each different educational institution has differs widely, and exists part body not have the website of oneself or to its unsatisfied situation in website that has at present.Educational website group need visit the high concurrent request of formation in the face of the large user, and system needs high processing power, guarantees that the timely response of system is with stable.
In the existing Educational website, generally adopt the mode of reading database data to obtain the result to data dictionary class data, because the IO operating efficiency of database is subjected to the influence of concurrent users number, when the large user visits, this mode will directly have influence on the response time of WEB APP server, make the user need wait for more time, the situation that server does not have response perhaps occurs.
Traditional processing mode is to adopt cluster and the distributed deployment mode of server to solve, and this mode adopts the aspect of hardware to solve problem, though this mode can solve the concurrent mode of most height, treatment effeciency is lower and cost is higher.
AOP implementation framework-spring the framework of main flow exists following deficiency at present:
1. system is heavy, and the jar bag that whole framework relies among the spring reaches dozens of, and the size of each jar bag has reached more than 100,000,000 especially.
2. need defining interface and blocker class in spring respectively, more loaded down with trivial details is the configuration of configuration file, need be in the XML file configuration<AOP:config label.
Summary of the invention
Technical matters to be solved by this invention is to consider simultaneously to realize improving treatment effeciency at the software of system on the basis of adopting hardware supported, and next satisfied bigger visit capacity requires and reduces cost.Adopt Educational website group of the present invention to use simply, easy to operate, system stability.
The present invention is for to solve the problems of the technologies described above by the following technical solutions: a kind of AOP technology based on high-performance buffer memory and NUTZ framework is in Educational website group's application, the employing framework NUTZ that increases income provides the function of AOP, increase Memcache as the intermediate data buffer memory between the data of the desired acquisition of user's access websites group and the data center of Web group own, described application realizes that the concrete grammar of data buffer memory is as follows:
(1) adopt the cache management service class to realize the management function of buffer memory, set parameter and the performance of buffer memory by the cached configuration file, the content of setting comprises: Memcache address of service, Memcache server load amount, main thread length of one's sleep, read time-out time;
(2) adopt self-defined blocker class to realize the buffer memory of various data, self-defined blocker class comprises the object of self-defined blocker class and the method for self-defined blocker class, the self-defined blocker class of statement in the dependence function of injecting ioc that the NUTZ framework provides, the described cache management service class of implantation step (1) in self-defined blocker class, the object statement of self-defined blocker class is in the blocker configuration file of correspondence, and the method for self-defined blocker class realizes the operation to Memcache;
(3) statement AOP explains in the data cached Educational website group business method of needs, described AOP explains the character string of accepting number could vary, each character string is the title of a self-defined blocker class, when application call during to described Educational website group business method, the object that calls the described self-defined blocker class of explaining through AOP is automatically realized the management of buffer memory.
Further, the type of data comprises described in the described step (2): station data, column data, focus word, sensitive word, data dictionary.
Further, described Memcache supports to dispose a plurality of, and the application module of different pieces of information request calls corresponding Memcache.
The present invention adopts above technical scheme compared with prior art, has following technique effect:
1. after having adopted the AOP technology of high-performance buffer memory and NUTZ framework to be implemented in big visit capacity treatment technology among the Educational website group, Educational website group shortened greatly to the processing response time that the large user measures high concurrent visit, and the resource consumption rate of server is reduced greatly.
2. the development of code simple and fast more among the present invention, relative program uses simpler coding, has improved developer's yield-power, thereby has shortened the cycle of exploitation, has reduced cost of development.
Description of drawings
Fig. 1 is Educational website group system data flow direction figure.
Fig. 2 is the process flow diagram of request of data and buffer memory in the Educational website group system.
Fig. 3 is the caching system structural drawing of Educational website group system.
Embodiment
Adopted high performance distributed memory object caching system Memcache in the technical scheme of the present invention, to AOP(Aspect Oriented Programming towards tangent plane programming) realization of function adopted the NUTZ framework.Memcache can not need frequent data of changing to carry out buffer memory data dictionary data and the part of needs, application program is by reading the data cached response at a high speed that realizes, alleviate the IO operation of database server and taking of database connect resource, improve the efficient of database server and WEB APP server.Simultaneously, Memcache supports to dispose a plurality of, and by adopting the mode in a plurality of Memcache of configuration source in NUTZ, realization different application module is called the mode of different Memcache, the pressure that further disperses caching server, raising Educational website group's response time.NUTZ is an efficiently WEB application development framework conveniently, and the AOP function namely can realize by simple configuration in NUTZ.In Educational website group system, read non-frequent change data such as website, column from the front end presentation layer, before the method for reading data of encapsulation, according to the total characteristic of these methods, explain AOP by configuration, namely utilize the blocker principle, call data cache method; In the data method for caching and processing, by visit Memcache, realize the buffer memory of data, thereby improve the concurrent processing ability of system.
The NUTZ AOP function in the framework of increasing income, we are defined as NutzAOP, clear the most frequently used, modal demand in the AOP function--the actuating logic of control ad hoc approach of having realized compactly of NutzAOP.In NUTZ, the interface definition of AOP is InterceptorChain, is present among the org.nutz.AOP.InterceptorChain of NUTZ framework.The InterceptorChain that wherein uses can be understood as the FilterChain of Servlet the inside, and it is carrying the information that can obtain when carrying out former method, as allocating object. call method, parameter, rreturn value etc.Entire I nterceptorChain code is succinct, and less than 100 row, implementation is simple, only need understand understanding that the developer of blocker knowledge can see soon, and can use in development fast.
The NUTZ AOP function in the framework of increasing income, principle is appreciated that as described below:
1) information, the blocker information of method call all is encapsulated into the interface of AOP;
2) first blocker of calling interface the inside and determine whether carry out by this blocker.If continue then call the doChain method and tackle;
3) when last blocker has also called the doChain method in the interface, realize beginning to call former method, return then;
4) because the doChain method has been returned storehouse and begun to go back, pass through blocker originally successively.At this moment you can change/replace rreturn value originally.
The present invention adopts configuration and the mode injected realizes the configurability of program, as the address parameter of Memcache, the timeliness of buffer memory etc., comes the decoupling zero of code by the mode of injecting, and improves extendability.
As shown in Figure 1, in Educational website group system, different schools and the user of educational institution need visit organization web separately, show it is the problem that data flow to from sending the request of access track data, and whole data flow can be made following description:
1) user sends data access request;
2) system makes response to user's request;
3) caching system is tackled request, and the data estimator content is filtered, and provides response data;
4) user is shown to webpage after obtaining data.
As shown in Figure 2, the flow process of request of data and caching system work is in the Educational website group system: the buffer memory service is sent request of data to custom system; The cache management service class judges whether to exist data cached, if exist data cached, with data cached return to the request user.If do not have data cachedly, the cache management service class is to data center's request msg, and the data of asking successful back cache management service class that data center is sent are carried out buffer memory and returned this data to the user.
As shown in Figure 3, in Educational website group system, at first need to define a cache management service class cache management service class MemcacheService that is Memcache.Realized the management function of buffer memory in this class, set parameter and the performance of buffer memory by configuration, by injecting, this Memcache class can have been served in each functional module.
In the realization of MemcacheService, daily record register Log provides by the log4j that apache the provides assembly of increasing income, and the concrete storage of daily record record and definition are to dispose in configuration file log4j.property file.
In the constructed fuction of MemcacheService, carry out setup code, be written into the configuration to Memcache.The advantage of Memcache namely shows in parameter configurable.The parameter configuration here mainly comprises the IP address of Memcache server, and the port of service is provided, and specifies Memcache server load amount, and main thread length of one's sleep is set, and arranges and reads time-out time etc.
MemcacheService also provides a series of method at caching, basic GET method and the SET method of comprising.The GET method is to read data from buffer memory, and the SET method is that the needs data in buffer is write buffer memory.In order to tackle the demand that part need arrange the buffer memory expired time separately, MemcacheService also provides the SET method of multiparameter, and in this method, expired time passes to Memcache as a parameter and arranges.Remove above certain methods, MemcacheService also provides delete method and update method, and these two methods provide data cached deletion and renewal.
The base class of NUTZ blocker class has encapsulated the operation of all complicacy, and the developer uses a class using self-defining blocker time-like, and a method is just enough.
Realize self-defining blocker class, its basic realization principle and step is described below: at first state a blocker, this blocker has one or more blocker objects, and these blocker objects are stated in configuration file.Add AOP and explain when data are carried out buffer memory, explain by AOP the request of calling data is tackled, the object that described AOP explains must be existing object in the buffer memory service layer.AOP explains the character string of accepting number could vary, and each character string is the title of a blocker object, namely must state this blocker object in ioc (the dependence function of injecting that the NUTZ framework provides).In the object of blocker method, the blocker method realizes the operation to high-performance buffer memory Memcache, and Memcache calls by configuration definition, needs to define the parameters of Memcache in the configuration file, comprises the network address etc.
In the Educational website group, following data are carried out buffer memory, comprising: station data, column data, focus word, sensitive word, data dictionary.Show as on the realization details to the data buffer memory what obtain is all station datas, it is among the MAP of key with the Site ID that the station data conversion is deposited into one, method is returned this MAP, by the interception of blocker class, this MAP is deposited in buffer memory.

Claims (3)

1. the AOP technology of a high-performance buffer memory and NUTZ is in Educational website group's application, the employing framework NUTZ that increases income provides the function of AOP, increase Memcache as the intermediate data buffer memory between the data of the desired acquisition of user's access websites group and the data center of Web group own, described application realizes that the concrete grammar of data buffer memory is as follows:
(1) adopt the cache management service class to realize the management function of buffer memory, set parameter and the performance of buffer memory by the cached configuration file, the content of setting comprises: Memcache address of service, Memcache server load amount, main thread length of one's sleep, read time-out time;
(2) adopt self-defined blocker class to realize the buffer memory of various data, concrete steps are as follows: described self-defined blocker class comprises the object of self-defined blocker class and the method for self-defined blocker class, the self-defined blocker class of statement in the dependence function of injecting ioc that the NUTZ framework provides, the described cache management service class of implantation step (1) in self-defined blocker class, the object statement of self-defined blocker class is in the blocker configuration file of correspondence, and the method for self-defined blocker class realizes the operation to Memcache;
(3) statement AOP explains in the data cached Educational website group business method of needs, described AOP explains the character string of accepting number could vary, each character string is the title of a self-defined blocker class, when application call during to described Educational website group business method, the object that calls the described self-defined blocker class of explaining through AOP is automatically realized the management of buffer memory.
2. the AOP technology of a kind of high-performance buffer memory as claimed in claim 1 and NUTZ is characterized in that in Educational website group's application, and the type of data comprises described in the described step (2): station data, column data, focus word, sensitive word, data dictionary.
3. the AOP technology of a kind of high-performance buffer memory as claimed in claim 1 or 2 and NUTZ is characterized in that in Educational website group's application: described Memcache supports to dispose a plurality of, and the application module of different pieces of information request calls corresponding Memcache.
CN2013100941496A 2013-03-22 2013-03-22 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups Pending CN103257859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100941496A CN103257859A (en) 2013-03-22 2013-03-22 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100941496A CN103257859A (en) 2013-03-22 2013-03-22 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups

Publications (1)

Publication Number Publication Date
CN103257859A true CN103257859A (en) 2013-08-21

Family

ID=48961796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100941496A Pending CN103257859A (en) 2013-03-22 2013-03-22 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups

Country Status (1)

Country Link
CN (1) CN103257859A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372266A (en) * 2016-11-21 2017-02-01 郑州云海信息技术有限公司 Cache and accessing method of cloud operation system based on aspects and configuration documents
CN106528391A (en) * 2016-12-16 2017-03-22 郑州云海信息技术有限公司 Recording method of operating log by management platform on SSR
CN108595680A (en) * 2018-05-02 2018-09-28 四川长虹电器股份有限公司 The implementation method of the caching of XBRL
CN108628891A (en) * 2017-03-21 2018-10-09 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable storage medium storing program for executing of data buffer storage layer
CN109150993A (en) * 2018-07-30 2019-01-04 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium obtaining network request section
CN112801632A (en) * 2021-02-25 2021-05-14 北京平恒智能科技有限公司 Method for realizing customized management of machine vision detection task flow based on control reversal technology
CN112988803A (en) * 2019-12-02 2021-06-18 中国移动通信集团浙江有限公司 Cache transformation method and device for micro-service system service and computing equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050204344A1 (en) * 2004-03-12 2005-09-15 Hideaki Shinomi Program analysis device, analysis method and program of same
CN101470668A (en) * 2007-12-24 2009-07-01 联想(北京)有限公司 Computer and method for configuring high speed caching control policy on computer
CN101887396A (en) * 2009-05-14 2010-11-17 灰熊(北京)科技有限公司 Method for realizing configurable cache

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050204344A1 (en) * 2004-03-12 2005-09-15 Hideaki Shinomi Program analysis device, analysis method and program of same
CN101470668A (en) * 2007-12-24 2009-07-01 联想(北京)有限公司 Computer and method for configuring high speed caching control policy on computer
CN101887396A (en) * 2009-05-14 2010-11-17 灰熊(北京)科技有限公司 Method for realizing configurable cache

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WENDAL: "Log message", 《HTTPS://CODE.GOOGLE.COM/P/NUTZ/SOURCE/DETAIL?R=2151&PATH=/TRUNK/DOC/MANUAL/AOP/AOP.MAN》 *
被风遗忘: "EhCache缓存框架使用", 《HTTP://MY.OSCHINA.NET/CHENGJIANSUNBOY/70974》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372266A (en) * 2016-11-21 2017-02-01 郑州云海信息技术有限公司 Cache and accessing method of cloud operation system based on aspects and configuration documents
CN106528391A (en) * 2016-12-16 2017-03-22 郑州云海信息技术有限公司 Recording method of operating log by management platform on SSR
CN108628891A (en) * 2017-03-21 2018-10-09 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable storage medium storing program for executing of data buffer storage layer
CN108595680A (en) * 2018-05-02 2018-09-28 四川长虹电器股份有限公司 The implementation method of the caching of XBRL
CN108595680B (en) * 2018-05-02 2021-10-01 四川长虹电器股份有限公司 Method for realizing XBRL cache
CN109150993A (en) * 2018-07-30 2019-01-04 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium obtaining network request section
CN112988803A (en) * 2019-12-02 2021-06-18 中国移动通信集团浙江有限公司 Cache transformation method and device for micro-service system service and computing equipment
CN112801632A (en) * 2021-02-25 2021-05-14 北京平恒智能科技有限公司 Method for realizing customized management of machine vision detection task flow based on control reversal technology

Similar Documents

Publication Publication Date Title
CN103257859A (en) Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups
CN109783438B (en) Distributed NFS system based on librados and construction method thereof
Brown et al. Implementation patterns for microservices architectures
CN103200212B (en) A kind of method and system realizing distributed conversation under cloud computing environment
WO2017096940A1 (en) Data import method for spark-sql-based big-data processing platform
CN102841901B (en) A kind of method and apparatus of web displaying
CN104104717A (en) Inputting channel data statistical method and device
CN103685304A (en) Method and system for sharing session information
Adya et al. Fast key-value stores: An idea whose time has come and gone
CN103995755A (en) Server optimizing method based on mobile terminal and server system
WO2016176807A1 (en) Dram refreshing method, apparatus and system
CN104156300A (en) Log management system and log management method
CN105357280B (en) A kind of file based on HDFS is traced to the source FTP system
CN102917005B (en) A kind of mass memory access method supporting affairs and device
CN104657435A (en) Storage management method for application data and network management system
CN111352589B (en) Distributed storage method, device, equipment and readable medium
CN105701233B (en) A method of optimization server buffer management
CN105279034B (en) Consistency cache control system and method
CN108234299A (en) The information processing method of configurable protocol data gateway and gateway based on model
CN103778086A (en) Coarse-grained dynamic reconfigurable system based multi-mode data access device and method
CN101377788B (en) Method and system of caching management in cluster file system
CN103514140B (en) For realizing the reconfigurable controller of configuration information multi-emitting in reconfigurable system
CN109460389B (en) OpenResty-based log recording method
CN102917036A (en) Memcached-based distributed cache data synchronization realization method
CN107169047A (en) A kind of method and device for realizing data buffer storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130821