All Projects → m3o → backend

m3o / backend

Licence: Apache-2.0 License
Backend powering the M3O platform

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to backend

Go Plugins
Go Micro Plugins. Moved to go-micro/plugins.
Stars: ✭ 1,654 (+2484.38%)
Mutual labels:  micro, m3o
M2x Python
AT&T M2X Python Library
Stars: ✭ 25 (-60.94%)
Mutual labels:  platform, services
Platform Web
micro platform web dashboard 服务治理与监控平台
Stars: ✭ 104 (+62.5%)
Mutual labels:  platform, micro
video server
A golang_based streaming video website
Stars: ✭ 37 (-42.19%)
Mutual labels:  platform
nmap vscan
nmap service and application version detection (without nmap installation)
Stars: ✭ 105 (+64.06%)
Mutual labels:  services
google-maps-services-php
PHP client library(SDK) for Google Maps API Web Services
Stars: ✭ 50 (-21.87%)
Mutual labels:  services
ecommerce
Laravel open source e-commerce system.
Stars: ✭ 209 (+226.56%)
Mutual labels:  platform
carpatin-dashboard-free
Carpatin is a React JS Admin Dashboard Template that focuses on the management flows of a back-office application. We leverage the Material-UI power of stylizing the components in a way that feels more professional.
Stars: ✭ 51 (-20.31%)
Mutual labels:  platform
dev-gateway
Local development cluster with "now" path aliases syntax support. Allows running multiple microservices as one solid server.
Stars: ✭ 32 (-50%)
Mutual labels:  micro
typedash
🚀 2KB lodash in typescript
Stars: ✭ 26 (-59.37%)
Mutual labels:  micro
PFL-Non-IID
The origin of the Non-IID phenomenon is the personalization of users, who generate the Non-IID data. With Non-IID (Not Independent and Identically Distributed) issues existing in the federated learning setting, a myriad of approaches has been proposed to crack this hard nut. In contrast, the personalized federated learning may take the advantage…
Stars: ✭ 58 (-9.37%)
Mutual labels:  platform
k8s-1abel
Kubernetes YAML/JSON survival kit
Stars: ✭ 21 (-67.19%)
Mutual labels:  services
portfolio
A virtual investing portfolio app (aka Kytra)
Stars: ✭ 32 (-50%)
Mutual labels:  micro
oxycare
A platform and a mobile app to distribute oxygen concetrators in Tunisia. 👐
Stars: ✭ 27 (-57.81%)
Mutual labels:  platform
ddd-example-ecommerce
Domain-driven design example in Java with Spring framework
Stars: ✭ 73 (+14.06%)
Mutual labels:  services
facebook-send-api-emulator
Facebook Messenger Emulator & Facebook Send API Emulator functionality allowing you to test web hooks on developer's machine.
Stars: ✭ 24 (-62.5%)
Mutual labels:  platform
metrics-server-exporter
Metrics Server Exporter
Stars: ✭ 58 (-9.37%)
Mutual labels:  platform
micro-match
A micro library for matching urls.
Stars: ✭ 36 (-43.75%)
Mutual labels:  micro
uav core
The main integrator of MRS UAV packages in ROS, part of the "mrs_uav_system".
Stars: ✭ 28 (-56.25%)
Mutual labels:  platform
protoc-gen-micro
Protobuf code generation
Stars: ✭ 287 (+348.44%)
Mutual labels:  micro

Backend

This is the backend for the M3O Platform.

Overview

This repository serves as the backend for the M3O platform and related services. These are services which power Micro as a Service and enable us to offer Micro Cloud. This includes things like customer management, billing, etc.

Dependencies

We depend on Micro using the "platform" profile. It runs on kubernetes with the resources below:

  • Etcd
  • Redis
  • Postgres

Design

All services are Micro services written using the Micro framework without exception.

  • Services speak to each other via RPC
  • Messages are used for async eventing
  • Infrastructure usage occurs only through Micro

Events

All events should be defined in protobuf under pkg/events/proto/<topic_name>. The directory should contain the following files.

events.proto

This should define

  • enum EventType - enumerates all the event types available
  • message Event - which should contain at least the field EnumType type. Any data specific to the event should be defined in separate fields in the Event message. You may also find it useful to have data that is common to all events in a common field. For example, the events on the customers stream have a Customer field which at a minimum contains the customer ID. The events then have event specific messages for any other data, e.g. the field Created contains data associated with the customer creation event.

constants.go

This file should define the topic name so that publishers/consumers can reference this const rather than hand coding the topic name (with the potential for errors). e.g.

const Topic = "customers"

See existing directories for examples.

Mixpanel

Events are forwarded to Mixpanel for analysis. Due to the way enum types are converted to their string representation we need to redeploy the Mixpanel service every time we add events otherwise they will get incorrectly reported.

Naming

Directories are the domain boundary for a specific concern e.g user, account, payment. They act as the alias for the otherwise fully qualified domain name "go.micro.service.alias". Services should follow this naming convention and focus on single word naming where possible.

Structure

Services should be generated using the micro new command using the alias e.g micro new account. The internal structure is defined by our new template generator. Extending this should follow a further convention as follows:

user/
    api/	# api spec
    web/	# web html
    client/	# generated clients
    service/	# core service types
    handler/	# request handlers
    subscriber/	# message subscribers
    proto/	# proto generated code
    main.go	# service main
    user.mu	# mu definition
    README.md	# readme

Testing

We use https://github.com/maxbrunsfeld/counterfeiter for generating test doubles for our services. These can then be imported in to other tests and used instead of real implementations.

We can then write tests which call the endpoints (contract testing) and verify that they do the right thing by checking call counts on the test doubles.

By convention, we generate fakes in the same directory tree as for the real proto implementation. For example, customers service is defined at customers/proto so the test double is defined in customers/proto/fakes.

Example generate command

counterfeiter -o proto/fakes/fake_usage_service.go proto UsageService

Contribution

Please sign-off contributions with DCO sign-off

git commit --signoff 'Signed-off-by: John Doe <[email protected]>`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].