I am looking for a Java web application on Amazon Web Services. A user will access a web page. On the server side, it will then make 10 queries simultaneously to different systems. Each query may take 0-10 seconds or even longer to respond, but we must return the web page in 5 seconds and any additional results with AJAX in 10 seconds. This will need to make queries in parallel. Each query will return up to 20 results. When the first 50 results have returned it will show a page of those results immediately without waiting for the other web service client calls to return. When the next 50 results have returned the page will load those through AJAX. The last 100 results will be ignored. There also needs to be time out values. The first time out to return the web page is 5 seconds. The second timeout to return the AJAX results is 10 seconds. It also needs to close connections that do not return in 10 seconds and clean up any resources, connections, or memory.
You will need to create mock web services that return mock results. You will need to create the following test scenarios
1) 4 queries return 0 results in 4 seconds, 6 queries take longer than 10 seconds. Expected result is a web page showing 0 results
2) 2 queries return 40 results in 4 seconds and 3 queries return 60 results in 6 seconds. Expected result is showing a web page with 40 results and then updating via AJAX to add 60 results. The other 5 queries finish in 8 seconds, but are skipped because we only care about the first 100 results
3) 3 queries return in 2 seconds. The first 50 results are shown on a web page in 2 seconds. 2 queries return 40 results in 8 seconds. AJAX adds 50 more results (10 from query 3, 20 from query 4 and 20 from query 5. The other 5 queries finish in 8 seconds, but are skipped because we only care about the first 100 results
4) 3 queries return in 2 seconds. The first 50 results are shown on a web page in 2 seconds. 1 query returns 20 results in 8 seconds. The other 6 queries do not return. Only 30 more results are added (10 from query 3, and 20 from query 4).
5) Repeat test 5 over 300 iterations and check the memory and connection usage.
I am looking for well documented code, build instructions, test scenarios, and review of the code to a Java Developer via Skype voice and screen sharing.
Please send tell me:
1) How it will work
2) Why it is a good solution
8 Freelancer bieten im Durchschnitt $248 für diesen Job
Easy to code, response times will depend on network latency - hard to give exact figures. Suggest an asynchronous solution in java byte code deployable in docker and AWS