Skip to content

This project for see top 3 products that visited by customer and updated every 3 seconds

Notifications You must be signed in to change notification settings

SaraKhild/product-visitors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visit Products


Overview

In this project, we will see how to return the top 3 products visited by customers and update the list every 3 seconds. To achieve this, we use RScoredSortedSetReactive for efficiently managing and accessing products based on their visit scores. Additionally, we utilize Sinks.Many to enable real-time updates, ensuring that the top products are refreshed and delivered to users seamlessly.


Usages

  • Spring WebFlux
  • Redisson "Redis"
  • Spring Data R2DBC
  • Lombok

Architecture of the Project

1-src folder

  • Configration
  • Controller
  • Model
  • Repository
  • Service

2-Maven pom.xml


<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-r2dbc</artifactId>
		</dependency>
		<dependency>
			<groupId>io.asyncer</groupId>
			<artifactId>r2dbc-mysql</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-webflux</artifactId>
		</dependency>
		<dependency>
			<groupId>org.redisson</groupId>
			<artifactId>redisson-spring-boot-starter</artifactId>
			<version>3.16.6</version>
		</dependency>
		<dependency>
			<groupId>com.mysql</groupId>
			<artifactId>mysql-connector-j</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.projectreactor</groupId>
			<artifactId>reactor-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

Output 🤩
Products.Visit.mov

About

This project for see top 3 products that visited by customer and updated every 3 seconds

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages