SlideShare a Scribd company logo
1 of 74
Developing a flexible and
scalable application
Presenting Today
Andrew Browne Dave Churchill Basarat Syed
Nick Josevski Matt Walkenhorst
Disclaimer
The views expressed here are solely those of the
authors in their private capacity and do not in any
way represent the views of the Picnic Software Pty
Ltd, or any other associated entity or shareholder.
Picnic Software Pty Ltd has not approved, endorsed,
embraced, friended, liked, tweeted, google-plused,
pinterested, dugg, reddited, hacker-newsed,
sanctioned or authorized this presentation.
Agenda
• App & Tech
• Infrastructure & Data Flow
• Deployment & Scalability
• Permissions with Neo4j
• Client Side Technologies
• Development & Testing Workflow
What we do
• We are an ISV (Independent Software Vendor)
– Building and running a workflow/collaboration
application
• Partnerships with large businesses in the
Advertising/Marketing sector
• Our customers are primarily large retailers
Our App
• Media Library
– High resolution files; PSDs, Video
• Collaborative workflows
– Coordinating inputs
• Photography, Illustrations, Graphic Design
– Producing advertising outputs
• Over multiple media channels
– Catalogues, Billboards/Print, TV, Radio, Web
Our Tech Stack
• F#, C#, ASP.NET MVC, ServiceStack
• EventStore, Eventful, RavenDB, Neo4j
• Angular, TypeScript, Mocha, Node, Sass
• SignalR, AutoMapper, RabbitMQ, LINQ,
NSubstitute, Nunit, FSUnit, FParsec, FsCheck
• AWS, Docker, Riemann, Logstash, PowerShell,
PSake, NodaTime
• GitHub, TeamCity, Octopus Deploy, Slack,
YouTrack
Flexibility
• Architecture choices to support
– Changes in requirements
– Future customers working in same domain
• When we started building we had
– Known customer workflows
– Known unknown customer workflows
– Unknown unknown customers workflows
Questions
Our Infrastructure
Andrew
Sydney region
CloudFront
S3Core, Neo4j,
RavenDb
Rabbit,
EventStore
Media
Processing
Web
Elastic Load
Balancing
Availability Zone x 2
MySQL
HA Proxy
S3
CloudFront
Elastic Load Balancer
EC2
Event Store
Writes
Reads
S3
EventStore
Web
Availability Zone x 2
Core Neo4j RavenDb Media
Processing
Rabbit
Disposable
Questions
Deployment & Scalability
Matt
Deployment
• Server Infrastructure – AWS
– Starting new instances largely a manual affair at
this point
• Configuration Management – Chef
• Application deployment – Team City, Octopus
Deploy
Chef
“Give me six hours to chop down a tree and I will
spend the first four sharpening the axe.”
Chef
• Windows / Linux deployment nodes
• Each node is in an Environment
• Each node performs one or more Roles
• Each Role requires the running of one or more
Recipes
• Recipes are stored in cookbooks
• Keep configuration in Git
• Keep CHEF Server configuration in Git
Octopus Deploy
• Windows code deployments only – Linux coming
soon.
• Environments, Roles, Apps, Releases.
• Deployment Process – steps executed on Roles to
“Tentacles”
– Nuget packages retrieved from Team City
– Store configuration as variables
– Variable snapshot + Nuget packages = release
– IIS, Windows Service, PowerShell steps available
– Partial and Rolling deploys
– Easy to roll back – just re-deploy last working release.
SOON: Blue / Green Deployments
• Asgard brings up a NEW (GREEN) copy of
production AWS infrastructure.
• Automatically Bootstrap instances against Chef
and Octopus.
• Smoke test GREEN environment
• Add GREEN web servers to load balancer
• Remove OLD (BLUE) web servers from load
balancer
• Asgard tears down BLUE production AWS
infrastructure.
Message delivery between processes
• Requirements
– Reliable.
– Easy to manage.
– Easy to use.
– Low latency.
Things we looked at (2+ years ago)
• NServiceBus
– Tied to MSMQ at the time.
• MassTransit
– Lacked documentation.
– Not ready for prime-time at that point.
• RabbitMQ + EasyNetQ
– Simple, best fit for us.
– Wrote our own client – bad idea.
RabbitMQ
• Written in Erlang, maintained by Pivotal.
• Linux / Windows.
• Easy administration (Web, command line, JSON).
• Supports
– Clustering and failover.
– Durable and HA queues.
– ‘At least once’ delivery guaranteed.
– Direct, Fan-out and Topic exchanges.
– Partitioning (vhosts), Federation & Shovelling.
How Picnic use RabbitMQ
• Setup
– Cluster of RabbitMQ servers behind ELB in
multiple AZs.
• You can use HAProxy instead of ELB.
– EasyNetQ library by Mike Hadlow.
• Handles subscription, publish and reconnection logic.
– So solid now we hardly think about it.
Use case: Scaling of long-running CPU
and IO intensive operations
• File format conversion, Zip bundling, PDF &
InDesign creation etc.
• Uses Topic exchange. Currently just one topic!
• Subscribers are round-robined by the broker.
• Subscribers are isolated – no clustering.
• Scaling - just launch new instances.
• Redundancy – launch in multiple Azs
• This has worked really well for us.
Use case: Distribution to SignalR
clients
• In-app notifications, long running task
progress etc. to the browser.
• Each web server receives all messages (Fan-
out exchange)
• Messages delivered to users / groups via
SignalR
Questions
Scalable Permissions
Dave
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• All entities in the system are identified by GUIDs
• Each permission applies to a specific entity
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• Permissions also have a role
<footwear-folder-guid> Read
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• Each user has a corresponding "Me" permission
<footwear-folder-guid> Read
<user-dave-guid> Me
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• As events arrive, relationships are built up between permissions
• e.g. a JobCreated event might give Owner permission to the creator
<footwear-folder-guid> Read
<user-dave-guid> Me
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• Relationships don't have to stem from the Me permissions
• e.g. having Write permission on a folder could mean you can also Read
<footwear-folder-guid> Read
<user-dave-guid> Me
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• A user has a permission if there's a path from the user's Me node
• This user doesn't have Read on the folder
<footwear-folder-guid> Read
<user-dave-guid> Me
Permissions Model
<approval-1-guid> Owner
<footwear-folder-guid> Write
• A user has a permission if there's a path from the user's Me node
• Giving Write on the footwear folder also gives the user Read
<footwear-folder-guid> Read
<user-dave-guid> Me
Original Implementation
Write
Read
Me
ApprovalOwner
• RavenDB document for each permission
• Records which permissions directly inherit this permission
Read <footwear-folder-guid>:
[Write <footwear-folder-guid>]
Write <footwear-folder-guid>:
[Me <user-dave-guid>]
Owner <approval-1-guid>:
[Me <user-dave-guid>]
Me <user-dave-guid>:
[]
Original Implementation
Write
Read
Me
ApprovalOwner
• Worker task builds a second state document for each
permission
• Records all permissions which inherit this permission
Read <footwear-folder-guid>:
[Write <footwear-folder-guid>,
Me <user-dave-guid>]
Write <footwear-folder-guid>:
[Me <user-dave-guid>]
Owner <approval-1-guid>:
[Me <user-dave-guid>]
Me <user-dave-guid>:
[]
Original Implementation
Write
Read
Me
ApprovalOwner
• A user has a permission if their Me appears in the
permission's state document
Read <footwear-folder-guid>:
[Write <footwear-folder-guid>,
Me <user-dave-guid>]
Original Implementation - Issues
• State documents can get large
• Introduce intermediate groups
• Takes time for state documents to be updated
• Cache and update permission graph in process
• Other processes can still sometimes see out-of-date permissions
• Use a graph database!
New Implementation
• In process of switching to Neo4j
• Transactional updates
• No need to calculate intermediate state
• Faster
• Simpler
• Still need to send some state data across to RavenDB for permissions when
searching
Questions
Client Side Architecture
Bas
http://slides.com/basarat/picnic-frontend
Questions
Development Workflow
Nick
Development Workflow
• GitHub
– Feature branches
– Pull Requests
Pull Requests
• Just over 2 months now using the PR based
workflow
• Approx 120 closed pull requests so far
• How
– Features branches, GitHub Tagging, TeamCity build
process comments against PR
– Asynchronous task for a team member
• “Here’s a PR please review when you can”
Team City & Tagging
Development Workflow
• Why
– It was recommended to us.
– Supports consistent and frequent code reviews.
• Improves code quality
• Shares knowledge amongst the team
– Lets us catch some bugs much earlier.
Development Workflow
• The wins
– Build server is more often in a green state.
• Can push to your PR branch to rely on CI to give feedback
– Knowledge sharing
• “Oh, that’s how you solved that”
• Reducing silo effects
– Offer constructive feedback to others
• “This could be made better by…”
– Bugs / issues caught
• Typos, debug code left in, incomplete/missed features
Development Workflow
• Testing
– Each PR builds as if it was already merged
– Unit/Integration tests run against PR in TeamCity
– YouTrack bugs marked with build numbers to track
deployment
Development Workflow
Development Workflow
• Agility
– Tracking feature changes as they evolve alongside
code
• As with all documentation - trying our best to keep up
to date
• PRs feedback can “code change not reflected in docs”
– Testing team
• Can review these changes and be more up to date with
• Review PRs for an idea of scope of changes and where
to look for issues
Development Workflow
Questions
Thanks
Other ALT.NET Presentations by us
Event Sourcing with F# - Andrew Browne
Thinking in a document centric
world with RavenDB - Nick Josevski

More Related Content

What's hot

Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the thingsMat Mannion
 
'Intro to Infrastructure as Code' - DevOps Belfast
'Intro to Infrastructure as Code' - DevOps Belfast'Intro to Infrastructure as Code' - DevOps Belfast
'Intro to Infrastructure as Code' - DevOps BelfastJohn Fitzpatrick
 
DevOps for Drupal: Why We Cook With Chef
DevOps for Drupal: Why We Cook With ChefDevOps for Drupal: Why We Cook With Chef
DevOps for Drupal: Why We Cook With ChefPromet Source
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Ryan Cuprak
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsAchievers Tech
 
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...Atlassian
 
Connections install in 45 mins
Connections install in 45 minsConnections install in 45 mins
Connections install in 45 minsSharon James
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the CloudRyan Cuprak
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp Londonhernanibf
 
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will comeHigher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will comePromet Source
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Ricard Clau
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...Heiko Voigt
 
You don't want to do it like that
You don't want to do it like thatYou don't want to do it like that
You don't want to do it like thatSharon James
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSharon James
 
Fits docker into devops
Fits docker into devopsFits docker into devops
Fits docker into devopsEvans Ye
 
Finding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User GroupFinding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User GroupDaniel Krook
 
Plone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchPlone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchfredvd
 

What's hot (20)

Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 
'Intro to Infrastructure as Code' - DevOps Belfast
'Intro to Infrastructure as Code' - DevOps Belfast'Intro to Infrastructure as Code' - DevOps Belfast
'Intro to Infrastructure as Code' - DevOps Belfast
 
DevOps for Drupal: Why We Cook With Chef
DevOps for Drupal: Why We Cook With ChefDevOps for Drupal: Why We Cook With Chef
DevOps for Drupal: Why We Cook With Chef
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
 
Connections install in 45 mins
Connections install in 45 minsConnections install in 45 mins
Connections install in 45 mins
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will comeHigher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
You don't want to do it like that
You don't want to do it like thatYou don't want to do it like that
You don't want to do it like that
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
Fits docker into devops
Fits docker into devopsFits docker into devops
Fits docker into devops
 
Finding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User GroupFinding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User Group
 
Plone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchPlone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group search
 

Similar to Picnic Software - Developing a flexible and scalable application

Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareDevOps for Enterprise Systems
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryCarlo Bonamico
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFxThomas Daly
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Brian Ritchie
 
Dev Ops Geek Fest: Automating the ForgeRock Platform
Dev Ops Geek Fest: Automating the ForgeRock PlatformDev Ops Geek Fest: Automating the ForgeRock Platform
Dev Ops Geek Fest: Automating the ForgeRock PlatformForgeRock
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018hernanibf
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
My personal story from azure it pro to azure dev ops
My personal story from azure it pro to azure dev opsMy personal story from azure it pro to azure dev ops
My personal story from azure it pro to azure dev opsnj-azure
 
From Waterfall to Agile - Six Months In
From Waterfall to Agile - Six Months InFrom Waterfall to Agile - Six Months In
From Waterfall to Agile - Six Months Inandrewjutton
 
USG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 DaysUSG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 DaysEric Sembrat
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...SmartBear
 

Similar to Picnic Software - Developing a flexible and scalable application (20)

Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems SoftwareLessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
Lessons Learned from Large Scale Adoption of DevOps for IBM z Systems Software
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Infrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous DeliveryInfrastructure as Data with Ansible for easier Continuous Delivery
Infrastructure as Data with Ansible for easier Continuous Delivery
 
Devops
DevopsDevops
Devops
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
Case study
Case studyCase study
Case study
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
 
Devops as a service
Devops as a serviceDevops as a service
Devops as a service
 
Dev Ops Geek Fest: Automating the ForgeRock Platform
Dev Ops Geek Fest: Automating the ForgeRock PlatformDev Ops Geek Fest: Automating the ForgeRock Platform
Dev Ops Geek Fest: Automating the ForgeRock Platform
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
My personal story from azure it pro to azure dev ops
My personal story from azure it pro to azure dev opsMy personal story from azure it pro to azure dev ops
My personal story from azure it pro to azure dev ops
 
From Waterfall to Agile - Six Months In
From Waterfall to Agile - Six Months InFrom Waterfall to Agile - Six Months In
From Waterfall to Agile - Six Months In
 
USG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 DaysUSG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 Days
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
Intro to DevOps
Intro to DevOpsIntro to DevOps
Intro to DevOps
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Picnic Software - Developing a flexible and scalable application

  • 1. Developing a flexible and scalable application
  • 2.
  • 3. Presenting Today Andrew Browne Dave Churchill Basarat Syed Nick Josevski Matt Walkenhorst
  • 4. Disclaimer The views expressed here are solely those of the authors in their private capacity and do not in any way represent the views of the Picnic Software Pty Ltd, or any other associated entity or shareholder. Picnic Software Pty Ltd has not approved, endorsed, embraced, friended, liked, tweeted, google-plused, pinterested, dugg, reddited, hacker-newsed, sanctioned or authorized this presentation.
  • 5.
  • 6. Agenda • App & Tech • Infrastructure & Data Flow • Deployment & Scalability • Permissions with Neo4j • Client Side Technologies • Development & Testing Workflow
  • 7. What we do • We are an ISV (Independent Software Vendor) – Building and running a workflow/collaboration application • Partnerships with large businesses in the Advertising/Marketing sector • Our customers are primarily large retailers
  • 8. Our App • Media Library – High resolution files; PSDs, Video • Collaborative workflows – Coordinating inputs • Photography, Illustrations, Graphic Design – Producing advertising outputs • Over multiple media channels – Catalogues, Billboards/Print, TV, Radio, Web
  • 9. Our Tech Stack • F#, C#, ASP.NET MVC, ServiceStack • EventStore, Eventful, RavenDB, Neo4j • Angular, TypeScript, Mocha, Node, Sass • SignalR, AutoMapper, RabbitMQ, LINQ, NSubstitute, Nunit, FSUnit, FParsec, FsCheck • AWS, Docker, Riemann, Logstash, PowerShell, PSake, NodaTime • GitHub, TeamCity, Octopus Deploy, Slack, YouTrack
  • 10. Flexibility • Architecture choices to support – Changes in requirements – Future customers working in same domain • When we started building we had – Known customer workflows – Known unknown customer workflows – Unknown unknown customers workflows
  • 14. S3
  • 17. EC2
  • 18.
  • 19.
  • 21.
  • 22.
  • 24. Reads
  • 25. S3 EventStore Web Availability Zone x 2 Core Neo4j RavenDb Media Processing Rabbit Disposable
  • 28. Deployment • Server Infrastructure – AWS – Starting new instances largely a manual affair at this point • Configuration Management – Chef • Application deployment – Team City, Octopus Deploy
  • 29. Chef “Give me six hours to chop down a tree and I will spend the first four sharpening the axe.”
  • 30. Chef • Windows / Linux deployment nodes • Each node is in an Environment • Each node performs one or more Roles • Each Role requires the running of one or more Recipes • Recipes are stored in cookbooks • Keep configuration in Git • Keep CHEF Server configuration in Git
  • 31.
  • 32. Octopus Deploy • Windows code deployments only – Linux coming soon. • Environments, Roles, Apps, Releases. • Deployment Process – steps executed on Roles to “Tentacles” – Nuget packages retrieved from Team City – Store configuration as variables – Variable snapshot + Nuget packages = release – IIS, Windows Service, PowerShell steps available – Partial and Rolling deploys – Easy to roll back – just re-deploy last working release.
  • 33. SOON: Blue / Green Deployments • Asgard brings up a NEW (GREEN) copy of production AWS infrastructure. • Automatically Bootstrap instances against Chef and Octopus. • Smoke test GREEN environment • Add GREEN web servers to load balancer • Remove OLD (BLUE) web servers from load balancer • Asgard tears down BLUE production AWS infrastructure.
  • 34. Message delivery between processes • Requirements – Reliable. – Easy to manage. – Easy to use. – Low latency.
  • 35. Things we looked at (2+ years ago) • NServiceBus – Tied to MSMQ at the time. • MassTransit – Lacked documentation. – Not ready for prime-time at that point. • RabbitMQ + EasyNetQ – Simple, best fit for us. – Wrote our own client – bad idea.
  • 36.
  • 37. RabbitMQ • Written in Erlang, maintained by Pivotal. • Linux / Windows. • Easy administration (Web, command line, JSON). • Supports – Clustering and failover. – Durable and HA queues. – ‘At least once’ delivery guaranteed. – Direct, Fan-out and Topic exchanges. – Partitioning (vhosts), Federation & Shovelling.
  • 38. How Picnic use RabbitMQ • Setup – Cluster of RabbitMQ servers behind ELB in multiple AZs. • You can use HAProxy instead of ELB. – EasyNetQ library by Mike Hadlow. • Handles subscription, publish and reconnection logic. – So solid now we hardly think about it.
  • 39. Use case: Scaling of long-running CPU and IO intensive operations • File format conversion, Zip bundling, PDF & InDesign creation etc. • Uses Topic exchange. Currently just one topic! • Subscribers are round-robined by the broker. • Subscribers are isolated – no clustering. • Scaling - just launch new instances. • Redundancy – launch in multiple Azs • This has worked really well for us.
  • 40. Use case: Distribution to SignalR clients • In-app notifications, long running task progress etc. to the browser. • Each web server receives all messages (Fan- out exchange) • Messages delivered to users / groups via SignalR
  • 43. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • All entities in the system are identified by GUIDs • Each permission applies to a specific entity
  • 44. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • Permissions also have a role <footwear-folder-guid> Read
  • 45. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • Each user has a corresponding "Me" permission <footwear-folder-guid> Read <user-dave-guid> Me
  • 46. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • As events arrive, relationships are built up between permissions • e.g. a JobCreated event might give Owner permission to the creator <footwear-folder-guid> Read <user-dave-guid> Me
  • 47. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • Relationships don't have to stem from the Me permissions • e.g. having Write permission on a folder could mean you can also Read <footwear-folder-guid> Read <user-dave-guid> Me
  • 48. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • A user has a permission if there's a path from the user's Me node • This user doesn't have Read on the folder <footwear-folder-guid> Read <user-dave-guid> Me
  • 49. Permissions Model <approval-1-guid> Owner <footwear-folder-guid> Write • A user has a permission if there's a path from the user's Me node • Giving Write on the footwear folder also gives the user Read <footwear-folder-guid> Read <user-dave-guid> Me
  • 50. Original Implementation Write Read Me ApprovalOwner • RavenDB document for each permission • Records which permissions directly inherit this permission Read <footwear-folder-guid>: [Write <footwear-folder-guid>] Write <footwear-folder-guid>: [Me <user-dave-guid>] Owner <approval-1-guid>: [Me <user-dave-guid>] Me <user-dave-guid>: []
  • 51. Original Implementation Write Read Me ApprovalOwner • Worker task builds a second state document for each permission • Records all permissions which inherit this permission Read <footwear-folder-guid>: [Write <footwear-folder-guid>, Me <user-dave-guid>] Write <footwear-folder-guid>: [Me <user-dave-guid>] Owner <approval-1-guid>: [Me <user-dave-guid>] Me <user-dave-guid>: []
  • 52. Original Implementation Write Read Me ApprovalOwner • A user has a permission if their Me appears in the permission's state document Read <footwear-folder-guid>: [Write <footwear-folder-guid>, Me <user-dave-guid>]
  • 53. Original Implementation - Issues • State documents can get large • Introduce intermediate groups • Takes time for state documents to be updated • Cache and update permission graph in process • Other processes can still sometimes see out-of-date permissions • Use a graph database!
  • 54.
  • 55. New Implementation • In process of switching to Neo4j • Transactional updates • No need to calculate intermediate state • Faster • Simpler • Still need to send some state data across to RavenDB for permissions when searching
  • 56.
  • 62. Development Workflow • GitHub – Feature branches – Pull Requests
  • 63. Pull Requests • Just over 2 months now using the PR based workflow • Approx 120 closed pull requests so far • How – Features branches, GitHub Tagging, TeamCity build process comments against PR – Asynchronous task for a team member • “Here’s a PR please review when you can”
  • 64. Team City & Tagging
  • 65. Development Workflow • Why – It was recommended to us. – Supports consistent and frequent code reviews. • Improves code quality • Shares knowledge amongst the team – Lets us catch some bugs much earlier.
  • 66.
  • 67. Development Workflow • The wins – Build server is more often in a green state. • Can push to your PR branch to rely on CI to give feedback – Knowledge sharing • “Oh, that’s how you solved that” • Reducing silo effects – Offer constructive feedback to others • “This could be made better by…” – Bugs / issues caught • Typos, debug code left in, incomplete/missed features
  • 68. Development Workflow • Testing – Each PR builds as if it was already merged – Unit/Integration tests run against PR in TeamCity – YouTrack bugs marked with build numbers to track deployment
  • 70. Development Workflow • Agility – Tracking feature changes as they evolve alongside code • As with all documentation - trying our best to keep up to date • PRs feedback can “code change not reflected in docs” – Testing team • Can review these changes and be more up to date with • Review PRs for an idea of scope of changes and where to look for issues
  • 74. Other ALT.NET Presentations by us Event Sourcing with F# - Andrew Browne Thinking in a document centric world with RavenDB - Nick Josevski