This is an application which displays the currently trending Meetup groups based on their (live) RSVPs feed. It's built using Java EE 7 (uses WebSocket client & server APIs, Singleton EJB timers and CDI events to wire things up) and Redis
- A WebSocket client consumes live Meetup RSVP feed
- It parses each RSVP pushes the groups related data to a Redis sorted set
- Uses Jedis client for Redis and Jackson for POJO based JSON binding
Once the data is in a Redis sorted set
- A Singleton EJB polls Redis to get top 10 (using
Jedis#zrevrangeByScoreWithScores
) groups as per data in the RSVPs - The information is pushed to a WebSocket endpoint via CDI
- Redis sorted set does all the heavy-lifting: Java EE helps build the solution on top of all this
- The WebSocket endpoint is consumed from within a HTML file which is in turn accessed by the end user
- clone
- start Redis instance
- change Redis connection details here and here
mvn clean install
- deploy the WAR file in any Java EE 7 (or above) compliant container
- browse to
http://<host:port>/meetup-trending/
e.g.http://localhost:8080/meetup-trending/
You should see something like this - Score represents the frequency of the group occurence in the RSVPs (popularity)
- Inspiration was obtained from here
- I am terrible at front end.. yes, even the most simplest ones. So I picked up things from here
- CDI Producer for
Jedis
client - find other TODOs