Coder Social home page Coder Social logo

price-analysis-chart's Introduction

Objective

It is a price analysis chart implementation based on the one cimri.com employs for products as seen below.

alt text

In our implementation, the price analysis chart shows the minimum prices per store instead of the minimum price overall.

Project Structure

alt text

Requirements

All the tools employed are set up via docker-compose.yml file. Thus,

  • Docker

Running The Project

  • Run Apache Kafka
run kafka: docker-compose up -d kafka1 
  • Create a topic named new-topic in Kafka
docker exec -it resources_kafka1_1 kafka-topics --zookeeper zoo1:2181 --create --topic new-topic --partitions 1 --replication-factor 1 

NOTE: If Kafka is interrupted when consumers are consuming, we need to reset offsets with the command below

docker exec -it resources_kafka1_1 kafka-consumer-groups --bootstrap-server localhost:9092 --group consumer-consumer-1 --topic new-topic --reset-offsets --to-earliest --execute
  • Run Cassandra
docker-compose up -d cassandra  
  • Create Keyspace and a Table in Cassandra
docker exec -it cassandra bash  
cqlsh  
create keyspace "cimri" with replication={'class' : 'SimpleStrategy', 'replication_factor':2};   
use cimri;   
create table datePrice(url text, merchanturl text,date timestamp, price double,PRIMARY KEY(url,merchanturl,date));  
  • Run PostgreSQL
docker-compose up -d database
  • Set Up PostgreSQL
docker-compose run database bash    
psql --host=database --username=cimri --dbname=database  
CREATE TABLE producturl(url TEXT PRIMARY KEY,title TEXT);

To change settings, you can edit the docker-compose.yml file as needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.