This document provides an overview of the myOnboarding product and development approach at Haufe. Key points:
- myOnboarding is an onboarding SaaS product with a CMS, mobile apps, and responsive website to help new employees through their first months.
- It uses a microservices architecture with the MERN stack (MongoDB, Express, React, Node.js) deployed to Kubernetes. This allows for independent deployments and fast iteration.
- Features are developed using a RAD approach with short-lived branches and feature flags. This enables quick feedback loops and gradual rollout.
- Extensive automated testing of APIs and Docker images helps ensure backward compatibility and catch errors during deploys.
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
1. myOnboarding
Iterating fast with the MERN stack
Haufe TEC Day, September 26th 2019
Martin Danielsson
martin.danielsson@haufe-lexware.com
Twitter & GitHub: donmartin76
2. whoami
C:> WINDOWS.EXE
C/C++/C# Background
10+ years
C:> WINDOWS.EXE
C/C++/C# Background
10+ years
$ docker ps
Containers & Kubernetes
Since ~4 years
$ docker ps
Containers & Kubernetes
Since ~4 years
wicked.haufe.io maintainer
OSS API Management
Solution Architect
(CTO Office)
Developer
since 2006
3.
4. Our Solution
Two Components:
• SaaS Web CMS for
HR and all
Supervisors
• Mobile App for iOS
and Android, and a
responsive Web
Site for
Onboardees
(iOS 9 & Android 6)
Haufe myOnboarding
App
Content- und Taskmanagement over Control Center
Responsive Website for Onboardees
5. Why myOnboarding?
1
Signed
Contract
2
First Wor-
king Day
3
End of
probation
Employee motivation /
Productivity increase
Time
Without onboarding
Quitting Threshold
EmployeeMotivation/Productivitiy
Without onboarding
Risk of leaving company
2-3 months 6 months
7. Team Setup
Development+UI/UX
Barcelona and Freiburg
Product Management
Product and Marketing Intrapreneurs
Freiburg
Marketing Management
Freiburg
Business Development
Management
Freiburg
Sales Support
Implementation
Consulting (clevis)
Core Team:
Daily/Bi-Weekly Exchange
(Mostly) Shared OKRs
Fully Responsible Product Team
11. JS(ON) all the way down… (1)
Payloads are always JSON,
no need to think
JSON handled natively
by node.js and browsers
MongoDB stores (and indexes)
JSON natively. How convenient.
Programming language
is always JavaScript
12. JS(ON) all the way down… (2)
Increased
Productivity
Moving between frontend
and backend is less challenging
Tooling similar for
Frontend and Backend
Entire Stack runs easily
on a developer laptop
Same Tech for sharing
libraries (npm) everywhere
Lightweight programming,
Fast first implementations
15. Client Types
CMS and Web App
React Single Page
Applications
Served via nginx
static web server
Mobile App
Mobile App iOS/Android
via react-native
Cross compiled to
iOS and Android
Similar programming
as CMS/Web App
Communicate with
Backend via REST API
Secured via OAuth2 SSO Support
Integration Clients
myOnboarding Command
Line Interface
Umantis Bewerber-
Management
Custom Integrations via
API Management
16. Architecture
Kubernetes (Azure AKS-Engine)Kubernetes (Azure AKS-Engine)
CMSCMSAPIGateway
(wicked/kong)
APIGateway
(wicked/kong)
Auth
Server
Auth
Server
PeoplePeople
ContentContent
GrafanaGrafana
Notific-
ations
Notific-
ations
Sche-
duler
Sche-
duler
Permis-
sions
Permis-
sions
Integ-
ration
Plans
Integ-
ration
Plans
Prome-
theus
Prome-
theus
Alert
manager
Alert
manager
Web AppWeb App
Mongo DB
(Atlas, managed
service)
Mongo DB
(Atlas, managed
service)
IngressController(SSL)IngressController(SSL)
TasksTasks MediaMedia
System
Compo-
nent
System
Compo-
nent
Nginx
Static
Nginx
Static Micro-
Service
Micro-
Service
BrowserBrowser
Mobile AppMobile App
OAuth2.0
Integrations
(mO CLI,
Umantis,…)
Integrations
(mO CLI,
Umantis,…)
No state
inside k8s
cluster!
No state
inside k8s
cluster!
18. Death Star (=Database) with Tie Fighters (=Microservices)
“Here‘s a picture of the microservices and their underlying shared database.”
19. Risks
„I just need that piece of data from the other service, let‘s
go to the database and fetch it.“
Default values?
Known data issues
Bounded Context? On-the-fly data
migrations?
Code Duplication
21. Mitigations
• One Mongo collection belongs to exactly one microservice
• Microservices communicate via APIs
• Bounded Context – Clear Interface
• Decoupled runtime, decoupled deployments
22. Mongo Usage
Mongo
Globals
Tenant A
Tenant C
Tenant B
…
people
{“_id“:“def“} …
plans
{“_id“:“def“} …
assigned
{“_id“:“def“} …
org_imports
{“_id“:“def“} …
…
Databases CollectionsCluster
people service
plans service
tasks servicetemplates
{“_id“:“def“} …
23. Common Smells
API call cascades
Distributed Monolith
(Dante is calling)
Change requires concerted releases
Breach of API evolution
guidelines
Functionality requires
1:n API calls
Bounded Context
might be “wrong”
25. Development Strategy
Short Feature
Branches
Feature Flags
Per Tenant
Features which are still being finalized
are often already deployed to Prod!
Local
Development
Deploy/Test in
Dev Cluster
Merge to
Master
Auto-Deploy to
Dev, Test, Prod
Finalizing
Feature
Code
Review
Feature
GA
F E A T U R E L I F E C Y C L E
26. Consequences
Services independently
deployable
CI/CD more or less
mandatory (with
all requirements)
Features can easily
be tested, also
with customers
Feedback loop
can be drastically
shortened
Features can be
implemented
iteratively
Close contact with
Business Development
pays off!
30. Gotchas
Rollouts are
only safe if
tests are pretty
comprehensive
Rollouts are
only safe if
tests are pretty
comprehensive
Choosing tests
(Unit, API, E2E)
efficiently is…
tricky.
Choosing tests
(Unit, API, E2E)
efficiently is…
tricky.
Writing
testable code is
also… tricky.
Writing
testable code is
also… tricky.
Shortlived feature
branches crucial to
not build up large
and dangerous
changes
Shortlived feature
branches crucial to
not build up large
and dangerous
changes
32. Monitoring
Extremely important!
>50% of End-users are two
“hops” away, maybe reluctant
to report issues
Haufe
Customer
Onboardee
Traffic from Mobile App only
visible via API instrumenting
Prometheus
+ AlertManager
34. Leveraging Managed Services
I probably won‘t operate things
better* than a cloud provider.
I probably won‘t operate things
better* than a cloud provider.
Repeat after me:
Log Management
Databases
(MongoDB, Postgres)
E-Mail sending
Push Notifications
Kubernetes
as a Service
But some things just don‘t fit
(so you end up with DIY anyway)
Grafana
Prometheus
API Gateway
(wicked/Kong)
*) safer, cheaper;
exceptions apply
36. What makes myOnboarding special?
Short Customer
Feedback Loop
Developed RAD Style
With Pilot Customers
Extremely Good
Marketing
Established
Thought Leadership
“Onboarding”
(LinkedIn,…)
Onboarding Engages
Our Customers –
With Technology
Attractive Technologies
(We‘re Hiring!)
RAD Project Turned
Product!
Awesome Sales
Team (Felix!)