Giter Site home page Giter Site logo

learningbyexample / kotlin-event-driven-petstore Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 467 KB

An example of a Kotlin Event Drive Pet Store

License: Apache License 2.0

Kotlin 70.29% Shell 0.58% Go 28.50% Makefile 0.64%
kotlin reactor kafka r2dbc postgresql kubernetes k8s spring spring-boot webflux

kotlin-event-driven-petstore's Introduction

go-microservice

An educational project for creating an event-driven pet store in Kotlin

License: Apache2

Domain diagram

Domains

Pets Domain components

Domains

TBC

TBC

kotlin-event-driven-petstore's People

Contributors

fanycastro avatar juan-medina avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kotlin-event-driven-petstore's Issues

Initial reading

This is a place holder issue with videos and examples to read

CQRS by Martin Fowler
https://martinfowler.com/bliki/CQRS.html

Event Sourcing by Martin Fowler
https://martinfowler.com/eaaDev/EventSourcing.html

Introduction to Domain Driven Design, CQRS and Event Sourcing by Kenneth Truyers
https://www.kenneth-truyers.net/2013/12/05/introduction-to-domain-driven-design-cqrs-and-event-sourcing/

The Future of Event-driven Microservices with Spring Cloud Stream by Kenny Bastani
https://www.youtube.com/watch?v=M9i8ORKqXQI

Event Sourcing and CQRS with Spring Stream by Jakub Pilimon
https://www.youtube.com/watch?v=eqPMmotEfsA

Spring PetClinic Sample Application Build Status by Pivotal
https://github.com/spring-projects/spring-petclinic

[FEATURE] Remove stored procedures

Describe the feature
Currently, we use stored procedures to insert categories, breeds, vaccines and tags, we should remove then and do normal SQLs

[BUG] Change diagram

Describe the bug
The name of the services is wrong.

Additional context
The correct names of the services are: pet-commands, pet-stream and pet-queries.

[FEATURE] Upgrade depencies

Describe the feature
Update dependencies for:

  • dto-validator
  • comand-producer-consumer
  • pet-commands
  • pet-streams

Additional context

  • spring-boot-starter-parent : 2.3.2.RELEASE
  • test-containers: 1.14.3

[FEATURE] improve working with list ussing commands

Describe the feature
Improve the usage on list with commands

Additional context
Commands allows to work with list, we could do :

val command = command("example command") {
        "attribute1" value listOf("one", "two", "three")
 }

val list = command.get<List<String>>("attribute1")

However this is not working very will if we do this

val command = command("example command") {
        "attribute1" value listOf("one", "two", "three")
 }

val list = command.get<List<Int>>("attribute1")

Even if we have specified to return a List<Int> we will get a List<String> since the type assurance is just in List.

We need a new function to do that, something like

val command = command("example command") {
        "attribute1" value listOf("one", "two", "three")
 }

val list = command.getList<Int>("attribute1")

Them we could raise failures if we can not get that kind of list.

Finally we could make a new dsl infix named values to make it more clear that we are setting a List in our attribute.

[BUG] Error creating database cluster

Describe the bug
When launching the service that set up all the infrastructure, we get an error creating the database cluster when the operator installation takes too much time.

To Reproduce
Steps to reproduce the behaviour:

  1. Run the service with go run
  2. Check the logs to see the error
  3. See error
    Error running the set up, error installing database, error creating database cluster "petstore-pets-cluster": error 'exit status 1' in "/usr/local/bin/kubectl" "error: unable to recognize "pets-db.yml": no matches for kind "postgresql" in version "acid.zalan.do/v1"\n"

Expected behaviour
The database cluster should be created without errors.

[FEATURE] adding timeout configuration to the producer

Describe the feature
Currently, when we send a command we will wait forever to the broker been available, we need somehow been able to specify a timeout for sending the command.

Additional context
Probably a setting in the CommandsProducerConfig we will be required

Setup Github Project

We need to set-up the Github Project, we need :

  • Readme
  • Code of Conduct
  • Projects
  • Tags

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.