Poller Replacement in Java



A common use case for is to create an external Java applicaton that periodically polls using the Web Services API, finds any newly created records and then processes them somehow. For example, when a new opportunity is created, an external application queries to find the new records and then sends them to an external billing system. 

The new Streaming API makes this process much simpler by allowing you to subscribe to push topics that automatically send records to your application when inserted. We want to create a reusable component in Java and hosted on heroku that performs this function.


Salesforce has a really good Getting Started with the Streaming API article to help you out. It even include some Java examples. Create a pushtopic for Accounts that will stream newly created account records. Each time a new account is received in your Java app, simply post it to and supply us with the URL.

Host your application on heroku and provide any documentation and/or instructions that are needed. Documentation will be an important part of the judging criteria for this challenge.

As a worker role, this component typically doesn't have any type of UI but feel free to push something to the browser or console for output.


Upload all your source code as a zip (you can simply zip up your Eclipse project for convenience) and provide any documentation and/or instructions that are needed. Please be clear and concise with any setup instructions.
An SWF video of your application using Jing would also be helpful but not required.

Your submission will be judged by a panel of peers based upon this criteria. If you would like to request an extension, please read Can challenge deadlines be extended for more time? on our FAQ. We do not want to grant extensions unless there is a valid reason.

Getting Started with the Streaming API



Do we need to pass the push topic name as comman line argument or system variable ?
jazzyrocksr, Apr 18, 2012 at 00:16 AM reply
Not unless it's necessary for the operation. Thanks!
jeffdonthemic (admin), Apr 18, 2012 at 07:07 AM
@Jeff, I assume it would be necessary when we create the push topic and use the same name to subscribe the events. I shall keep it as env variable. Also, do we need any specific formatting of the output on the or is this fine in JSON format :
jazzyrocksr, Apr 18, 2012 at 10:58 AM
That format for postbin is totally fine. Just want to see that we are doing "something" with the record(s). Thanks!!!
jeffdonthemic (admin), Apr 18, 2012 at 11:06 AM
Do we need to pass the push topic name as comman line argument or system variable ?
abdulla821, Apr 18, 2012 at 00:30 AM reply
Jeff, are junit tests expected for this challenge ?
jazzyrocksr, Apr 21, 2012 at 11:44 AM reply
Not required but would be nice. May make a difference in the judging though.
jeffdonthemic (admin), Apr 23, 2012 at 02:51 AM

The discussion board is closed for this challenge.


19 members participating with 12 registered


Heroku | | Java


Ended Apr 24, 2012 at 6:00 PM
Winner Announced on April 27, 2012
View the challenge results
Give us your feedback about this challenge.


Total: $850
1st $250
2nd $150
3rd $150
4th $150
5th $150


Chrome Extension

Install the CloudSpokes Chrome Extension for quick and easy access to the latest CloudSpokes challenges, your payments, leaderboards and more!