Which framework for receiving many HTTP Post requests? [closed]

I’ll be receiving many HTTP POST request, let’s assume at least 50 per minute, 24/7. I have no control over how these requests are transmitted, so I’m tied to http post here.

Which framework could I best use for receiving these many post requests? Does Spring offer a framework for handling POST push messages?

Answer

At the danger of sounding arrogant, it seems that 50 request per minute, i.e. less than one request per second, is not so many. Of course, it does depend on what the processing of the requests entails.

Spring does offer the Spring WebMVC framework (see http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html) which will most likely help you very well to achieve your task.

You”ll have to create a Controller and annotate one of the methods to handle POST requests, something like this (adapted from the Spring docs):

@Controller 
@RequestMapping("/YourPath")
public class YourController {
    @RequestMapping(method = RequestMethod.POST)
    public String processThePost(...many options to receive params from the request...) {

        // process the parameters

        return "redirect:/someFrontEndServlet";
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *