|
| 1 | +# [Ably](https://www.ably.io) Ably Reactor Queue and Wolfram Alpha demo |
| 2 | + |
| 3 | +Ably is a hugely scalable, superfast and secure hosted real-time messaging service for web-enabled devices. [Find out more about Ably](https://www.ably.io). |
| 4 | + |
| 5 | +This demo uses realtime pub/sub to publish questions and subscribe to answers, and uses the [Ably Reactor Queues](https://www.ably.io/reactor) to subscribe to realtime data from a worker server over AMQP. When the worker receives a question, it sends the request to Wolfram Alpha to get the answer, and publishes the answer on a channel so that the browser receives it. |
| 6 | + |
| 7 | +Want to try this demo now? Deploy to Heroku for free: |
| 8 | + |
| 9 | +[](https://heroku.com/deploy?template=https://github.com/ably/tutorials/tree/queue-wolfram-alpha-nodejs) |
| 10 | + |
| 11 | +# Setting up the demo on Heroku |
| 12 | + |
| 13 | +Once the app has been deployed to Heroku using the button above, there a few quick steps needed to get this demo running: |
| 14 | + |
| 15 | +* [Sign up for a free Developer AppId with Wolfram Alpha](http://developer.wolframalpha.com/) |
| 16 | +* Configure an environment variable with the Wolfram AppId (replace `[your wolfram app id]` with the AppId from the previous step): `heroku config:set WOLFRAM_APP_ID=[your wolfram app id] --app [heroku app name you assigned for this demo]` |
| 17 | +* Log in to your Ably dashboard `heroku addons:open ably --app [heroku app name you assigned for this demo]` |
| 18 | +* Set up a queue (in the Queues tab) with the name `wolfram` in the `US East (Virgina)` area. |
| 19 | +* Set up a queue rule (button to add rules is further down the page within the Queues tab) with the following: |
| 20 | + * Queue - choose the `wolfram` queue you just set up |
| 21 | + * Source - choose "Message" |
| 22 | + * Channel Filter - enter `"^wolfram:questions"` to ensure that all questions published to the `wolfram:questions` channel are republished into the `wolfram` queue |
| 23 | + |
| 24 | +You are now ready to run the demo: `heroku open --app [heroku app name you assigned for this demo]` |
| 25 | + |
| 26 | +# Ably Reactor |
| 27 | + |
| 28 | +The Ably Reactor provides Queues to consume realtime data, Events to trigger server-side code or functions in respons to realtime data, and Firehose to stream events to other queue or streaming services. |
| 29 | + |
| 30 | +[Find out more about the Ably Reactor](https://www.ably.io/reactor) |
| 31 | + |
| 32 | +# Questions |
| 33 | + |
| 34 | +Please visit http://support.ably.io/ for access to our knowledgebase and to ask for any assistance. |
| 35 | + |
| 36 | +# License |
| 37 | + |
| 38 | +Copyright (c) 2017 Ably Real-time Ltd, Licensed under the Apache License, Version 2.0. Refer to [LICENSE](./LICENSE) for the license terms. |
0 commit comments