Interviewer: How to ensure the implementation of the order of scheduled tasks do?

01.  throwing bricks

Knock on the blackboard, speaking focus. Today I will throw open a topic, which I usually always talk about when interviewing candidates, see if you have the relevant Solutions?

 

Q: There are A, B two regular tasks, task B to be executed after completion of the task A execution, how to ensure the execution order of tasks?

 

A: subconscious: what, what, what, look ignorant? Mood can only be described as the following figure.

640?wx_fmt=png

 

Engaged in finance-related R & D programmer, more or less understood that a complete system, would like clockwork, hidden behind a lot of running gear tasks. Wherein the system between each timing task will inevitably be pre-dependency.

 

For business scenarios: the docking of a bank financial products, if you want to return statistics, the most common way is: the two sides agreed a fixed time, time earn money from the bank file, and then parse the file storage revenue (task A); then the implementation of revenue accounting tasks (task B).

 

So how do you guarantee the implementation of revenue accounting task B, task A document to obtain income has completed the implementation of it?

 

02.  Thinking

 

Figure that can understand, no longer blind vernacular, Yiyanbuge, drawing directly on diagrams help thinking, I believe you carefully look at pictures, you can certainly figure out the Editor's Note.

 

640?wx_fmt=png

 

 

03. why not

 

Process to figure out, then realize it every minute. Briefly about the most primitive and simple realization of ideas.

 

First, design a batch task table definition t_job_define, the removal of two core fields to indicate what.

Task Number: JOB_ID

Pre-Task Number: PRE_JOB_ID

 

Then design a batch job to run batch details table t_job_run_detail, the removal of two core fields to indicate what.

Task Number: JOB_ID

Batch run time: BATCH_DATE

 

Finally with a map, interpretation, I'm sure you can understand.

 

640?wx_fmt=png

 

 

04.  sublimation

 

Do not like the soil guns, try a soil exchange artillery gun. You have the energy, check out Azkaban ( Azkaban), after all, do not need too deeply for each technology, when used in deep nor too late. Be aware, however, skills are more than body .

 

https://azkaban.github.io/

640?wx_fmt=png

 

05. Finally,

 

All roads lead to Rome ideas, I'm sure you will have many unique insights, there are some good ideas to achieve, by means of "Strange" in the sentence "yellow black Beaver Beaver, who was the male rat," in fact, is Deng Grandpa said, "Whether black or white, it catches mice is a good cat."

 

Today's share to this end, mainly want to express simple ideas, you get to yet?

 

Guess you like

Origin www.cnblogs.com/socoool/p/12629799.html