https://github.com/ibm-messaging/mqlight-worker-thread
This repository contains a lab based on the worker thread use case for MQ Light
https://github.com/ibm-messaging/mqlight-worker-thread
Last synced: about 1 month ago
JSON representation
This repository contains a lab based on the worker thread use case for MQ Light
- Host: GitHub
- URL: https://github.com/ibm-messaging/mqlight-worker-thread
- Owner: ibm-messaging
- License: epl-1.0
- Created: 2014-02-07T14:02:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-20T17:09:36.000Z (over 11 years ago)
- Last Synced: 2025-04-23T20:14:57.486Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 4
- Watchers: 47
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MQ Light worker thread sample
=====================This sample demonstrates how MQ Light can make apps more responsive using worker threads. You can see the single threaded version of the app on the [serial branch](https://github.com/ibm-messaging/mqlight-worker-thread/tree/serial). To run the improved version, follow the instructions below.
Follow the instructions in our [Getting started](https://www.ibmdw.net/messaging/mq-light/getting-started-mq-light/) page to install and start MQ Light. Then download and extract this sample and add Twitter OAuth keys (follow [these instructions](https://dev.twitter.com/docs/auth/tokens-devtwittercom) to get them) to `app.js`.
Finally, run
```
npm install
```to install the required modules, then
```
node worker.js
```to start the worker thread and
```
node app.js
```to start the app. The app can be viewed at [http://localhost:3000/](http://localhost:3000/). The tweet stream should be much more responsive than the [single threaded example](https://github.com/ibm-messaging/mqlight-worker-thread/tree/serial) because the cpu heavy work is being handled by a separate worker thread.