Skip to content

Commit 94929c4

Browse files
committed
updating readme,
1 parent 3655e6f commit 94929c4

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

samples/bluesky-sentiment-analysis/README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,32 @@ This sample shows you how to use Redis Streams Java to scale out consumption on
77
This demo listens to the the Bluesky firehose, parses the messages that come from posts, and posts them to a Redis Stream. Then a scalable group of consumers consumes the
88
stream, runs sentiment analysis on it, and then posts the analyzed docs to Redis. In the background the API service controls which hashtags and keywords are monitored,
99
as well as periodically aggregating sentiment and posting those aggregated sentiments to prometheus, you can then check in on the sentiments for a given keyword or hashtag
10-
in the frontend with Grafana.
10+
in the frontend with Grafana.
11+
12+
## How to run this demo
13+
14+
### Locally
15+
16+
You can run the demo locally using docker by running:
17+
18+
```
19+
./mvnw clean package
20+
docker compose build
21+
docker compose up
22+
```
23+
24+
Running that script will build the project for you and spin up the containers necessary to run it - you can then check out the project by going to `http://localhost` in your browser
25+
26+
![landing page](../../.github/media/bsky-landing-page.png)
27+
28+
You'll see above the lag has grown quite a lot! that's because it's only running one consumer while trying to analyze the sentiments of the all of english language Bluesky. You may want to use more consumers.
29+
30+
### Running with more consumers remotely
31+
32+
If you'd like to try running with more consumers remotely, there are terraform scripts for both gcp and aws, to use them simply cd to your respective directory and, create your `.tfvars` file by running `mv .tfvars.example .tfvars` and filling in your values. Then run the following:
33+
34+
```
35+
terraform init
36+
terraform plan -var-file='.tfvars'
37+
terraform apply -var-file='.tfvars' --auto-approve
38+
```

samples/bluesky-sentiment-analysis/terraform/aws/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ variable "aws_dns_zone" {
44
description = "The DNS zone you're going to use for the app"
55
}
66

7+
variable "aws_region" {
8+
type = string
9+
sensitive = true
10+
description = "The AWS region to deploy the app to"
11+
12+
}
13+
714
variable "ssh_key_file"{
815
type = string
916
description = "Path to the SSH public key file"

0 commit comments

Comments
 (0)