Before deep diving into essentials of Go tooling, let’s mention some of these awesome features.
Compiled language: By using build command, go source files are compiled to machine code. After linking process, one single file (executable) can be generated from go packages.
Strongly-typed language: It’s not permitted to assign a type to variable with another type, literals and types should be in alignment.
Statically-typed language: Performs type checking at compile time, not during runtime/execution time.
Garbage Collection: Since we highly use dynamic memory allocation, some metrics are observed for releasing memory by cleaning unused objects in heap area.
Have you ever heard about the term “TDD”? Did ever your “tests” failed on the pipeline on the CI server -Gitlab, Jenkins, CircleCI- ? Does your sonarqube report indicate that your line/branch coverage is lower than your company’s standards? Welcome onboard!
Writing effective unit tests is one of the most attractive topics in the Age of Devops and there are many approaches which explains how to handle this. This story is not aimed to review all of these, however, strictly focused on one of these approaches: high-order functions.
There is a perfect article which visualizes how to use this concept…
This story is targeted for describing the usage and providing an concrete example for the State Machine Factory option in order configure/execute Java Spring statemachines with different configuration templates.
Assume that some of services/components in your application repository are highly dependent to some specific state machine configurations, and also, these state machines are needed to perform different tasks from each and any other -some of them might be executing I/O-aware tasks, such as opening/closing/manipulating files- so it may be good idea to isolate these statemachines from each other for conforming best practices. …
The aim of this story is to provide a skeleton for constructing distributed statemachines via integrating Apache Zookeeper along with Java Spring State Machine framework.
Before going implementation and integration details regarding Apache Zookeeper, here is a brief introduction for Java Spring State Machine framework, reference is from current documentation: The idea is that your application is now in and may exist in a finite number of states. Then something happens that takes your application from one state to the next. A state machine is driven by triggers, which are based on either events or timers.