CN106776788B - A kind of database subsystem design method based on DSS frame - Google Patents

A kind of database subsystem design method based on DSS frame Download PDF

Info

Publication number
CN106776788B
CN106776788B CN201611044742.XA CN201611044742A CN106776788B CN 106776788 B CN106776788 B CN 106776788B CN 201611044742 A CN201611044742 A CN 201611044742A CN 106776788 B CN106776788 B CN 106776788B
Authority
CN
China
Prior art keywords
database
class
dss
function
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.)
Active
Application number
CN201611044742.XA
Other languages
Chinese (zh)
Other versions
CN106776788A (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.)
Xiamen Municipal Smart City Technology Co., Ltd
Original Assignee
Xiamen Pujie Mdt Infotech 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 Xiamen Pujie Mdt Infotech Ltd filed Critical Xiamen Pujie Mdt Infotech Ltd
Priority to CN201611044742.XA priority Critical patent/CN106776788B/en
Publication of CN106776788A publication Critical patent/CN106776788A/en
Application granted granted Critical
Publication of CN106776788B publication Critical patent/CN106776788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • 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
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention discloses a kind of database subsystem design method based on DSS frame, comprising the following steps: step 1, design database mission thread Similar integral from DSS system thread class, design database task class is inherited from DSS task class in DSS modular construction;Step 2, design database subsystem class and subsystem execute interface class in DSS subsystem structure;Step 3, the call back function definition for increasing database manipulation in the call back function structure in the Private.h file of DSS frame;Increase database manipulation function declaration in Callbacks.h file, while increasing statement function in Callbacks.cpp file;The statement of reference data library handling function in QTSS.h;The function pointer assignment of database handling function in initialization callback function in qtsserver.cpp.The present invention solves the problems, such as that ODBC subsystem task is seized, function is simple and its derivative all kinds of under existing DSS frame.

Description

A kind of database subsystem design method based on DSS frame
Technical field
The present invention relates to a kind of database subsystem design methods based on DSS frame.
Background technique
Darwin Streaming Server abbreviation DSS.DSS is that the open source real time flow medium that Apple company provides plays Server program, entire program are write using pure C++, and it is former to follow the programmings such as high-performance, simple, modularization in design Then, must accomplish that program is efficient, expandability is good, therefore DSS server system be in cross-platform support it is quite ideal, It may operate in the windows kernel version of Windows NT, 2000 Windows or more, while good can also run In the various versions of * NIX, including the measured Streaming Media of Mac OS X, Linux, FreeBSD, Solaris, while DSS Agreement RTSP, RTP/RTCP is developed, therefore has extremely strong popularity and versatility with upper.
On this basis, DSS Frame Design is more complicated at one, the relatively clear streaming media server of hierarchical structure System, mainly by basic function component, (network, string processing, memory open up release, module tool, and internal error message is determined Justice, global catalog etc.), each subsystem (RTSP, RTP, RTCP etc.), various feature card (authentication, identity Authorization, data flow pretreatment, Data Stream Processing, the processing of the tunnel HTTP, server message reply etc.) it is composed, Hen Duokai Hair personnel mainly will do it the exploitation of various feature cards, dynamically load be carried out when server starting, when main flow shape Corresponding plug-in unit will be called when the processing of state machine is to corresponding state, server gives control to plug-in unit and carries out corresponding function at this time It can running.Therefore, on this basis from the angle for using structure, server is divided into two bulks, server internal with And outside server, server internal is made of various basic function components and subsystem, by feature card outside server It forms, the interaction of data and the reality of basic function is carried out by the api interface that function pointer is designed between the two parts It is existing.
However developer often needs to design plug-in unit during developing incessantly, while being also required to server Inside carries out necessary function increase or modification, existing DSS frame for the data source except audio and video data streams from It is loaded in configuration file, a large amount of configuration parameters including server starting, the data needed in subsystem operational process, mould Data required for block plug-in unit, such as authentication, for IP sections of limitation etc. of access, this is largely to item Purpose actual use causes great inconvenience, therefore it is during actual items are used that the function of database, which is added, in DSS frame It is very necessary, and the database function design in existing DSS frame is relatively simple, there is no the timesharing according to DSS frame The another database tasks of needs of the timeliness feature of feature and database manipulation data namely in DSS timesharing frame produce Raw preemption function, and original task is interrupted under the premise of protecting original task various states, in success from database It obtains data and restores original task again later, cause to will appear various unexpected serious problems in use.In order to avoid These problems, the open number of in summary server characteristics and ODBC(Open Database connect that the present invention mentions According to interconnection) database of mode uses, and detailed design is based on DSS timesharing frame ODBC subsystem function.
Summary of the invention
It is an object of the present invention to provide a kind of database subsystem design methods based on DSS frame, solve Database subsystem task is seized under existing DSS frame, function is simple and its derivative all kinds of problems.
To achieve the goals above, technical scheme is as follows:
A kind of database subsystem design method based on DSS frame, comprising the following steps:
Step 1, in DSS modular construction design database mission thread Similar integral from DSS system thread class, design data Library task class is inherited from DSS task class;The database tasks thread class be used for as database thread component with an independence and Unique thread is responsible for propelling data library task, and this thread is responsible for safeguarding a task heap, when this task heap will be nearest Between piece task pop-up be sent to real work thread;The database tasks class is used to call when the starting of DSS server static Thread in the mission thread class of initialization function log-on data library is also used to that database tasks class thread interface is called to execute data Library task insertion database mission thread class in Priority Queues operation and for each attribute of maintenance task and operation Function, the database tasks thread class and database task class friendly metaclass each other;
Step 2, design database subsystem class and subsystem execute interface class in DSS subsystem structure;The data Library subsystem class subsystem class is to be inherited from database interface class as a container first, and it is related to be responsible for various database tasks It checks and most important operation function, the operation function is used to execute actual database manipulation and store implementing result In the database subsystem data dictionary in DSS data system, for real important execution function;The database interface is responsible for Execute the initialization of database initial work and global catalog;
Step 3, the readjustment for increasing database manipulation in the call back function structure in the Private.h file of DSS frame Function definition;
Increase database manipulation function declaration in Callbacks.h file, while increasing in Callbacks.cpp file Add statement function;
The statement of reference data library handling function in QTSS.h;
The function pointer of database handling function is assigned in initialization callback function in qtsserver.cpp Value;It completes to be designed by the api interface of DSS lower portion to DSS frame external plug-in.
Preferably, in the step 1, the design database mission thread in the general utility tool class libraries in DSS modular construction Similar integral is inherited from the task class of DSS frame, database tasks thread class from DSS system thread class, design database task class It is that the database tasks uniquely run in DSS frame push thread, and constitute database subset as database thread component The infrastructure component of system.
Preferably, the database tasks thread class includes the member variable of a heap data structure, i.e. Priority Queues, this A Priority Queues is constructed by a complete binary tree, and the father node of the complete binary tree is consistently greater than or is less than left and right Node, this Priority Queues are used to push away the nearest database tasks of timeslice toward root vertex, while also including that heap is become Amount seize the heap mutex of protection and the heap semaphore of driving heap variable work.
Preferably, the database tasks thread class includes an entrance function, which appoints for judging whether there is Business element, when whether task heap length is greater than 0, there are task elements, if having existed task element, entrance function is again Judge whether the timeslice in current task element has arrived at time-out, will work as if the timeslice of current task has timed, out Preceding task is sent to progress actual operating data library task in the mission thread in DSS frame;
The database tasks thread class further includes an execution database statement function, the execution database statement function For by database tasks pointer propulsion reactor variable, while increasing length, the entrance function of driving task thread class works.
Preferably, the database tasks class includes a static initialization function and encapsulates database tasks thread class In really execute the execution database statement function of function, static initialization function system initialization during the system startup process It is called when function, database tasks push thread brings into operation when calling the static initialization function;
Api interface basis of the execution database statement function as database will be supplied to the outer of DSS frame in API It is called when portion's plug-in unit use.
Preferably, the database tasks class includes heap member's class, and heap member class becomes as the member of database tasks class Amount, also the member variable as this friend's metaclass of database tasks thread class, heap member variable have the change for saving task pointer The time-out time of amount and current task timeslice;
The database tasks class further includes database tasks event enumeration structure, is defined in task events enumeration structure The event definition needed to be implemented when the operation of DSS worker thread is admitted to when database tasks are practical.
Preferably, database interface includes a static initialization function, and the static initialization function is in database subset It is called in advance before the formal starting of system, is responsible for carrying out opening up for global catalog to the related data of database subsystem, this A little data dictionaries will interact use in DSS lower portion and external plug-in.
Preferably, in the step 2, the design database subsystem in the Server.tproj structure of DSS subsystem structure It unites class, this Similar integral is from the varying string formatted class in database interface and DSS frame.Class database will be as true Positive task carrier is sent into the worker thread of DSS frame and is run;
It further include step 4 after the step 3: the design data in the Server.tproj structure of DSS subsystem structure The interface class of library subsystem, the interface Similar integral is from dictionary class and database tasks class, and wherein dictionary class is in DSS frame Data dictionary class, this interface class are used to provide the various operation interfaces in the database manipulation for executing database mode, also use In the value for saving each property parameters in database, and for returning the result collection after the execution of in store database tasks.
Preferably, database includes a static initialization function, a real task execution function and operation function, The static initialization function carries out the auxiliary information initialization of task;The real task execution function is in DSS frame work thread In will be extracted execution;The operation function executes the database manipulation under database mode, database manipulation are as follows: obtain first SQL statement is taken, database statement is then fed into and executes in function, then obtains the counting of implementing result collection and final result storage Into the data dictionary variable in database interface;
The string format class of variable-length in DSS frame is used for the result set of database operation function, this Class will open up the space for becheduleding for size for storing result set when constructed fuction, becheduled for if result set is greater than The space of size can open up the space of 2 times of life size automatically.
Preferably, for database manipulation function: executing and be directed toward in being realized inside database statement using database object The parameter of production database sentence is defaulted as 0, namely another database tasks needs are pushed into real work immediately from heap Thread, while returning in calling module, the API of database returns to the numerical value as unit of millisecond once calling and will use It carries out interrupting current task module.
After adopting the above scheme, the beneficial effects of the present invention are: the present invention is according to the timesharing feature of DSS frame, and number According to the timeliness feature of library operation data, the database subsystem design method of design, solves database under existing DSS frame Subsystem task is seized, function is simple and its derivative all kinds of problems, and the database subsystem of design can be in the lower portion side DSS Just use database manipulation, and be opened to perfect database API operation interface and be supplied to DSS frame external plug-in, make It is more convenient to obtain the exploitation based on DSS frame, more meets the utilization of actual items.
Below in conjunction with the drawings and specific embodiments, the present invention will be further described.
Detailed description of the invention
Fig. 1: component structure diagram of the database of the present invention in DSS frame;
Fig. 2;Structural schematic diagram of the database subsystem of the present invention in DSS frame;
Fig. 3-1;Database subsystem of the present invention driving condition schematic diagram in DSS frame;
Fig. 3-2 is to push the task of timeslice time-out into task class mission thread status diagram (when waiting 13 milliseconds Between value task have arrived at, push out execution);
Fig. 3-3 is that will shift tree root status diagram onto according to 14 milliseconds of time value tasks of waiting of Priority Queues mode;
Fig. 3-4: supplement schematic diagram is carried out to empty node;
Fig. 3-5: a complete quene state schematic diagram is formed again;
Fig. 4: data subsystem of the present invention operation schematic diagram in DSS external plug-in.
Specific embodiment
As shown in Figure 1, a kind of database subsystem design method based on DSS frame that the present invention discloses, including it is following Step:
Step 1: the design database task in DSS modular construction (general utility tool class libraries CommonUtlitiesLib) Thread class (ODBCTaskThread) is inherited from DSS system thread class (OSThread), design database task class (ODBCTask) it is inherited from DSS task class (Task), database tasks thread is responsible for push with an independent unique thread Database tasks, one task heap (Priority Queues) of this thread major maintenance, this thread is by timeslice task nearest in heap Real work thread is sent in pop-up:
Above-mentioned database tasks thread class and database task class friendly metaclass each other, database tasks thread class is as data Library thread component is that the database tasks uniquely run in DSS frame push thread, and constitute the basis of database subsystem Component;
Step 2: in DSS subsystem structure (Server.tproj) design database subsystem class (QTSSODBC) with And subsystem executes interface class (QTSSODBCInterface);Database subsystem class is inherited from as a container first Database interface class, is responsible for various database tasks coherence checks and most important operation function (Run), this function are main It executes actual database manipulation and result is stored in the database subsystem data dictionary in DSS data system, be true Positive important execution function:
Step 3: for database interface class, it is inherited from database tasks class, database tasks class then inherit again in DSS task class, meanwhile, task class and system thread class friendly metaclass each other, when server initiation, database tasks class Static initialization function will be called to start log-on data library thread, simultaneously as the entrance function of system thread class is empty letter Number, therefore database thread will run the unique thread of oneself, that is, database tasks push thread (pushes away database tasks It is sent into heap variable Priority Queues):
Step 4: task class thread is constantly in wait state, it can wait the arrival of two kinds of task statuses, one is Being greater than 0 value of the task is returned in task implementation procedure, such task will be stored in heap types of variables (preferential team Column) task queue in, when timeslice reach when, preferentially popping up in this queue for task is run;Second It is the delivery of common task, such task is delivered in normal task queue, when there is no appoint in Priority Queues To be searched when business this common task queue whether the task of having time piece time-out, then bring into operation correspondence if any Operation function:
5th step, as shown in Figure 2: when there is one to need to be executed in task class thread by the task that database manipulation interrupts When, she can return to a value as unit of millisecond and interrupt oneself, and task class mission thread will after interruption The heap variable (in Priority Queues) being fed into task class thread, next time when return value (timeslice time-out) reaches It waits, task class only can just execute preferential executing in Priority Queues for task after the task execution in Priority Queues is complete Task in common task queue.Therefore after current task is preempted, preferential execute will be started and seize task i.e. data The real executor of library database tasks runs function.Finally after cdr database task execution is completed, data pass through Data dictionary is sent into data field, resumes waiting for the task execution being originally preempted, original task will obtain database data at this time:
Database tasks thread class further includes an execution database statement function, which is used for By database tasks pointer propulsion reactor variable, while increasing length, the entrance function of driving task thread class works
Shown in 6th step, such as Fig. 3 serial (Fig. 3-1,3-2,3-3,3-4): the entrance function in task class thread how will The task that timeslice has arrived at is pushed to the process of task class mission thread execution, how is using preferential shown in Fig. 3 series The data structure of queue come realize priority tasks push, Priority Queues is a kind of abstract data type in computer science, Each element in Priority Queues has respective priority, and the element of highest priority is most served before;Priority is identical Element serviced according to its sequence in Priority Queues, Priority Queues is often realized with heap.In the present invention, preferentially The required timeslice waited of operation indicates again after the priority of queue tasks interrupt, if all nodes in Fig. 3 series Time value (priority of element in Priority Queues) be 0 if then indicate that database tasks will be performed immediately, if it is it His numerical value, then it represents that being interrupted for task needs that timeslice how long is waited to be performed again.
7th step, as shown in Figure 4: in the call back function structure in DSS frame Private.h file increase database number According to the call back function definition of library operation, then increases cdr database handling function in Callbacks.h and state, while Statement function is realized in Callbacks.cpp, the statement of reference data library handling function, finally exists in QTSS.h The function pointer assignment of database handling function in initialization callback function in qtsserver.cpp is completed by DSS The api interface of lower portion to DSS frame external plug-in designs.When exterior plug-in unit needs then to adjust using database function With the api interface defined in system, while data dictionary is carried out to seize safeguard protection.
The above-mentioned Private.h file of the present invention, Callbacks.h file, Callbacks.cpp file are DSS frames In have been defined file, have its peculiar function respectively.
Preferably, database tasks thread class includes the member variable of heap (heap variable, heap) data structure, i.e., excellent First queue, this Priority Queues are constructed by a complete binary tree, the father node of the complete binary tree be consistently greater than or Less than left and right child node, this Priority Queues is used to push away the nearest database tasks of timeslice toward root vertex, while also wrapping Include the heap semaphore of the heap mutex (heapMutex) and driving heap variable work that seize for heap variable protection (heapCond).
Preferably, the database tasks thread class includes an entrance function (Entry()), which is for judgement No there are task elements, and when whether task heap length is greater than 0, there are task elements, if having existed task element, enter Mouth function judges whether the timeslice in current task element has arrived at time-out again, if the timeslice of current task has surpassed Current task is sent progress actual operating data library task in the mission thread in DSS frame by Shi Ze;Task class thread one In being directly waited for, she can wait the arrival of two kinds of task statuses, and one is return to be greater than 0 value in task implementation procedure Task, such task will be stored in the task queue of heap types of variables (Priority Queues), when timeslice reaches When, preferentially popping up in this queue for task is run.It is for second the delivery of common task, such Business is delivered in normal task queue, will search this common task queue when task is not present in Priority Queues Whether the task of having time piece time-out, then bring into operation corresponding operation function if any.
Preferably, the database tasks class includes a static initialization function (static void Initialize ()) and encapsulate the execution database statement function that function is really executed in database tasks thread class, the static initialization letter Count called when system initialization function during the system startup process, database tasks push when calling the static initialization function Thread brings into operation;
Api interface basis of the execution database statement function as database will be supplied to the outer of DSS frame in API It is called when portion's plug-in unit use.
Preferably, the database tasks class includes heap member's class, and heap member class is as database tasks class (pointer) Member variable, also there is preservation task to refer to for the member variable as this friend's metaclass of database tasks thread class, heap member variable The variable of needle and the time-out time of current task timeslice;
The database tasks class further includes database tasks event enumeration structure, is defined in task events enumeration structure The event definition needed to be implemented when the operation of DSS worker thread is admitted to when database tasks are practical.
Preferably, database interface includes a static initialization function, and the static initialization function is in database subset It is called in advance before the formal starting of system, is responsible for carrying out opening up for global catalog to the related data of database subsystem, this A little data dictionaries will interact use in DSS lower portion and external plug-in.
Preferably, database includes a static initialization function, a real task execution function and operation function, The static initialization function carries out the auxiliary information initialization of task;The real task execution function is in DSS frame work thread In will be extracted execution;The operation function executes the database manipulation under database mode, database manipulation are as follows: obtain first SQL statement is taken, database statement is then fed into and executes in function, then obtains the counting of implementing result collection and final result storage Into the data dictionary variable in database interface;
The string format class of variable-length in DSS frame is used for the result set of database operation function, this Class will open up the space for becheduleding for size for storing result set when constructed fuction, becheduled for if result set is greater than The space of size can open up the space of 2 times of life size automatically.
Preferably, for database manipulation function: executing and be directed toward in being realized inside database statement using database object The parameter of production database sentence is defaulted as 0, namely another database tasks needs are pushed into real work immediately from heap Thread, while returning in calling module, the API of database returns to the numerical value as unit of millisecond once calling and will use Interruption current task module is carried out because database tasks start to seize is exactly for this value returned as unit of millisecond Business of formerly helding the post of needs to wait the time re-executed, this time needs basis currently to need to sentence the time of database manipulation It has no progeny setting, prevents nested task.
The above is only specific embodiments of the present invention, not to the restriction of protection scope of the present invention.All setting according to this case The equivalent variations that meter thinking is done, each falls within the protection scope of this case.

Claims (10)

1. a kind of database subsystem design method based on DSS frame, which comprises the following steps:
Step 1, design database mission thread Similar integral is appointed from DSS system thread class, design database in DSS modular construction Similar integral be engaged in from DSS task class;The database tasks thread class is as database thread component for an independence and uniquely Thread be responsible for propelling data library task, and this thread is responsible for safeguarding a task heap, this task heap is by nearest timeslice Real work thread is sent in task pop-up;The database tasks class is used to call when the starting of DSS server static initial Change the thread in the mission thread class of function log-on data library, is also used to that database tasks class thread interface is called to execute database In task insertion database mission thread class in Priority Queues operation and for each attribute of maintenance task and operation Function, the database tasks thread class and database task class friendly metaclass each other;
Step 2, design database subsystem class and subsystem execute interface class in DSS subsystem structure;The database subsystem System class is to be inherited from database interface class as a container first, is responsible for various database tasks coherence checks and most heavy The operation function wanted, the operation function is for executing actual database manipulation and implementing result being stored in DSS data system In database subsystem data dictionary in system, for real important execution function;The database interface is responsible for executing database The initialization of initial work and global catalog;
Step 3, the call back function for increasing database manipulation in the call back function structure in the Private.h file of DSS frame Definition;
Increase database manipulation function declaration, while the increase sound in Callbacks.cpp file in Callbacks.h file Bright function;
The statement of reference data library handling function in QTSS.h;
The function pointer assignment of database handling function in initialization callback function in qtsserver.cpp;It is complete At the api interface design by DSS lower portion to DSS frame external plug-in.
2. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described In step 1, design database mission thread Similar integral is from DSS system thread in the general utility tool class libraries in DSS modular construction Class, design database task class are inherited from the task class of DSS frame, database tasks thread class as database thread component, It is that the database tasks uniquely run in DSS frame push thread, and constitute the infrastructure component of database subsystem.
3. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described Database tasks thread class includes the member variable of a heap data structure, i.e. Priority Queues, this Priority Queues is complete by one Full binary tree constructs, and the father node of the complete binary tree is consistently greater than or is less than left and right child node, this Priority Queues It for pushing away the nearest database tasks of timeslice toward root vertex, while also including the heap for seize for heap variable protection Mutex and the heap semaphore of driving heap variable work.
4. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described Database tasks thread class includes an entrance function, which works as task heap for judging whether there is task element There are task elements when length is greater than 0, if having existed task element, entrance function is judged again in current task element Whether timeslice has arrived at time-out, sends DSS frame for current task if the timeslice of current task has timed, out In mission thread in carry out actual operating data library task;
The database tasks thread class further includes an execution database statement function, which is used for By database tasks pointer propulsion reactor variable, while increasing length, the entrance function of driving task thread class works.
5. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described Database tasks class includes a static initialization function and encapsulates real important execution letter in database tasks thread class Several execution database statement functions, the static initialization function during the system startup process system initialization function when adjusted With database tasks push thread brings into operation when calling the static initialization function;
Api interface basis of the execution database statement function as database, inserts the outside for being supplied to DSS frame in API It is called when part use.
6. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described Database tasks class includes heap member's class, and member variable of the heap member class as database tasks class is also used as database tasks The member variable of this friendly metaclass of thread class, heap member variable have the variable and current task timeslice for saving task pointer Time-out time;
The database tasks class further includes database tasks event enumeration structure, and definition is when number in task events enumeration structure The event definition needed to be implemented when the operation of DSS worker thread is admitted to according to library task is practical.
7. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: data Bank interface includes a static initialization function, which adjusts in advance before database subsystem formally starts With the responsible related data to database subsystem carries out opening up for global catalog, these data dictionaries will be in DSS frame Inside and outside plug-in unit interacts use.
8. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: described In step 2, design database subsystem class, this database subset in the Server.tproj structure of DSS subsystem structure Similar integral unite from the varying string formatted class in database interface and DSS frame;Class database will appoint as real Business carrier is sent into the worker thread of DSS frame and is run;
It further include step 4 after the step 3: design database in the Server.tproj structure of DSS subsystem structure The interface class of system, the interface Similar integral of the database subsystem are from dictionary class and database tasks class, wherein dictionary class Data dictionary class in DSS frame, the interface class of the database subsystem are used to provide the database behaviour for executing database mode Various operation interfaces in work are also used to save the value of each property parameters in database, and appoint in store database Collection is returned the result after business execution.
9. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: data Library includes a static initialization function, a real important execution function and operation function, the static initialization function The auxiliary information of carry out task initializes;Really important execution function will be extracted in DSS frame work thread for this It executes;The operation function executes the database manipulation under database mode, database manipulation are as follows: acquisition SQL statement first, then It is sent into database statement to execute in function, then obtains the counting of implementing result collection and final result is stored into database interface Data dictionary variable;
The string format class of variable-length in DSS frame, this DSS frame are used for the result set of database operation function The string format class of variable-length will open up the space of predefined size for storing knot when constructed fuction in frame Fruit collection, if the space that result set is greater than predefined size can open up the space of 2 times of life size automatically.
10. a kind of database subsystem design method based on DSS frame as described in claim 1, it is characterised in that: for Database manipulation function: it executes in being realized inside database statement and is directed toward production database sentence using database object Parameter is defaulted as 0, namely another database tasks needs are pushed into real work thread immediately from heap, while returning to calling module In, the API of database, which is once called, will use numerical value of the return one as unit of millisecond carry out interrupting current task module.
CN201611044742.XA 2016-11-24 2016-11-24 A kind of database subsystem design method based on DSS frame Active CN106776788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611044742.XA CN106776788B (en) 2016-11-24 2016-11-24 A kind of database subsystem design method based on DSS frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611044742.XA CN106776788B (en) 2016-11-24 2016-11-24 A kind of database subsystem design method based on DSS frame

Publications (2)

Publication Number Publication Date
CN106776788A CN106776788A (en) 2017-05-31
CN106776788B true CN106776788B (en) 2019-10-29

Family

ID=58974033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611044742.XA Active CN106776788B (en) 2016-11-24 2016-11-24 A kind of database subsystem design method based on DSS frame

Country Status (1)

Country Link
CN (1) CN106776788B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4661047B2 (en) * 2003-05-30 2011-03-30 ソニー株式会社 Information processing apparatus, information processing method, and computer program
JP2009059122A (en) * 2007-08-31 2009-03-19 Renesas Technology Corp Data processing system
FR2962619B1 (en) * 2010-07-09 2013-01-18 Thales Sa DEVICE FOR ACCESSING DATA ON BOARD AN AIRCRAFT
CN102624822A (en) * 2011-11-03 2012-08-01 李宗诚 ICT (information and communication technology) technical support design for providing functional module for regional value chain network configuration
US9495395B2 (en) * 2013-04-11 2016-11-15 Oracle International Corporation Predictive diagnosis of SLA violations in cloud services by seasonal trending and forecasting with thread intensity analytics

Also Published As

Publication number Publication date
CN106776788A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN102227712B (en) Efficient automated translation of procedures in constraint-based language
CN102037447B (en) Notificaton-based constraint set translation to imperative execution
US8042091B2 (en) Automatic composition of model transformations
US7581225B2 (en) Multithreading with concurrency domains
CN108762900A (en) High frequency method for scheduling task, system, computer equipment and storage medium
MX2008011914A (en) Abstract execution model for a continuation-based meta-runtime.
CN103678135A (en) System and method for achieving cross-process and cross-thread debugging in large-data environment
CN105607904B (en) The Quick Development Framework and its application method of communication software based on Linux platform
CN106681820A (en) Message combination based extensible big data computing method
US20060085400A1 (en) Data access layer design and code generation
Lausdahl et al. Semantics of the VDM real-time dialect
CN106776788B (en) A kind of database subsystem design method based on DSS frame
Sandén Coping with Java threads
EP3223155A1 (en) Method for computing equivalence between two execution models
US20020078251A1 (en) Self-determining command path architecture
CN110412947A (en) Industrial equipment control method and its system, storage equipment
Panunzio et al. Ada ravenscar code archetypes for component-based development
CN110289043A (en) Store apparatus testing method, device, electronic equipment
Johnsen et al. Combining active and reactive behavior in concurrent objects
CN107391251A (en) Method for scheduling task and device based on Forth virtual machines
Geeraerts et al. Queue-dispatch asynchronous systems
Paynter et al. ADL: An activity description language for real-time networks
Khot Concurrent Patterns and Best Practices: Build scalable apps with patterns in multithreading, synchronization, and functional programming
CN110427210A (en) A kind of fast construction method and device of storm topology task
Merino ProcessJ: The JVMCSP Code Generator

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
CB02 Change of applicant information

Address after: Siming District of Xiamen City, Fujian province 361000 lianqianxi No. 281 4 floor

Applicant after: Xiamen PuJie Mdt InfoTech Ltd

Address before: 361006 Fujian city of Xiamen province Xiamen free trade zone area Xiangyun Road No. 93 Longzhou 310 unit A504

Applicant before: Xiamen PuJie Mdt InfoTech Ltd

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Siming District of Xiamen City, Fujian province 361006 lianqianxi No. 281 4 floor

Patentee after: Xiamen Municipal Smart City Technology Co., Ltd

Address before: Siming District of Xiamen City, Fujian province 361000 lianqianxi No. 281 4 floor

Patentee before: XIAMEN PUJIE INFORMATION TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address
CP02 Change in the address of a patent holder

Address after: 361000 13th floor, municipal building, No. 2777, Yunding Middle Road, Huli District, Xiamen City, Fujian Province

Patentee after: Xiamen Municipal Smart City Technology Co.,Ltd.

Address before: 361006 4th floor, 281 Lianqian West Road, Siming District, Xiamen City, Fujian Province

Patentee before: Xiamen Municipal Smart City Technology Co.,Ltd.

CP02 Change in the address of a patent holder