Git Product home page Git Product logo

ronenhamias / scalecube-microservices Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 429 KB

ScaleCube-Microservices is a higher level reusable Microservices repository built with ScaleCube-Services, it provides the building blocks for setting up a Dockerized Microservice cluster

Home Page: http://scalecube.io

Java 92.74% HTML 5.54% Shell 1.72%
account-management configuration multi-tenant jwt google-auth cms configuration-management distributed-systems microservice docker

scalecube-microservices's Introduction

ScaleCube Configuration Service

Build Status Codacy Badge Codacy Badge Join the chat at https://gitter.im/scalecube/Lobby Twitter URL

Web Site: http://scalecube.io

CONFIGURATION SERVICE:


ScaleCube-Configuration Service is a Multi-Tenant configuration service that enables clients to store key, value pairs in collections of data where the value is any json object. it is based on redisson project and redis as persistence storage.

To better understand how the ScaleCube-Configuration service work we first need to understand few concepts:

Account Service:

The account service is responsible to manage users and organizations and the membership of users in organizations.

The Account Service manages and validates api-keys with write or read permission levels. the api-keys are based on jwt tokens.

See: Account Service API

User

Users are registered in scalecube-configuration service after they have completed authentication with google and granted rights to the application. once google replied with token_id it is sent to the account service for registration and verification, once verified client has responded with the user details.

each user has userId provided by the authentication service and it is used to identify the user.

Organization

Once a user is registered it can create organizations and invite other or kickout users to its organization. once a user is invited to an organization it become organization member, organization members might be one of two roles:

  • Owner: owners has rights to manage users membership and delete the organization.
  • Members: have the right to view the organization details only

Configuration Service:

Any request The configuration service requires an api key issued by the Account-Service and the Configuration service validates the request with the account service to understand validity of the access token and the permission level it has to access the apis.

The configuration service manages collections of [Key, Value]. clients of the configuration service can:

  • Get key from collection - requires read-level api key.
  • List all entries from collection - requires read-level api key.
  • save entry in a collection (create or update) - requires write -level api key.
  • Delete key from a collection - requires write -level api key.

Configuration

Configuration entry is a key value pair stored in a collection. in the example bellow is an entry that represent some details about logical environment called 'dev' and where its 'url' entry point. so clients may request from the configuration service the 'url' for their 'dev' environment.

its up to the users to determine what is the collection names, keys and values they wish to store and manage as their configuration.

{
   "collection":"environments",
   "key":"dev",
   "value":{
      "url":"http://localhost:8080"
   }
}

GETTING STARTED:


Running Everything locally:

  • install redis.
  • clone the project
  • run GatewayAll main.
  • open your browser in http://localhost:8080
  • Login to google.
  • check your browser consul to see the interaction with the server.

Running Microservices cluster on Docker:

see wiki page

scalecube-microservices's People

Contributors

dmytro-lazebnyi avatar ronenhamias avatar segabriel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.