CN106126309A - ONS-based timed task scheduling method - Google Patents

ONS-based timed task scheduling method Download PDF

Info

Publication number
CN106126309A
CN106126309A CN201610562441.XA CN201610562441A CN106126309A CN 106126309 A CN106126309 A CN 106126309A CN 201610562441 A CN201610562441 A CN 201610562441A CN 106126309 A CN106126309 A CN 106126309A
Authority
CN
China
Prior art keywords
job
timed task
service end
class
task
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
CN201610562441.XA
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.)
Inspur Software Group Co Ltd
Original Assignee
Inspur Software Group 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 Inspur Software Group Co Ltd filed Critical Inspur Software Group Co Ltd
Priority to CN201610562441.XA priority Critical patent/CN106126309A/en
Publication of CN106126309A publication Critical patent/CN106126309A/en
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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a timed task scheduling method based on ONS, which belongs to the technical field of computer software and adopts an AliONS message mechanism to asynchronously start the JOB class of each client service system, and automatically asynchronously feed back the JOB execution state or result to a server after the JOB execution of each client is finished. The resource consumption of the server is saved, and each business system independently writes respective JOB implementation codes and is flexible and configurable.

Description

A kind of timed task dispatching method based on ONS
Technical field
The present invention relates to computer software technology, particularly relate to a kind of timed task dispatching method based on ONS.
Background technology
Traditional timed task starts based on server end, the service of each service sub-system of far call, belongs to same Step call-by mechanism, this mechanism has the disadvantage that
1, the method for synchronization easily causes wait deadlock, the phenomenon that other code cannot perform;
2, the method for synchronization is the most overtime, if timed task allocating time interval is too short, easily causes operation system
3, code has had not carried out, and has carried out again the problem of restarting;
4, the timed task of traditional approach cannot normally follow the tracks of each operation system JOB state;
5, the timed task of traditional approach cannot carry out flexible configuration for single node and cluster very well.
Summary of the invention
The present invention proposes a kind of timed task dispatching method based on ONS.The scene of this timed task method is applicable to Controlling the remote activation of each separate customer end operation system task, each operation system writes the task scheduling code of correspondence voluntarily, And the dynamic configuration of single node or cluster can be carried out for the character of timed task, adapt to the automatic extension of clustered node.
The technical problem to be solved in the present invention is:
1, solve the method for synchronization and easily cause wait deadlock, the phenomenon that other code cannot perform;
2, solve the method for synchronization the most overtime, if timed task allocating time interval is too short, easily cause operation system Code has had not carried out, and has carried out again the problem of restarting;
3, the problem that the timed task of traditional approach cannot normally follow the tracks of each operation system JOB state is solved.
The technical scheme that the present invention provides:
1, service end unification provides timed task jar bag for each operation system, and each operation system writes JOB code voluntarily;
2, timed task jar bag provides RunJobMessageListener and ShowMethodMessageListener Monitoring, wherein RunJobMessageListener can obtain and achieves the bean of IJob interface and be sent to service end, ShowMethodMessageListener class can monitor the enabled instruction from service end, starts and achieves IJob interface The execute method of class;
3, server end provides united portal and is timed the unified configuration of task, can choose service sub-system jar The bean information achieving IJob interface class of bag feedback;The time interval can called with configuring timing tasks and needs transmit Parameter;
4, service end unification sends timed task enabled instruction to client, after jar bag listens to this instruction, automatically performs IJob realizes the execute method of class, and passes to service end by asynchronous for task action result.
Timed task of the present invention is based on Ali's ONS asynchronous message mechanism, it is not necessary to consider the problem that server synchronization waits, joint Save service end resource consumption, and each operation system has been write alone respective JOB and realized code, can configure flexibly.
The beneficial effect that technical solution of the present invention is brought
1, solve synchronization to wait, the outspent problem of resource;
2, each service sub-system writes alone the service code of oneself, and the degree of coupling is substantially reduced;
3, united portal platform is timed task configuration, convenient overall control;
Accompanying drawing explanation
Fig. 1 is the block mold schematic diagram of the present invention.
Detailed description of the invention
Below present disclosure is carried out more detailed elaboration:
The timed task that the present invention is applicable between each independent utility calls, the multiple service sub-system of JOB server controls JOB call;
The present invention is based on Ali's ONS message mechanism, and asynchronous initiation JOB enabled instruction, each service sub-system of Asynchronous Reception are anti- The JOB state of feedback;
JOB service end unification provides timed task jar bag for each service sub-system, it is provided that IJob interface, each operation system Need to realize IJob interface;The meeting AM automatic monitoring of jar bag realizes the class of IJob interface, and feeds back to service end in time;
The united portal that each operation system needs login service end to provide is timed the configuration of Task Scheduling Mechanism, the page In can select to realize the bean information of IJob interface, and parameter configuration can be carried out;
Service end carries out the United Dispatching of task based on quartz bag, sends JOB enabled instruction to each operation system, regularly Task jar bag can receive enabled instruction, and automatically calls the task class realizing IJob interface.Citing step:
Service sub-system introduces JOB.jar;
Service sub-system writes Bean, it is achieved the execute of IJob, as follows:
The united portal that login service end provides, enters the task scheduling page, is timed the unified configuration of task.

Claims (3)

1. a timed task dispatching method based on ONS, it is characterised in that
Employing Ali's ONS message mechanism, asynchronous unlatching each client traffic system JOB class, after each client JOB has performed, Automatically JOB is performed state or result asynchronous feedback to service end.
Method the most according to claim 1, it is characterised in that
Service end unification provides timed task jar bag for each operation system, and each operation system writes JOB code voluntarily;
Timed task jar bag provides RunJobMessageListener and ShowMethodMessageListener and monitors, Wherein RunJobMessageListener can obtain and achieves the bean of IJob interface and be sent to service end, ShowMethodMessageListener class can monitor the enabled instruction from service end, starts and achieves IJob interface The execute method of class;
Server end provides united portal and is timed the unified configuration of task, can choose service sub-system jar bag feedback The bean information achieving IJob interface class;The time interval can called with configuring timing tasks and the parameter needing transmission;
Service end unification sends timed task enabled instruction to client, after jar bag listens to this instruction, automatically performs IJob real The execute method of existing class, and pass to service end by asynchronous for task action result.
Method the most according to claim 2, it is characterised in that the timed task that can be used between each independent utility calls, The JOB of the several service sub-system of JOB server controls calls.
CN201610562441.XA 2016-07-15 2016-07-15 ONS-based timed task scheduling method Pending CN106126309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610562441.XA CN106126309A (en) 2016-07-15 2016-07-15 ONS-based timed task scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610562441.XA CN106126309A (en) 2016-07-15 2016-07-15 ONS-based timed task scheduling method

Publications (1)

Publication Number Publication Date
CN106126309A true CN106126309A (en) 2016-11-16

Family

ID=57283899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610562441.XA Pending CN106126309A (en) 2016-07-15 2016-07-15 ONS-based timed task scheduling method

Country Status (1)

Country Link
CN (1) CN106126309A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110868449A (en) * 2019-10-14 2020-03-06 深圳市非零无限科技有限公司 Method and system for realizing timing task based on asynchronous message

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604242A (en) * 2009-07-17 2009-12-16 深圳市珍爱网信息技术有限公司 Realize the system of timed task in the Java application system
CN104021452A (en) * 2014-06-23 2014-09-03 浪潮集团有限公司 Method for integrating various service systems at cloud computing server side
CN104536819A (en) * 2014-12-29 2015-04-22 同程网络科技股份有限公司 Task scheduling method based on WEB service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604242A (en) * 2009-07-17 2009-12-16 深圳市珍爱网信息技术有限公司 Realize the system of timed task in the Java application system
CN104021452A (en) * 2014-06-23 2014-09-03 浪潮集团有限公司 Method for integrating various service systems at cloud computing server side
CN104536819A (en) * 2014-12-29 2015-04-22 同程网络科技股份有限公司 Task scheduling method based on WEB service

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110868449A (en) * 2019-10-14 2020-03-06 深圳市非零无限科技有限公司 Method and system for realizing timing task based on asynchronous message
CN110868449B (en) * 2019-10-14 2022-03-22 深圳市非零无限科技有限公司 Method and system for realizing timing task based on asynchronous message

Similar Documents

Publication Publication Date Title
CN104991952B (en) A kind of method of intelligent data distribution flow engine and its synchrodata
CN106406905B (en) Configuration method and system for SETUP option of BIOS of server
CN204614046U (en) Novel building office attendance checking system
CN103077246A (en) Netty-based large screen visualization platform data push system
CN106776829A (en) A kind of data guiding system and its method of work
CN103235835A (en) Inquiry implementation method for database cluster and device
CN103200350A (en) Nonlinear cloud editing method
CN104657150A (en) Automatic operation and maintenance method under cluster environment
CN105389207A (en) Adaptive data request processing method and apparatus, task scheduler and adaptive data request processing system
CN105138598A (en) Method and system for remotely timing task
CN111240935A (en) Automatic intelligent operation and maintenance system and operation and maintenance method
CN104346219A (en) Method and equipment for system scheduling
CN105471654B (en) A kind of configuration data automatic loading method based on FC network
CN106126309A (en) ONS-based timed task scheduling method
CN104865941B (en) A kind of implementation method of process control station task scheduling
CN104133674A (en) Heterogeneous system and model synchronization method of heterogeneous system
CN110401939B (en) Low-power consumption bluetooth controller link layer device
CN104486149A (en) Finite-state machine method for ground tests
CN109284935A (en) A kind of task processing system based on micro- assistance the superior and the subordinate office group
CN102469150B (en) Long-range control method of embedded equipment
CN104951346A (en) Process management method for embedded system as well as system
CN108337285A (en) A kind of communication system and communication means
CN109634749B (en) Distributed unified scheduling method and device
CN107122246A (en) Intelligent numerical simulation job management and feedback method
CN105467925A (en) Integration system of production equipment monitoring network

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: 20161116