Most of the batch jobs deals with updating database tables or uploading files to the containers where the listening programs picks up to process the requests. The below explained scenario is something related to the same.
Say we have a scenario where there are 10 systems which collects user requests and stores them to get processed at the end of the day. Each system has varying number of requests to be processed at varying pace by the out bound systems/listeners.
To simulate the scenario, let's say each system has a request storage directory(x) with n files per request type and Listener pick-up directory(y).Now based on the production load, the simulator need to upload file1 from x to y, n times in the duration t resulting the production transaction per seconds.
The below code snippets do the same
- Reads user inputs like duration (d mins), number of times to copy (n), source directory(x),destination directory(y), filename (a) from input file commands.txt
- Copies file from source x to destination y for n times in duration of d mins
- Checks for the file consumption at the destination y. If consumed by the listener, then does the copy and increments the success counter. If not, does not copy and also increments failure counter
- The counters will be logged to successlog.txt and failurelog.txt and gives a final summary report showing the response of the listeners and load behaviour
- Folder Strucure
- Windows: LoadInitiator Uploader Commands
- Unix: Commands LoadInitiator, Uploader
No comments:
Post a Comment