You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7cf37c7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+50-7Lines changed: 50 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
Introduction
4
4
---
5
5
6
+

7
+
6
8
This is the sample application codebase for RU102J, [Redis for Java Developers](https://university.redis.com/courses/ru102j/) at [Redis University](https://university.redis.com).
7
9
8
10
Solutions to the course programming challenges can be found on the `solutions` branch.
@@ -13,15 +15,55 @@ Prerequisites
13
15
In order to start and run this application, you will need:
14
16
15
17
* Java 8 JDK or higher
16
-
* Maven
17
-
* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred)
18
-
* If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed
18
+
*[Maven](https://maven.apache.org/)
19
+
* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred, Docker is a good option - see instructions below)
20
+
* If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed (or use the provided Docker Compose file which gives you Redis with RedisTimeSeries)
* Optional but recommended: [RedisInsight](https://redis.com/redis-enterprise/redis-insight/) to visualize the data in Redis. This is a graphical alternative to the `redis-cli` command
19
23
20
24
If you're using Windows, check out the following resources for help with running Redis:
21
25
22
-
*[Redis Labs Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
26
+
*[Redis Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
23
27
*[Microsoft - Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
24
28
29
+
Running Redis with Docker
30
+
---
31
+
32
+
We've provided a Docker Compose file as part of this repo, so to start Redis with the RedisTimeSeries module installed, use the following command:
33
+
34
+
```bash
35
+
docker-compose up -d
36
+
```
37
+
38
+
This will start a Redis with RedisTimeSeries container on localhost port 6379 with no password and you should see output similar to the following:
39
+
40
+
```
41
+
Creating network "ru102j_default" with the default driver
42
+
Creating redis_ru102j ... done
43
+
```
44
+
45
+
Connect to Redis using either RedisInsight, or the `redis-cli` command. When using `redis-cli` you can invoke it from the Docker container like this:
46
+
47
+
```bash
48
+
docker exec -it redis_ru102j redis-cli
49
+
```
50
+
51
+
When you see this prompt:
52
+
53
+
```
54
+
127.0.0.1:6379>
55
+
```
56
+
57
+
you are connected to Redis. Type `quit` to exit the Redis CLI.
58
+
59
+
When you are finished working with Redis, shut down the server like so:
60
+
61
+
```bash
62
+
docker-compose down
63
+
```
64
+
65
+
Redis saves your data in an append only file in the `redisdata` folder, and will re-load it next time you start the container.
66
+
25
67
How to Start the RediSolar Application
26
68
---
27
69
### Before anything else, start your redis server.
@@ -32,7 +74,7 @@ $sudo service redis-server restart
32
74
### When using Redis on localhost, port 6379 with no password:
33
75
34
76
1. Run `mvn package` to build your application.
35
-
2. Load the sample data: `java -jar target/redisolar-1.0.jar load`. If you want to erase everything in Redis before loading the data, use `java -jar target/redisolar-1.0.jar load --flush true`, but be aware that this will delete ALL keys in your Redis database.
77
+
2. Load the sample data: `java -jar target/redisolar-1.0.jar load`. If you want to erase everything in Redis before loading the data, use `java -jar target/redisolar-1.0.jar load --flush true`, but be aware that this will delete ALL keys in your Redis database. Note that loading the data may take a few minutes.
36
78
3. Start the application with `java -jar target/redisolar-1.0.jar server config.yml`
37
79
4. To check that your application is running enter url `http://localhost:8081`, substituting `localhost` for the hostname that you're running the application on if necessary.
38
80
@@ -75,9 +117,10 @@ To rebuild the application without running the tests:
75
117
mvn package -DskipTests
76
118
```
77
119
78
-
Application Screenshot
120
+
Need Help / Join our Community
79
121
---
80
-

122
+
123
+
If you need help with the course or want to chat to your fellow students and the wider Redis community, please [join us on our Discord server](https://discord.gg/jucCB8h).
81
124
82
125
Subscribe to our YouTube Channel / Follow us on Twitch
0 commit comments