From Pilot to Product - Morning@Lohika

87
From Pilot To Product By Ivan Verhun

description

A sincere story about the successful project.

Transcript of From Pilot to Product - Morning@Lohika

Page 1: From Pilot to Product - Morning@Lohika

From Pilot To ProductBy Ivan Verhun

Page 2: From Pilot to Product - Morning@Lohika

Notice• Ask questions during presentation• Time is limited• Business domain is not important

Page 3: From Pilot to Product - Morning@Lohika

Agenda• Core product

overview• Pilot architecture• • Dev Process

Page 4: From Pilot to Product - Morning@Lohika

Core Product Overview• B2B• Import data from clients• Process data

– Validate– Filter– Generate report

Page 5: From Pilot to Product - Morning@Lohika

Data Flow

Page 6: From Pilot to Product - Morning@Lohika

SaaS Maturity Models

Page 7: From Pilot to Product - Morning@Lohika

Main Disadvantages• Single tenant• Tightly coupled components –

impossible to reuse• Business logic in stored procedures

Page 8: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 9: From Pilot to Product - Morning@Lohika

Pilot Overview

Page 10: From Pilot to Product - Morning@Lohika

Pilot Overview• Target audience - SMB• Business pilot• Limited TTL• Preferably short TTM• Isolated from the core platform

Page 11: From Pilot to Product - Morning@Lohika

Individuals

Page 12: From Pilot to Product - Morning@Lohika

Businesses

Page 13: From Pilot to Product - Morning@Lohika

Pilot Overview• Target audience• Business pilot• Limited TTL• Preferably short TTM• Isolated from the core platform

Page 14: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 15: From Pilot to Product - Morning@Lohika

Pilot Architecture• 1000 meters view• Technologies and Tools• Mistakes

Page 16: From Pilot to Product - Morning@Lohika

Initial Key Decisions• Multitenant• Extract data from single tenant DBs• Functionality spread between modules• All business logic in Java

– No stored procedures

Page 17: From Pilot to Product - Morning@Lohika

Multitenant

Page 18: From Pilot to Product - Morning@Lohika

Initial Key Decisions• Multitenant• All business logic in Java

– No stored procedures• Extract data from single tenant DBs• Functionality spread between modules

Page 19: From Pilot to Product - Morning@Lohika

Extract data from single tenant DBs

Page 20: From Pilot to Product - Morning@Lohika

Modules (Services)

Page 21: From Pilot to Product - Morning@Lohika

Endpoints• Asynchronous – AMQP endpoints for

prod, qa, dev • Synchronous – HTTP endpoints for

IT • Endpoints switched on/off depending

on spring profile

Page 22: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 23: From Pilot to Product - Morning@Lohika

No Downtime Deployment

• Maintain an application mode – LIVE– MAINTAINCE

• Application mode is used by LB• Switch mode to MAINTAINCE before

updating the application• Switch mode to LIVE after re-

deployment

Page 24: From Pilot to Product - Morning@Lohika

No Downtime Deployment

Page 25: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 26: From Pilot to Product - Morning@Lohika

Tech Stack – BeforeTools• Java 6• Jenkins• Maven 3• MySQL 5.1• Jetty 6• RabbitMQ• Git/Github

Libs and Frameworks• Spring

– IOC– AMQP– MVC– JDBC Template– Aspects

• JUnit• slf4j• Mockito, Powermock• Joda Time

Page 27: From Pilot to Product - Morning@Lohika

Database Schema Migrations

• Startup• Patch Level (patch0001_test_patch.sql)• Patch Loading• Patch Ordering• Patch Execution• Post-Patch Tasks

Page 28: From Pilot to Product - Morning@Lohika

Newest DB Schema• Shell script generating DB dump• Runs on Jenkins• Commits newest dump to git repo• Used to create empty test DBs

Page 30: From Pilot to Product - Morning@Lohika

BDD and JBehaveBDD:• is an evolution of test-driven development (TDD) and

acceptance-test driven design…• shifts the vocabulary from being test-based to

behaviour-based• Was developed as a response to the issues

encountered teaching test-driven development

Author: Dan North

http://en.wikipedia.org/wiki/Behavior-driven_development

Page 31: From Pilot to Product - Morning@Lohika

JBehave: example of story

Page 32: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 33: From Pilot to Product - Morning@Lohika

Centralized LoggingA tool for managing events and logs. You can use it to • collect logs • parse them • and store them for later

use (like, for searching)

http://logstash.net/

Page 34: From Pilot to Product - Morning@Lohika

Kibana – ES data visualization engine

Page 35: From Pilot to Product - Morning@Lohika

Performance Monitoring• Reporting Via JMX, HTTP,

slf4j, CSV, Graphite etc

• The Registry• Counters• Meters• Histograms• Timer (@Timed) http://metrics.codahale.com/

Page 36: From Pilot to Product - Morning@Lohika

Java 7• Java 6 is dead• Java 8 is baby

Page 37: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 38: From Pilot to Product - Morning@Lohika

Persistence• JDBC was not OK• JPA/Hibernate was not enough• MyBatis – good for complex

queries

Page 39: From Pilot to Product - Morning@Lohika

Web UI

http://www.thymeleaf.org/

Page 40: From Pilot to Product - Morning@Lohika

TSV Generation

Page 41: From Pilot to Product - Morning@Lohika

Report Printer

Page 42: From Pilot to Product - Morning@Lohika

PDF Validation

Impossible to:• reliably verify absence of an element• associate present text to particular

report attribute– there may be false positives

• verify correct order of the text elements• parse/verify graphs

http://pdfbox.apache.org/

LimitationsVerify:• number of missing files• number of unexpected files• file content

Scope

Page 43: From Pilot to Product - Morning@Lohika

Web UI (Admin)

https://angularjs.org/

Page 44: From Pilot to Product - Morning@Lohika

Tech Stack – AfterInitial tool kit• Java 6• Jenkins• Maven 3• MySQL 5.1• Jetty 6• RabbitMQ

Added/updated tools• Autopatch• Configuration Service • JBehave + Thucydides• Java 7• Logstash• Metrics library• Amazon S3

Page 45: From Pilot to Product - Morning@Lohika

Tech Stack – AfterOriginal tech stack• Spring

– IOC– AMQP– MVC– JDBC Template– Aspects

• JUnit• slf4j• Mockito, Powermock• Joda Time

Added later• JPA/Hibernate• MyBatis• Freemarker• Thymeleaf• Js:

– AngularJS – RequireJS– Bower

• Apache PDFBox

Page 46: From Pilot to Product - Morning@Lohika

Mistakes• JDBC code is poorly maintainable• JUnit – @Parameterized tests

Page 47: From Pilot to Product - Morning@Lohika
Page 48: From Pilot to Product - Morning@Lohika

Development Process• Methodology• Techniques and Tools• Mistakes and Lessons

Page 49: From Pilot to Product - Morning@Lohika

Scrum RulesPrinciple Is Adopted

Product Owner +

Development Team +

Scrum Master +/-

Sprint planning meeting +

Daily Scrum meeting +

Sprint Review +

Sprint Retrospective +

Product backlog +

Sprint backlog +

Burndown chart -

Page 50: From Pilot to Product - Morning@Lohika

Sprint Structure

Page 51: From Pilot to Product - Morning@Lohika

Planning process• Preplanning (30-60 min)

– high level plans and priorities• Grooming (up to 3 hours)

– discussion– estimation– Poker– Story points (0-8)

• Planning (30-60 min)– final estimation– defining sprint scope (commitment)

Page 52: From Pilot to Product - Morning@Lohika

Scrum Board

Page 53: From Pilot to Product - Morning@Lohika

Task Workflow• Analysis and writing AC• AC Review• Coding

– Unit tests– Functionality – Integration tests– Writing resolution comments

• Code review• Verification on QA env

Page 54: From Pilot to Product - Morning@Lohika

Daily Scrum

Page 55: From Pilot to Product - Morning@Lohika

Daily Scrum

Page 56: From Pilot to Product - Morning@Lohika

Daily Scrum

Page 57: From Pilot to Product - Morning@Lohika

Daily scrum

Page 58: From Pilot to Product - Morning@Lohika

Advertising Ukraine

Page 59: From Pilot to Product - Morning@Lohika

Demo

Page 60: From Pilot to Product - Morning@Lohika

Retrospective• What is working• What’s not working• To improve next

time

Page 61: From Pilot to Product - Morning@Lohika

Code Review TypesAd hoc

Passaround

Pair programming

Walkthrough

Team review

Inspection

Page 62: From Pilot to Product - Morning@Lohika

Code Review Tools– Github

• Pros– inline comments– no extra software required

• Cons– emails per comment (it's even not configurable)– inline diffs, no side-by-side comparison– small diff context– directory structure is not visible

– Side-by-side comparison (Beyond compare)• lines comparison in the bottom (above status bar)• compare different files• compare with clipboard content

– Reviewer checklist

Page 63: From Pilot to Product - Morning@Lohika

Beyond Compare

Page 64: From Pilot to Product - Morning@Lohika

Beyond Compare

Page 65: From Pilot to Product - Morning@Lohika

Review Checklist• The Obvious

– Code compiles, it’s clear, test cases etc.

• Design• Coding Standards• Error Handling• Security• Thread Safety

• Control Structures• Functions• Performance• Bug Fixes• Math• Maintainability• Documentation• Requirements Tracing

Page 66: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 67: From Pilot to Product - Morning@Lohika

People Management• Let people choose the task they like (if

possible)• Avoid knowledge islands• Let people be initiative• Minimize micromanagement• Semi-periodic face to face meetings

Page 68: From Pilot to Product - Morning@Lohika

People management• Dealing with highly

motivated/enthusiastic people• Trainings

– Agile (scrum)– Code review– Thucydides– Virtualization– TDD and Refactoring

• Dinners

Page 69: From Pilot to Product - Morning@Lohika

Team Buildings

Page 70: From Pilot to Product - Morning@Lohika

Thursdays Dinner

Page 71: From Pilot to Product - Morning@Lohika

Cross functional team

Page 72: From Pilot to Product - Morning@Lohika

Team CompositionIchak Adizes:• Producers• Administrators• Entrepreneurs• Integrators

Page 73: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 74: From Pilot to Product - Morning@Lohika

Mistakes

Page 75: From Pilot to Product - Morning@Lohika
Page 76: From Pilot to Product - Morning@Lohika

We Don’t Need Testers

Page 77: From Pilot to Product - Morning@Lohika

We Managed to Avoid This

Page 78: From Pilot to Product - Morning@Lohika

Code Review(ers)• Start with seniors only• Establish code review process before

extending reviewers list• Extend reviewers list gradually• “Code Reviewer” title should be

honorable

Page 79: From Pilot to Product - Morning@Lohika

Learnings• Testers are essential• Sometimes micromanagement is a

must• Establish code reviews right

Page 80: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 81: From Pilot to Product - Morning@Lohika

Customer Management

Page 82: From Pilot to Product - Morning@Lohika

Why Customer Need Reports

Trus

tLo

w

Hig

h

Low HighTransparency

Page 83: From Pilot to Product - Morning@Lohika

This slide intentionally left blank

Page 84: From Pilot to Product - Morning@Lohika

From Pilot To Product• Successful production launch• Unexpectedly big demand• Extended contract• Rewriting on core platform

– New set of exciting technologies

Page 85: From Pilot to Product - Morning@Lohika

ResourcesSaaS Maturity Model:• http://www.avuetech.com/wp-content/uploads/sites/7/2012/03/SaaS-Maturity-Levels.pdf• http

://blogs.msdn.com/b/architectsrule/archive/2008/08/18/saas-maturity-model-according-to-forrester.aspx

• http://www.infoq.com/news/2008/02/saas-architecture-maturity-model Code review:• http://en.wikipedia.org/wiki/Code_review#Types• http://www.softwaretestinggenius.com/istqb-foundation-level-exam-crash-course-part-6• https://www.owasp.org/images/2/2e/OWASP_Code_Review_Guide-V1_1.pdf• http://smartbear.com/SmartBear/media/pdfs/WP-CC-11-Best-Practices-of-Peer-Code-

Review.pdfCross functional team• http://en.wikipedia.org/wiki/Cross-functional_team Customer management• http://habrahabr.ru/company/stratoplan/blog/202028/

Page 87: From Pilot to Product - Morning@Lohika

??