title: How to set a rest api endpoint as Storm spout?
body: <p>I would like to setup a rest api endpoint as a storm spout i.e. whenever a request is made to the endpoint url (for ex. <a href="http://example.com/search?q=test" rel="nofollow">http://example.com/search?q=test</a>) then I would like to execute a storm topology with certain bolts.</p>
  
  <p>The problem is that not all the time requests are made also, the spout's <code>nextTuple()</code> method should be called at a certain interval of time and there is no idea whatsoever about this interval. And how could I also listen to a http url for request and execute the topology whenever a request is made? How to control concurrent requests and how could I determine the no. of workers to execute the topology because traffic to that url is uncertain.</p>
  
  <p>One alternative workaround, is I thought of pushing the requests to the kafka queue as and when a request is made and then using the kafka spout. Any other idea on doing this without using kafka?</p>
  
  <p>I need to do two jobs: process the request into json format and then produce the json string to kafka queue. Is storm a better solution for this? </p>
  
  <p>Do I have to consider an alternative framework like Spark to do this?</p>