Challenge Overview

Competition Task Overview

Welcome to the Fall from Grace Challenge: Gracefully service failover component in Java���

In the previous challenge we have built a simple java based component that can gracefully handle the inability to connect to an HTTP(s) based service, now we need to make some enhancements to it.

ReachabilityCheckerImpl is the primary class containing the implementation.  It has many limitations. 

  1. It creates a new instance of AsyncHttpClient each time, which will in-turn create a brand new connection pool and management threads every time it is called.  We need to hand the component to inject an AsyncHttpClient client in to avoid creating new connection pools.
  2. The implementation currently will accept invalid TLS/SSL certs, which is a major security concern. We need to reject invalid certs if found. Self-signed certs should be supported.
  3. Each call to check() allocates a new ExecutorService, and thus another thread pool.  We'll run out of threads real quick like this. We need to be able to pass in a thread pool that we can reuse.
  4. The implementation only handles 500 errors, and no other response code. We need to handle the entire class of 5XX errors.
  5. It needs to support 301, 302, 307, and 308 redirects.
  6. It logs errors at the debug level, this should be updated to log errors properly. 
  7. We have to manually call ReachabilityChecker#check in our application, handle the response and then issue a new request to do the work that the app actually needs to do.  The way they set it up, this doesn't send multiple requests and provide the application with a response.  It sends multiple requests and tells you which host/IP address returned first. We need to fix this so that the check should, on finding a good connection, actually execute the HTTP request instead of just returning the availability of the service.

Testing

Unit tests are required for the code created in this challenge. And if necessary previous unit tests must be updated to work with the new code as well.

You should also provide or update the CLI based program to test the API using different parameters.

Setup

Technology Overview



Final Submission Guidelines

Submission Deliverables

  • Your code changes must be pushed to your private gitlab repo
  • Submit a zipped version of your repo to Online Review
  • Make sure your submission includes a clear guide to deploy and test / verify your submission
  • Once picked as the winner and done with fixes, you're expected to submit a merge request to the specified branch

Final Submission

For each member, the final submission should be uploaded via the challenge detail page on topcoder.com.

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30049733