Giter Club home page Giter Club logo

assignment's Introduction

My image

Description

In this assignment we would like from you, to implement a simple platform that can communicate between different backends in Sync/Async way.

All the logic you must implement have to be in service module.

The implementation can be done in whatever JVM language you want (Java/Scala/Kotlin/Groovy) using at least jdk-11.0.1

Restful

For this platform, we would like an implementation of a simple Restful service which have to implement the endpoint:


POST /marionete/useraccount/

{
    "username":"bla",
    "password":"foo"
}

And response a json with this structure:

{
  "accountInfo": {
    "accountNumber": "12345-3346-3335-4456"
  },
  "userInfo": {
    "name": "John",
    "surname": "Doe",
    "sex": "male",
    "age": 32
  }
}

gRPC

We would like you to implement the logic of client/server and service provided in the protobuf file here.

To be invoked the gRPC server, once you receive the Rest call of /marionete/useraccount/. So then you can obtain and keep the token for the next rest calls.

Rest Connector

We would like from you to create a Rest connector to invoke two external service.

  • UserAccount: It will return the user information

    Request:
        GET http://localhost:8898/marionete/user/
        
        HEADER Authorization: token
    
    Response:
    {
        "name":"John",
        "surname":"Doe",
        "sex":"male",
        "age": 32
    }
    
  • AccountInfo: It will return the account information

    Request:
        GET http://localhost:8899/marionete/account/
        
        HEADER Authorization: token
    
    Response:
    {
        "accountNumber":"12345-3346-3335-4456"
    }
    

We provide implementation for both backends in backends module.

This mocks are not part of the exercise and only need to be invoked in your tests:

UserInfoMock.start()
AccountInfoMock.start()

IMPORTANT AccountInfoMock was implemented to fail the first two calls against him, so we expect an implementation in the Rest connector to deal with that.

What we're looking for:

  • How you approach the problem (are you writing everything from scratch? If not, what libraries are you suing to support/accelerate your work).
  • How you structure your code/files
  • How you prioritise the sub-tasks involved (how much attention to pay to testing, what things do you automate?)

Expectations

  • All test included the one in backends module must pass using mvn clean install
  • The program must run and return results invoking the endpoint of the API described before.
  • The program must use the mocks servers we provide in backends module.
  • The program must work efficiently expecting to receive big amount fo traffic.
  • The code must include unit tests and be well-structured to support future maintenance and evolutions. Try to use the best practices that you have learned from your experiences.
  • Documentation to follow the architecture of the program is always good.
  • You should be spending 2-3 hours on the task, but approaching 'production like' quality is more important than implementation speed and feature completeness.

assignment's People

Contributors

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