Git Product home page Git Product logo

mqtt-simulator's People

Contributors

kirankbs avatar

Watchers

 avatar

mqtt-simulator's Issues

API Update with only required fields

At present, User has to send all the Task details to update which may be not efficient in terms of Bandwidth, computation and latency.
To avoid this user just sends interested fields to update with primary identifier. API get's the task and update only requested fields.
If task is not available then user gets proper feedback

Setup scalafmt

Acceptance Criteria

  • Code is formatted using scala format

** Techincal Details**
Plugin

Sub Tasks

  • Use the Sbt plugin
  • Create .scalafmt.conf file
  • Apply it to code

Graceful Shut down of the service

Reproduce
Run command ./sbt run locally and send kill signal.

Observed Behaviour
Exception:

Exception in thread "sbt-bg-threads-1" java.util.concurrent.RejectedExecutionException
	at java.base/java.util.concurrent.ForkJoinPool.externalPush(ForkJoinPool.java:1880)
	at java.base/java.util.concurrent.ForkJoinPool.externalSubmit(ForkJoinPool.java:1921)
	at java.base/java.util.concurrent.ForkJoinPool.execute(ForkJoinPool.java:2453)
	at scala.concurrent.impl.ExecutionContextImpl.execute(ExecutionContextImpl.scala:24)
	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1(DefaultBackgroundJobService.scala:390)
	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.$anonfun$cleanup$1$adapted(DefaultBackgroundJobService.scala:389)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.cleanup(DefaultBackgroundJobService.scala:389)
	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:359)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected Behaviour
Service just shutdown without exception

Technical Details
https://doc.akka.io/docs/akka-http/current/server-side/graceful-termination.html

Initial Setup

Create basic http stubbed routes to check Akka Http and Scalatest integration for endpoints

Acceptance Criteria

  • POST a simulation
  • GET a simulation
  • GET all simulations
  • PATCH a simulation
  • Delete a simulation

API CRUD operation with DB

Initial logic is implemented with an in-memory list. Replace it with Postgres database to persist simulation definitions.

Acceptance Criteria

  • GET simulation
  • GET simulation by id
  • Update simulation definition
  • Delete the simulation definition.

OpenAPI - Initial Version

Add OpenApi specification for simulation definition endpoints.

Acceptance Criteria

  • Specification is added

Technical Details

Sub Tasks

  • POST simulation definition
  • GET all simulation definitions
  • GET single simulation definition
  • PATCH single simulation definition
  • DELETE single simulation definition

Slick & FlyWay basic setup

As a user, i should be able to manage simulation life cycle. Once i create simulation with required definition, simulation has to start. The status of the simulation is queried by API to view.

Acceptance Criteria

  • Simulation definition is stored
  • Simulation definition is retrieved

Technical Details

  • Postgres is the storage
  • Slick: Functional Relational Mapping
  • FlyWay Migration

Sub Tasks

  • Setup FlyWay
  • Create initial evolution script
  • Create relational mapping for simulation definition
  • Update APIs to use DB rather than in memory implementation

Add unit test for CRUD API's

Write tests for Akka Http routes

Acceptance Criteria

  • Tests are added for routes

Technical Details

Sub Tasks

  • POST simulation definition
  • GET all simultion definitions
  • GET single simulation definition
  • PATCH single simulation definition
  • DELETE single simulation definition

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.