service

module
v0.0.0-...-c920485 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0

README

Ultimate Software Design with Kubernetes

CircleCI Go Report Card go.mod Go version

InsightsSnapshot

Copyright 2018, 2019, 2020, 2021, 2022, 2023, 2024 Ardan Labs
hello@ardanlabs.com

My Information

Name: Bill Kennedy Company: Ardan Labs Title: Managing Partner Email: bill@ardanlabs.com Twitter: goinggodotnet

Description

"As a program evolves and acquires more features, it becomes complicated, with subtle dependencies between components. Over time, complexity accumulates, and it becomes harder and harder for programmers to keep all the relevant factors in their minds as they modify the system. This slows down development and leads to bugs, which slow development even more and add to its cost. Complexity increases inevitably over the life of any program. The larger the program, and the more people that work on it, the more difficult it is to manage complexity." - John Ousterhout

The service starter kit is a starting point for building production grade scalable web service applications that leverage the power of a Domain Driven, Data Oriented Architecture that can run in Kubernetes. The goal of this project is to provide a proven starting point that reduces the repetitive tasks required for a new project to be launched into production. It uses minimal dependencies, implements idiomatic code and follows Go best practices. Collectively, the project lays out everything logically to minimize guess work and enable engineers to quickly maintain a mental model for the project.

The class behind this starter kit teaches how to build production-level software in Go leveraging the power of a Domain Driven, Data Oriented Architecture that can run in Kubernetes. From the beginning, you will pair program with the instructor walking through the design philosophies and guidelines for building software in Go. With each new feature that is added to the project, you will learn how to deploy to and manage the Kubernetes environment used to run the project. The core of this class is to teach you and your team how to handle and reduce the spread of complexity in the systems you are building.

Learn more about the project:

Wiki | Course Outline | Class Schedule

Licensing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Learn More

Reach out about corporate training events, open enrollment live training sessions, and on-demand learning options.

Ardan Labs (www.ardanlabs.com)
hello@ardanlabs.com

Index

Installation

To clone the project, create a folder and use the git clone command. Then please read the makefile file to learn how to install all the tooling and docker images.

$ cd $HOME
$ mkdir code
$ cd code
$ git clone https://github.com/ardanlabs/service or git@github.com:ardanlabs/service.git
$ cd service

Create Your Own Version

If you want to create a version of the project for your own use, use the new gonew command.

$ go install golang.org/x/tools/cmd/gonew@latest

$ cd $HOME
$ mkdir code
$ cd code
$ gonew github.com/ardanlabs/service github.com/mydomain/myproject
$ cd myproject
$ go mod vendor

Now you have a copy with your own module name. Now all you need to do is initialize the project for git.

Purchase Video

The entire training class has been recorded to be made available to those who can't have the class taught at their company or who can't attend a conference. This is the entire class material.

ardanlabs.com/education

Our Experience

We have taught Go to thousands of developers all around the world since 2014. There is no other company that has been doing it longer and our material has proven to help jump-start developers 6 to 12 months ahead of their knowledge of Go. We know what knowledge developers need in order to be productive and efficient when writing software in Go.

Our classes are perfect for intermediate-level developers who have at least a few months to years of experience writing code in Go. Our classes provide a very deep knowledge of the programming langauge with a big push on language mechanics, design philosophies and guidelines. We focus on teaching how to write code with a priority on consistency, integrity, readability and simplicity. We cover a lot about “if performance matters” with a focus on mechanical sympathy, data oriented design, decoupling and writing/debugging production software.

Our Teacher

William Kennedy (@goinggodotnet)

William Kennedy is a managing partner at Ardan Labs in Miami, Florida. Ardan Labs is a high-performance development and training firm working with startups and fortune 500 companies. He is also a co-author of the book Go in Action, the author of the blog GoingGo.Net, and a founding member of GoBridge which is working to increase Go adoption through diversity.

Video Training
Ultimate Go Video
Ardan Labs YouTube Channel

Blog
Going Go

Writing
Running MongoDB Queries Concurrently With Go
Go In Action

Articles
IT World Canada

Video
Golang Charlotte (2024) - Domain Driven, Data Oriented Architecture
GopherCon SG (2023) - K8s CPU Limits and Go
P99 Talk (2022) - Evaluating Performance In Go
GopherCon Europe (2022) - Practical Memory Profiling
Dgrpah Day (2021) - Getting Started With Dgraph and GraphQL
GDN Event #1 (2021) - GoBridge Needs Your Help
Training Within The Go Community (2019)
GopherCon Australia (2019) - Modules
Golab (2019) - You Want To Build a Web Service?
GopherCon Singapore (2019) - Garbage Collection Semantics
GopherCon India (2019) - Channel Semantics
GoWayFest Minsk (2018) - Profiling Web Apps
GopherCon Singapore (2018) - Optimizing For Correctness
GopherCon India (2018) - What is the Legacy You Are Leaving Behind
Code::Dive (2017) - Optimizing For Correctness
Code::Dive (2017) - Go: Concurrency Design
dotGo (2017) - Behavior Of Channels
GopherCon Singapore (2017) - Escape Analysis
Capital Go (2017) - Concurrency Design
GopherCon India (2017) - Package Oriented Design
GopherCon India (2015) - Go In Action
GolangUK (2016) - Dependency Management
GothamGo (2015) - Error Handling in Go
GopherCon (2014) - Building an analytics engine

Golang Charlotte (2023) - Domain Driven, Data Oriented Architecture with Bill Kennedy
Prague Meetup (2021) - Go Module Engineering Decisions
Practical Understanding Of Scheduler Semantics (2021)
Go Generics Draft Proposal (2020)
Hack Potsdam (2017) - Tech Talk with William Kennedy
Chicago Meetup (2016) - An Evening
Vancouver Meetup (2016) - Go Talk & Ask Me Anything With William Kennedy
Vancouver Meetup (2015) - Compiler Optimizations in Go
Bangalore Meetup (2015) - OOP in Go
GoSF Meetup - The Nature of Constants in Go
London Meetup - Mechanical Sympathy
Vancouver Meetup - Decoupling From Change

Podcasts
Ardan Labs Podcast: On Going Series
Encore, domain design in Go with Bill Kennedy
Mangtas Nation: A Golang Deep Dive with Bill Kennedy
Coding with Holger: Go with Bill Kennedy
Craft of Code: From Programming to Teaching Code with Bill Kennedy
GoTime: Design Philosophy
GoTime: Learning and Teaching Go
GoTime: Bill Kennedy on Mechanical Sympathy
GoTime: Discussing Imposter Syndrome
HelloTechPros: Your Tech Interviews are Scaring Away Brilliant People
HelloTechPros: The 4 Cornerstones of Writing Software

More About Go

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Although it borrows ideas from existing languages, it has a unique and simple nature that make Go programs different in character from programs written in other languages. It balances the capabilities of a low-level systems language with some high-level features you see in modern languages today. This creates a programming environment that allows you to be incredibly productive, performant and fully in control; in Go, you can write less code and do so much more.

Go is the fusion of performance and productivity wrapped in a language that software developers can learn, use and understand. Go is not C, yet we have many of the benefits of C with the benefits of higher level programming languages.

The Ecosystem of the Go Programming Language - Henrique Vicente
The Why of Go - Carmen Andoh
Go Ten Years and Climbing - Rob Pike
The eigenvector of "Why we moved from language X to language Y" - Erik Bernhardsson
Learn More - Go Team
Simplicity is Complicated - Rob Pike
Getting Started In Go - Aarti Parikh

Minimal Qualified Student

The material has been designed to be taught in a classroom environment. The code is well commented but missing some contextual concepts and ideas that will be covered in class. Students with the following minimal background will get the most out of the class.

  • Studied CS in school or has a minimum of two years of experience programming full time professionally.
  • Familiar with structural and object oriented programming styles.
  • Has worked with arrays, lists, queues and stacks.
  • Understands processes, threads and synchronization at a high level.
  • Operating Systems
    • Has worked with a command shell.
    • Knows how to maneuver around the file system.
    • Understands what environment variables are.

Joining the Go Slack Community

We use a Slack channel to share links, code, and examples during the training. This is free. This is also the same Slack community you will use after training to ask for help and interact with may Go experts around the world in the community.

  1. Using the following link, fill out your name and email address: https://invite.slack.gobridge.org
  2. Check your email, and follow the link to the slack application.
  3. Join the training channel by clicking on this link: https://gophers.slack.com/messages/training/
  4. Click the “Join Channel” button at the bottom of the screen.

All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
apis
services/api/debug
Package debug provides handler support for the debugging endpoints.
Package debug provides handler support for the debugging endpoints.
services/api/mid
Package mid contains the set of values the middleware is responsible to extract and set.
Package mid contains the set of values the middleware is responsible to extract and set.
services/auth/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
services/auth/mux
Package mux provides support to bind domain level routes to the application mux.
Package mux provides support to bind domain level routes to the application mux.
services/auth/route/authapi
Package authapi maintains the web based api for auth access.
Package authapi maintains the web based api for auth access.
services/auth/route/checkapi
Package checkapi maintains the web based api for system access.
Package checkapi maintains the web based api for system access.
services/metrics/collector
Package collector is a simple collector for
Package collector is a simple collector for
services/metrics/publisher
Package publisher manages the publishing of metrics.
Package publisher manages the publishing of metrics.
services/metrics/publisher/datadog
Package datadog provides support for publishing metrics to DD.
Package datadog provides support for publishing metrics to DD.
services/metrics/publisher/expvar
Package expvar manages the publishing of metrics to stdout.
Package expvar manages the publishing of metrics to stdout.
services/metrics/publisher/prometheus
Package prometheus provides suppoert for sending metrics to prometheus.
Package prometheus provides suppoert for sending metrics to prometheus.
services/sales/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
services/sales/build/crud
Package crud binds the crud domain set of routes into the specified app.
Package crud binds the crud domain set of routes into the specified app.
services/sales/build/reporting
Package reporting binds the reporting domain set of routes into the specified app.
Package reporting binds the reporting domain set of routes into the specified app.
services/sales/mux
Package mux provides support to bind domain level routes to the application mux.
Package mux provides support to bind domain level routes to the application mux.
services/sales/route/domain/homeapi
Package homeapi maintains the web based api for home access.
Package homeapi maintains the web based api for home access.
services/sales/route/domain/productapi
Package productapi maintains the web based api for product access.
Package productapi maintains the web based api for product access.
services/sales/route/domain/tranapi
Package tranapi maintains the web based api for tran access.
Package tranapi maintains the web based api for tran access.
services/sales/route/domain/userapi
Package userapi maintains the web based api for user access.
Package userapi maintains the web based api for user access.
services/sales/route/domain/vproductapi
Package vproductapi maintains the web based api for product view access.
Package vproductapi maintains the web based api for product view access.
services/sales/route/sys/checkapi
Package checkapi maintains the web based api for system access.
Package checkapi maintains the web based api for system access.
tooling/admin
This program performs administrative tasks for the garage sale service.
This program performs administrative tasks for the garage sale service.
tooling/admin/commands
Package commands contains the functionality for the set of commands currently supported by the CLI tooling.
Package commands contains the functionality for the set of commands currently supported by the CLI tooling.
tooling/logfmt
This program takes the structured log output and makes it readable.
This program takes the structured log output and makes it readable.
app
api/authclient
Package authclient provides support to access the auth service.
Package authclient provides support to access the auth service.
api/errs
Package errs provides types and support related to web error functionality.
Package errs provides types and support related to web error functionality.
api/metrics
Package metrics constructs the metrics the application will track.
Package metrics constructs the metrics the application will track.
api/mid
Package mid provides app level middleware support.
Package mid provides app level middleware support.
api/page
Package page provides support for query paging.
Package page provides support for query paging.
domain/homeapp
Package homeapp maintains the app layer api for the home domain.
Package homeapp maintains the app layer api for the home domain.
domain/productapp
Package productapp maintains the app layer api for the product domain.
Package productapp maintains the app layer api for the product domain.
domain/tranapp
Package tranapp maintains the app layer api for the tran domain.
Package tranapp maintains the app layer api for the tran domain.
domain/userapp
Package userapp maintains the app layer api for the user domain.
Package userapp maintains the app layer api for the user domain.
domain/vproductapp
Package vproductapp maintains the app layer api for the vproduct domain.
Package vproductapp maintains the app layer api for the vproduct domain.
business
api/auth
Package auth provides authentication and authorization support.
Package auth provides authentication and authorization support.
api/delegate
Package delegate provides the ability to make function calls between different core packages when an import is not possible.
Package delegate provides the ability to make function calls between different core packages when an import is not possible.
api/order
Package order provides support for describing the ordering of data.
Package order provides support for describing the ordering of data.
data/dbtest
Package dbtest contains supporting code for running tests that hit the DB.
Package dbtest contains supporting code for running tests that hit the DB.
data/migrate
Package migrate contains the database schema, migrations and seeding data.
Package migrate contains the database schema, migrations and seeding data.
data/sqldb
Package sqldb provides support for access the database.
Package sqldb provides support for access the database.
data/sqldb/dbarray
Package dbarray provides support for database array types.
Package dbarray provides support for database array types.
data/transaction
Package transaction provides support for database transaction related functionality.
Package transaction provides support for database transaction related functionality.
domain/homebus
Package homebus provides business access to home domain.
Package homebus provides business access to home domain.
domain/homebus/stores/homedb
Package homedb contains home related CRUD functionality.
Package homedb contains home related CRUD functionality.
domain/productbus
Package productbus provides business access to product domain.
Package productbus provides business access to product domain.
domain/productbus/stores/productdb
Package productdb contains product related CRUD functionality.
Package productdb contains product related CRUD functionality.
domain/userbus
Package userbus provides business access to user domain.
Package userbus provides business access to user domain.
domain/userbus/stores/usercache
Package usercache contains user related CRUD functionality with caching.
Package usercache contains user related CRUD functionality with caching.
domain/userbus/stores/userdb
Package userdb contains user related CRUD functionality.
Package userdb contains user related CRUD functionality.
domain/vproductbus
Package vproductbus provides business access to view product domain.
Package vproductbus provides business access to view product domain.
domain/vproductbus/stores/vproductdb
Package vproductdb provides access to the product view.
Package vproductdb provides access to the product view.
foundation
docker
Package docker provides support for starting and stopping docker containers for running tests.
Package docker provides support for starting and stopping docker containers for running tests.
keystore
Package keystore implements the auth.KeyLookup interface.
Package keystore implements the auth.KeyLookup interface.
logger
Package logger provides support for initializing the log system.
Package logger provides support for initializing the log system.
validate
Package validate contains the support for validating models.
Package validate contains the support for validating models.
web
Package web contains a small web framework extension.
Package web contains a small web framework extension.
worker
Package worker manages a set of registered jobs that execute on demand.
Package worker manages a set of registered jobs that execute on demand.
zarf
keys
Package keys stores development public/private key pairs used by the service.
Package keys stores development public/private key pairs used by the service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL