Giter Site home page Giter Site logo

lagom-chat's Introduction

Distributed Systems Project - Lagom Chat

Lagom: study of the Framework and implementation of a Microservices based project

Lagom Chat

Lagom is an open source framework for building reactive microservice systems in Java or Scala. This Lagom project contains three services

  • User service that serves as an API for login and logout a user
  • Channel service that served as an API for creating updating and interacting with chat channels (also known as 'rooms').This service contains Event Sourcing implementation.
  • Message-Dispatcher service that is responsible of listening to the changings of the ChannelService as well as sending chat messages. A client can use this microservice to handle messages and show them in a nice UI.

Setup

Install sbt with macOS

brew install sbt

Navigate to the project and run $ sbt

Start up the project by executing $ runAll

Debugging and testing microservices is a very hot topic in Distributed Systems world. If you want to debug a API call just run :

sbt -jvm-debug 5005 runAll

Please help yourself with this guide for a complete setup of project debugging using IntelliJ.

Importing the project in an IDE

Import the project as an sbt project in your IDE.

If you are using IntelliJ, make sure to properly set the generated classes path in Compiler > Annotation Processor

  • Note 2: This project needs PostgreSQL to be installed locally in order to run. You can find Database configuration settings at user-impl > resources.conf. A manual initial setup of the database may be needed in order to properly run the project. Current settings use a database named user_db containing a usermodel schema. This schema has 2 colums: id:varchar and username:varchar. Please refer to the official documentation about creating a database and tables.

  • Note 3: Channel Service uses Cassandra database. No manual configuration is needed. SBT and Lagom do the dirty work for you under the hood. Enjoy :)

Other Notes

  • This project lacks of the frontend, which is essential for logging in, interacting with the Channels and sending messages without using Postman.

  • The only way to do integration tests on /api/message/live endpoint in Message-Dispatcher service is using a WebSocket client and manually verify the response.

lagom-chat's People

Watchers

Marco avatar

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.