Coder Social home page Coder Social logo

user-service's Introduction

User Service

Build Status

Microservice for user functionality.

Technologies:

  • Java 7
  • Spring Framework 4
  • Jetty
  • Datastax Cassandra Driver
  • Apache Cassandra

Built using Java with the Spring framework. It runs inside a Jetty server (a lightweight web container/server). Application connects to Cassandra datastore (NoSQL)

Below:

Image of technology diagram

Build

mvn clean install

Run locally

This method runs user-service locally in your own development machine with the use of a deployment facility in Docker.

Pre-requisite set up

User Service microservice depends on the Cassandra DataStore.

  1. Download & Install Cassandra onto your machine
  2. Run the init-db.cql setup script contents under src/main/resources/db/scripts

Assuming the artifact is built from the Build section then do the following:

Go to Cassandra installed directory location and run the following script to start up Cassandra server.

./cassandra

Lastly, run the microservice

java -jar target/user-service-1.0-SNAPSHOT-with-dependencies.jar

Deployment

*** Note - this section is still WIP

using Docker Compose

rm docker/user-service-1.0-SNAPSHOT-with-dependencies.jar
cp target/user-service-1.0-SNAPSHOT-with-dependencies.jar docker/
cd docker;
docker-compose up

Bringing User Service + Cassandra DB up individually

Cassandra needs to be startup first as the microservice will try to connect to it on startup.

Cassandra DB

cd docker;
docker build -f dockerfiles/cassandra.db -t cassandra-db:1.0-SNAPSHOT .
docker run cassandra-db:1.0-SNAPSHOT

User Service

rm docker/user-service-1.0-SNAPSHOT-with-dependencies.jar
cp target/user-service-1.0-SNAPSHOT-with-dependencies.jar docker/
cd docker;
docker build -f dockerfiles/userservice.app -t user-service:1.0-SNAPSHOT .
docker run user-service:1.0-SNAPSHOT

then link the two containers together so the User Service microservice can talk to the Cassandra db.

docker run --link cassandra-db:1.0-SNAPSHOT --name user-service:1.0-SNAPSHOT -p 8080:8080 user-service:1.0-SNAPSHOT

user-service's People

Contributors

colinbut avatar

Watchers

 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.