Gelassen / manufactory-knowledge-management-system

This system is made to solve business issue for one manufactory. It is also has intent behind it to scale up to a product to fulfill needs of organisation which shares the same issue.
MIT License
0 stars 0 forks source link

[R&D] Prototype backend on kotlin to get skills in new tech stack #10

Closed Gelassen closed 9 months ago

Gelassen commented 9 months ago

User stories

As an engineer I want to develop a sample project to get skills with a new technology before use this tech stack for a production project As an engineer I want to have mock API to continue development of the mobile client

Tech details

Kotlin has been substituting Java in Android native development for 7+ years. It positions itself as a a cross-platform instrument. I am not ready to try it for cross-mobile development, but I would like to use it for back-end development. It is actively used for this and gives an option to leverage customer's mobile engineers for back-end works as well (aka fullstack).

So far I mostly offer backends on NodeJs for its quick prototyping capacity and my recent hands-on experience with this, but enterprise level projects my requires something different (e.g. codebase based on statically typed language).

Official resources might be a right place to start: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-getting-started.html#next-step (that's about mobile side) https://kotlinlang.org/lp/server-side/ (done) https://kotlinlang.org/docs/server-overview.html (done) https://blog.jetbrains.com/kotlin/2020/11/server-side-development-with-kotlin-frameworks-and-libraries/ (done) https://www.toptal.com/kotlin/kotlin-server-side-development (rejected, quite naive)

Curl command for test:

$ curl -i http://localhost:8080/api/v1/machine?barcode=Fanuc%202000

If you deploy application via docker, get ip of the docker private network first:

$ docker container ps 
$ docker inspect <container id> | grep IPAddress

Depends on

[feature] Add docker container for the backend #11

Gelassen commented 9 months ago

Quick research shown 2000+ vs 40 job opportunities for engineers with experience in Spring vs Ktor. It means it would be difficult to find engineers with ktor experience in the near future. However I like its neat design and tends to pick up it to try work with it in pilot project. Performance and scalability issues are not verified yet.

Importing right package in Idea with ktor was an issue, but VSCode gave me even worse experience with autoimports.

Gelassen commented 9 months ago

For prototype aim this user story should be enough:

As a user, I want to scan a barcode and get all information about this machine.