User Tools

Site Tools


development:mdc:mdc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:mdc:mdc [2021/12/13 21:12] slawrencedevelopment:mdc:mdc [2021/12/14 22:44] (current) slawrence
Line 3: Line 3:
  
 1.  ReScheduler is set via @Scheduled(fixedDelayString = "10000") 1.  ReScheduler is set via @Scheduled(fixedDelayString = "10000")
- i.   Holdes Autowired instances of the scheduleRepo (to get data), scheduler (to schedule things), and scheduleJobListener (to respond to things)+ 
 + i.   Holds Autowired instances of the scheduleRepo (to get data), scheduler (to schedule things), and scheduleJobListener (to respond to things)
  ii.  Obtains a list of schedules from the Schedule table  ii.  Obtains a list of schedules from the Schedule table
  iii. Obtains list of all current job keys for defined group "RDF_GROUP"  iii. Obtains list of all current job keys for defined group "RDF_GROUP"
Line 40: Line 41:
  ii.  This will find the correct processorBase based on the incoming message (i.e. the processor class, can be anything extending PerformanceProcessorBase, ConfigurationProcessorBase... etc.).  It will also 'assign/remember' the allocated 'agentPostProcessor' to run.  ii.  This will find the correct processorBase based on the incoming message (i.e. the processor class, can be anything extending PerformanceProcessorBase, ConfigurationProcessorBase... etc.).  It will also 'assign/remember' the allocated 'agentPostProcessor' to run.
  iii. Executes all discovery tasks per the processor class generated discoveryTask list and stops when there are no more tasks to run.  This is assuming the Processor class itself is well formed.  It should define errors into the 'errors' list and break out of any functionality if there is an unrecoverable Exception, such as a timeout, etc...  iii. Executes all discovery tasks per the processor class generated discoveryTask list and stops when there are no more tasks to run.  This is assuming the Processor class itself is well formed.  It should define errors into the 'errors' list and break out of any functionality if there is an unrecoverable Exception, such as a timeout, etc...
- iv.  When processRequest is met in the processorBase, if no more tasks to run, the startPostProcess method is called. + iv.  When processRequest is met in the processorBase and there are no more tasks to run, the startPostProcess method is called. 
- v.   The outgoing response is then 'saved locally' as a StoredOutgoingMessage+ v.   The outgoing response is then converted into a StoredOutgoingMessage.  This includes the request, response, errors, etc... 
 +        vi.  The StoredOutgoingMessage is passed to the PostProcessor's "process(StoredOutgoingMessage)" method.  This is generally class 'AgentPostProcessor'.
  
-8.  To be continued+8.  AgentPostProcessor 
 +        i.   Converts contents of the StoredOutgoingMessage into a byte[] and 'saves' it locally. 
 +        ii.  It is saved to the OutgoingMessageRepository. 
 +         
 +9.  OutgoingMessageRepository 
 +        i.   This is a basic JPA repository. 
 +        ii.  It is monitored by the OutgoingMessagePusher 
 +        
 +10. OutgoingMessagePusher 
 +        i.   Scheduled to operate in application.properties with initial delay 'rdf.agent.pushmessage.initDelayMs' and interval 'rdf.agent.pushmessage.intervalms' There are some other related pushmessage properties as well worth reviewing in application.properties and the OutgoingMessagePusher class. 
 +        ii.  Schedule runs 'checkMessageInDb()'
 +        iii. POSTs proper messages to the orchestrator as json containing the byte[] results via REST endpoint:  api/v2/task, which will run the processTaskResultList(...) method in Orchestrator's TaskControllerV2. 
 +         
 +11.  TaskControllerV2 - Process Results 
 +        i.   processTaskResultList(...) simply calls TaskController:processTaskResultList...). 
 +        ii.  QueuingDiscoveryProcessorService:processTaskResultList(...) is called.  This will go through the list and post process either a 'Trap' or a 'Task Result'
 +        iii. Places task result into the sendTaskResult RabbitMQ queue.   
 +        iv.  When pulled from Queue, AgentResultService:processAgentResponse(...) is called. 
 +  
 +12.  AgentResultService 
 +        i.   For each task, checks thresholds, looks up the task and completes it (i.e. removes it from the activeTask db table and places it in the completedTask db table) or fails the task (i.e. removes it from the activeTask db table and places it in the failedTask db table).
development/mdc/mdc.1639429966.txt.gz · Last modified: 2021/12/13 21:12 by slawrence