Skip to content

Commit 4d95e1b

Browse files
committed
#3d899qn - update README file based on dockerization
1 parent c661fa4 commit 4d95e1b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@ A Ruby on rails interview task in a form of a chat system application.
55
## Tools used
66
Version | Is used? | Notes
77
-----------------|----------|---------
8-
Rails | YES |
9-
MySQL | YES |
10-
SideKiq | YES |
11-
ElasticSearch | YES | Used but had a problem dockerizing it
12-
Kibana | YES | Used but not dockerized
13-
Docker | YES | Everything is dockerized except ElasticSearch and SideKiq-Cron
8+
Rails | YES |
9+
MySQL | YES |
10+
SideKiq | YES |
11+
ElasticSearch | YES |
12+
Docker | YES |
1413
Redis | Partially | Suggested usage in optimization section
1514
RabbitMQ | NO | Suggested usage in optimization section
1615

1716
## Installation and Run
18-
You can still run ```docker-compose up``` to run the majority on the app except only for the **sidekiq-cron** and **ElasticSearch**.
17+
You can still run ```docker-compose up``` to run the whole stack.
1918

2019
## Suggested Optimization
2120
### Concurrency and Race Conditions
2221
I thought about using ```redis``` caching to lower the load on the Database and also in race conditions.
2322

24-
The race conditions can be found in the 2 parts, the token generation and the chat/message number generation. As the token duplication is very low -as discussed below- it can be ignored.
23+
The race conditions can be found in the 2 parts, the token generation and the chat/message number generation. As the token duplication is very low -as discussed below- it can be ignored.
2524

2625
Regarding the number, we can cache each chat lastly large number per application, increment it and save it again in the cache. This is a direct race condition that could be handled by **Redis locks** or using **Redis Atomic INCR**.
2726

0 commit comments

Comments
 (0)