GithubHelp home page GithubHelp logo

ptzagk / ingestredisstreams Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redislabsdemo/ingestredisstreams

0.0 0.0 0.0 11 KB

This is a simple demo to show how Redis Streams work

Java 100.00%

ingestredisstreams's Introduction

Redis Streams Demo

This is a simple application that demonstrates how Redis Streams work. The producer side of the application gathers new Twitter messages and writes them to a Redis Stream data structure. The consumer reads the data, deciphers the JSON data of the message, selects Twitter handles that have more than 10,000 followers as influencers, and maintains a catalog of influencers in Redis.

Setup

  1. Redis: Install Redis 5.0. Redis Streams is a new data structure that's available in version 5.0 and above. For more information, visit https://redis.io.

  2. Java: Install JDK verion 1.8 or above.

  3. Lettuce: Download Lettuce 5.1.x or above, and all the libraries required by it. Make sure all the libraries are in your classpath. For more information, visit https://lettuce.io/.

  4. PubNub: Download PubNub Java SDK and libraries into your classpath. For more information visit, https://www.pubnub.com/docs/java-se-java/pubnub-java-sdk.

  5. Update the following Java programs: a. LettuceConnection.java: Change the Redis connection URI to connect to your Redis server; b. InitializeConsumerGroup.java: If you don't want the default names for STREAM_ID and GROUP_ID, change them; c. TwitterIngestStream.java: Create a PubNub key for yourself and change it.

Compiling

Make sure all the libraries are in your classpath and compile the code with command, javac ./src/*.

Execution

  1. InitializeConsumerGroup - run java com.redislabs.ingest.streams.InitializeConsumerGroup
  2. TwitterIngestStream - run java com.redislabs.ingest.streams.TwitterIngestStream
  3. InfluencerCollectorMain - run java com.redislabs.ingest.streams.InfluencerCollectorMain

ingestredisstreams's People

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.