SlideShare a Scribd company logo
HOW TO DESIGN A BACKEND
FOR THE IOT
İBRAHİM GÜRSES
WHO AM I?
▸ Graduated From Bilkent University in 2011
▸ Vakıfbank, Gate Elektronik, T2 Yazılım, OpsGenie,
Hazelcast, Arçelik.
▸ Currently working on IoT infrastructure @Arçelik
▸ Co-Founder of Ankara Cloud Meetup
ANKARA CLOUD MEETUP
SERVERLESS COMPUTING WITH AWS
HTTPS://WWW.YOUTUBE.COM/WATCH?V=LEPQXTOWDJS
DEVOPS CULTURE AND PRACTICES
HTTPS://WWW.YOUTUBE.COM/WATCH?V=D3E0XJCRWCE
AGENDA
▸ IOT
▸ DevOps
▸ 12 Factor App
▸ Cloud
▸ Microservices
▸ Q&A & Demo
IOT
FROM MOORE’S LAW TO METCALFE’S LAW
Metcalfe's law states that the value of a telecommunications network
is proportional to the square of the number of connected users of the
system
WHAT IS IOT?
▸ The network of physical object that contain embedded
technology to communicate and interact with their internal
states or the external environment. (Gartner)
▸ The term is coined by Kevin Ashton in 1999 in
Procter&Gamble
▸ Also called M2M, Industrial Internet, Web of Things,
Internet of Everything, Industry 4.0
3 PILARS OF IOT
GARTNER’S HYPE CYCLE 2016
FATHER OF JAVA AND IOT
FATHER OF JAVA AND IOT
A TYPICAL IOT DATA PROCESSING ARCHITECTURE
Source : Internet of Things: Principles and Paradigms, Elsevier Science, 2016
PROCESSING DATA FROM THE EDGE
▸ Collect
▸ Instrument apps
▸ Deliver events to analytics service
▸ Receive and store many live data streams
▸ Analyze
▸ Real-time and historical analysis of event streams
▸ Aggregations, pivots and patterns
▸ Consume
▸ Publish analytics in a consumable format
▸ Inform and influence
▸ Make better decisions
How to Design a Backend for IoT
IOT TECH STACK
DEVOPS
DEVELOPMENT BEFORE DEVOPS
▸ DevOps is a new term that primarily
focuses on improved collaboration,
communication, and integration between
software developers and IT operations. It’s
an umbrella term that some describe as a
philosophy, cultural change, and paradigm
shift. Figure shows developer throwing
code "over the wall" Historically many
organisations have been vertically
structured with poor integration among
development, infrastructure, security and
support teams. Frequently the groups
report into different organisational
structures with different corporate goals
and philosophies.
FILLING THE GAPS
WHAT DEVOPS BRINGS
▸ Today, these old divisions are breaking down, with the IT and
developer roles merging and following a series of systematic
principles:
▸ Infrastructure as code
▸ Continuous deployment
▸ Automation
▸ Monitoring
▸ Security
INFRASTRUCTURE AS CODE
▸ Repeatability (Humans make mistakes)
▸ Agility (Roll forward or roll back easily)
▸ Auditing and Security (Paper trail and permissions)
AUTOMATION AND CONFIGURATION MANAGEMENT
▸ Provisioning (CloudFormation, OpsWorks, BeansTalk)
▸ Declarative (Loosely coupled to implementation)
▸ Configuration (Chef, Pupper, SaltStack, Ansible, DSC)
MONITORING AND SECURITY
▸ Processing all systems logs in real time.
▸ Logs should be considered as events
▸ Security can inject analysis tools to dev pipeline.
▸ Testing is not optional in devops.
DEVOPS
▸ Do not write code and toss it to ops and testing team
▸ Do not repeat task manually
▸ Rise of devops tools(Chef, Puppet, Ansible)
▸ Spend time developing business code instead of
infrastructure code (NoOps)
MOVING LEGACY APPS ON CLOUD
▸ Asset Hosting
▸ How do you deal with uploaded content? (images/
videos/music)?
▸ Session Management
▸ How do you deal with session data? Session replication
will be a necessity, sticky session is bad for scalability
and availability
MOVING LEGACY APPS ON CLOUD CONTD
▸ SQL
▸ What considerations are there SQL? (How to handle
stored procedures)
▸ NoSQL
▸ How can you take advantage modern trends of NoSQL?
MOVING LEGACY APPS ON CLOUD CONTD
▸ Caching
▸ How do you incorporate modern caching techniques?
▸ Async Processing
▸ How do you handle long running processes?
12 FACTOR APP
12FACTOR.NET
WHAT IS 12 FACTOR APP?
▸ It is a methodology for building SaaS application
▸ Tries to define systematic problems in app development
▸ Tries to define a set of conceptual solutions to those
problems
GENERAL PROPERTIES OF 12 FACTOR APP
▸ Uses declarative format for setup automation.(Easy
orientation for new joining devs)
▸ Has a clean contract with underlying operations system
(Increases portability)
▸ Is suitable for deployment on modern cloud systems
(CloudNative app, also no need for an army of ops guys to
deploy and maintain the app)
12 FACTOR APP
▸ Code is version Controlled
▸ Always tracked in version control system
▸ 1:1 relationship between code base and app
▸ Many deploys of given app
▸ Codebase same across deploys version may differ
WHAT WE DO?
12 FACTOR APP
▸ Dependencies are declared and Isolated
▸ Never assume system-wide packages
▸ Dependency declaration manifest
▸ Isolated so no dependency leak from system
▸ Helps new developers
WHAT WE DO?
We use maven. A new
developer can start working
by simply typing single
command `mvn clean install`
and all library dependencies
will be installed.
12 FACTOR APP
▸ Configuration is Stored in the Environment
▸ Should store in env variables
▸ Should not be constants in code
▸ Ideally not in conf files
▸ Avoid grouping as environments
WHAT WE DO?
▸ All environment variable and configuration information is
stored over AWS and all applications including mobile
client and wifi-card gets their configuration information
from a single place.
12 FACTOR APP
▸ Backing Services as Attached Resource
▸ Services consumed over the network
▸ No distinction between local or third party services
▸ Keep Dependencies de-coupled
▸ Attach and detach at will
WHAT WE DO?
▸ We use AWS services for both SQL
and NoSQL data storage
(RDS,DynamoDB)
12 FACTOR APP
▸ Build and Run Stages are separated
▸ Impossible to change code at runtime
▸ Releases should have IDs
▸ Build may be complex, started by Devs
▸ Run is simple and completely unattended
WHAT WE DO?
12 FACTOR APP
▸ Application Executed as Stateless Processes
▸ Share Nothing (Universal Scalability Law)
▸ Persisted data in stateful backing store
▸ Memory and File System is for cache only
▸ Avoid sticky Sessions
WHAT WE DO?
▸ We implemented stateless serverless architecture with
AWS API Gateway and Lambda.
▸ Each request to cloud is executed within a Lambda
function inside a isolated stateless container
12 FACTOR APP
▸ Services Exported via Port Binding
▸ Self Contained
▸ Embedded servers
▸ Listen on specific port
▸ Very specific and idealistic
12 FACTOR APP
▸ Application scaled out via process model
▸ Processes are first class citizens
▸ Work assigned to process type
▸ Applications have process that span servers
▸ Use OS process managers not deamons
12 FACTOR APP
▸ Processes are disposable
▸ Can be started or stopped at any time
▸ Minimal start up time, graceful shutdown
▸ Worker processes return to work queue
▸ Robust against sudden death
12 FACTOR APP
▸ Parity Between Application Environments
▸ Avoid time/personnel/tool gaps
▸ Design for continuous deployment
▸ Very important for backing services
▸ Containers and config mgmt. makes this easier.
12 FACTOR APP
▸ Logs are stream of time-ordered events
▸ App is never concerned with storing log files
▸ Execution environment capture logs
▸ May be routed to file, watched, sent to external service
WHAT WE DO?
▸ We use AWS CloudWatch to monitor system logs.
12 FACTOR APP
▸ Management Task Run as One-off Process
▸ Run in identical environment
▸ Separate out as scripts that are source controlled
▸ Don’t run from local terminal
▸ Don’t run directly against the database
ADDITIONAL DEVOPS DESIGN CONSIDERATIONS
▸ Rely on sync messaging
▸ Compose applications out of service
▸ Assess portability requirements
▸ Embrace the abstractions
DEVOPS ANTI-PATTERNS
▸ Relying on the local file system
▸ Building services that scale up
▸ Trying to change code server side
▸ Manually coordinating builds
▸ Hard-coding configuration
▸ Cramming everything into one app
DEVOPS CONCEPTS BEFORE FAILURE
▸ Chaos Monkey
▸ Blue/Green - Canary Deployment
▸ Dependency Injection
▸ Andon Cords
▸ The Cloud
▸ Embedded Teams
DEVOPS CONCEPTS AFTER FAILURE
▸ Blameless Postmortems
▸ Public Status Page
▸ Developers on Call
▸ Incident Command System
CAMS MODEL
▸ Culture
▸ Automation
▸ Measurement
▸ Sharing
KAIZEN’S GUIDES
▸ Good processes bring good results
▸ Go see for yourself (gemba)
▸ Speak with data, manage by facts
▸ Take action to contain and correct root causes
▸ Work as a team
▸ Kaizen is everybody’s business
SOFTWARE FACTORY
LEVELS OF MATURITY OF DEVOPS PROCESS
WHERE TO BEGIN?
CLOUD
How to Design a Backend for IoT
CLOUD APPLICATION DELIVERY MODELS
▸ IaaS (Infrastructure as a Service) - Host
▸ PaaS (Platform as a Service) - Build
▸ SaaS (Software as a Service) - Consume
How to Design a Backend for IoT
How to Design a Backend for IoT
PETS VS CATTLE
AWS IOT
AWS IOT COMPONENTS
▸ Device Gateway
▸ Enables devices to securely and efficiently communicate with
AWS IoT.
▸ Message Broker
▸ Provides a secure mechanism for things and AWS IoT
applications to publish and receive messages from each
other. You can use either the MQTT protocol directly or MQTT
over WebSocket to publish and subscribe. You can use the
HTTP REST interface to publish.
AWS IOT COMPONENTS
▸ Rule Engine
▸ Provides message processing and integration with other AWS services.
You can use a SQL-based language to select data from message
payloads, process and send the data to other services, such as Amazon
S3, Amazon DynamoDB, and AWS Lambda. You can also use the
message broker to republish messages to other subscribers
▸ Security and Identity Service
▸ Provides shared responsibility for security in the AWS cloud. Your things
must keep their credentials safe in order to securely send data to the
message broker. The message broker and rules engine use AWS security
features to send data securely to devices or other AWS services.
AWS IOT COMPONENTS
▸ Thing registry
▸ Organizes the resources associated with each thing. You register your
things and associate up to three custom attributes with each thing. You
can also associate certificates and MQTT client IDs with each thing to
improve your ability to manage and troubleshoot your things.Security
and Identity Service.
▸ Thing Shadow Service
▸ Provides persistent representations of your things in the AWS cloud. You
can publish updated state information to a thing shadow, and your thing
can synchronize its state when it connects. Your things can also publish
their current state to a thing shadow for use by applications or devices.
SERVERLESS COMPUTING MODEL
AWS LAMBDA
AWS APIGATEWAY
MOBILE SAMPLE BACKEND SERVERLESS ARCITECTURE
WHAT WE DO?
AMAZON S3 HOSTED WEBSITE
WHAT WE DO?
MICROSERVICES
MICROSERVICE
▸ Is there a formal definition for microservice architecture ?
▸ No
▸ What is the Difference between monolithic and micro
service styles?
▸ Easy to maintain
▸ Deployment
▸ Scaling
How to Design a Backend for IoT
How to Design a Backend for IoT
How to Design a Backend for IoT
DON’T !!!
ADVANTAGES
▸ Can use right tool for the job
▸ Can replace entire components easier
▸ Can scale specific components
▸ Super cloud friendly
▸ Will push you DevOps
CHALLENGES
▸ Distributed/versioned configuration
▸ Auto configurations and refresh on runtime
▸ New services can auto register at startup
▸ Service registration and discovery
▸ Centralised log management
▸ Collects and visualise log events from distributed processes
▸ Circuit Breaker (Bulk Heading)
▸ Prevent problems with chain of failures
▸ Security
DISTRIBUTED SYSTEMS
SUN’S FALLACIES OF DISTRIBUTED COMPUTING
▸ The network is reliable.
▸ Latency is zero.
▸ Bandwidth is infinite.
▸ The network is secure.
▸ Topology doesn't change.
▸ There is one administrator.
▸ Transport cost is zero.
▸ The network is homogeneous.
ANY ORGANIZATION THAT DESIGNS A
SYSTEM WILL PRODUCE A DESIGN WHOSE
STRUCTURE IS A COPY OF THE
ORGANIZATION’S COMMUNICATION
STRUCTURE.
Melvin Conway
CONWAY’S LAW
DEMO
QUESTIONS?
WE ARE HIRING

More Related Content

What's hot (17)

PDF
[muCon2017]DevSecOps: How to Continuously Integrate Security into DevOps
Daniel Oh
 
PDF
Digitální transformace: zabezpečení agilních prostředí
MarketingArrowECS_CZ
 
PDF
Addressing the 8 Key Pain Points of Kubernetes Cluster Management
Enterprise Management Associates
 
PPT
Enterprise-Ready Private and Hybrid Cloud Computing Today
RightScale
 
PDF
Architecting Cloud Computing Solutions with Java [1.1]
Otávio Santana
 
PDF
Policy as code what helm developers need to know about security
LibbySchulze
 
PDF
Docker FedSummit 2017 - Journey to the Cloud with CaaS
Alex Rhea
 
PDF
ThoughtWorks Technology Radar Roadshow - Brisbane
Thoughtworks
 
PDF
DevSecOps at the GSA
Chris Downey
 
PPTX
Cloud native programming model comparison
Emily Jiang
 
PDF
56k.cloud training
Brian Christner
 
PDF
Netflix Open Source Meetup Season 4 Episode 3
aspyker
 
PPTX
OSCON 2014 - Crash Course in Open Source Cloud Computing
Mark Hinkle
 
PDF
DevSecOps Basics with Azure Pipelines
Abdul_Mujeeb
 
PPTX
DockerCon 2016 - Structured Container Delivery
Oscar Renalias
 
PDF
A Hitchhiker's Guide to Enterprise Microservices with Go
QAware GmbH
 
PDF
Building security into the pipelines
Vandana Verma
 
[muCon2017]DevSecOps: How to Continuously Integrate Security into DevOps
Daniel Oh
 
Digitální transformace: zabezpečení agilních prostředí
MarketingArrowECS_CZ
 
Addressing the 8 Key Pain Points of Kubernetes Cluster Management
Enterprise Management Associates
 
Enterprise-Ready Private and Hybrid Cloud Computing Today
RightScale
 
Architecting Cloud Computing Solutions with Java [1.1]
Otávio Santana
 
Policy as code what helm developers need to know about security
LibbySchulze
 
Docker FedSummit 2017 - Journey to the Cloud with CaaS
Alex Rhea
 
ThoughtWorks Technology Radar Roadshow - Brisbane
Thoughtworks
 
DevSecOps at the GSA
Chris Downey
 
Cloud native programming model comparison
Emily Jiang
 
56k.cloud training
Brian Christner
 
Netflix Open Source Meetup Season 4 Episode 3
aspyker
 
OSCON 2014 - Crash Course in Open Source Cloud Computing
Mark Hinkle
 
DevSecOps Basics with Azure Pipelines
Abdul_Mujeeb
 
DockerCon 2016 - Structured Container Delivery
Oscar Renalias
 
A Hitchhiker's Guide to Enterprise Microservices with Go
QAware GmbH
 
Building security into the pipelines
Vandana Verma
 

Similar to How to Design a Backend for IoT (20)

PDF
DevOps and BigData Analytics
sbbabu
 
PPTX
Designing a Reliable Software Factory for the Cloud
AnkaraCloud
 
PDF
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
PDF
8 - OpenShift - A look at a container platform: what's in the box
Kangaroot
 
PDF
.NET Cloud-Native Bootcamp- Los Angeles
VMware Tanzu
 
PPTX
Tlu introduction-to-cloud
Van Phuc
 
PPTX
12 factor app
Dmytro Panin
 
PDF
DevOps LA Meetup Intro to Habitat
Jessica DeVita
 
PDF
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
Ludovic Piot
 
PDF
Tech Talk - Cloud Transformation in 2017
Alex Rhea
 
PPTX
To the Cloud and beyond (Nantes, Rebuild 2018)
Alex Danvy
 
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
Dun & Bradstreet Cloud Innovation Center
 
PPTX
Micro service Arthicetcure
Kian Paimani
 
PDF
Modern application delivery with Consul
Mitchell Pronschinske
 
PDF
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
Ludovic Piot
 
PPTX
Introduction to Cloudify for OpenStack users
Nati Shalom
 
PPTX
The world of Docker and Kubernetes
vty
 
PPT
Cloud computing
Manish Chiniwalar
 
PPTX
Introduction to Microsoft Azure
Sayed Erfan Arefin
 
PDF
Red Hat Openshift on Microsoft Azure
John Archer
 
DevOps and BigData Analytics
sbbabu
 
Designing a Reliable Software Factory for the Cloud
AnkaraCloud
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
8 - OpenShift - A look at a container platform: what's in the box
Kangaroot
 
.NET Cloud-Native Bootcamp- Los Angeles
VMware Tanzu
 
Tlu introduction-to-cloud
Van Phuc
 
12 factor app
Dmytro Panin
 
DevOps LA Meetup Intro to Habitat
Jessica DeVita
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
Ludovic Piot
 
Tech Talk - Cloud Transformation in 2017
Alex Rhea
 
To the Cloud and beyond (Nantes, Rebuild 2018)
Alex Danvy
 
The Future of Cloud Innovation, featuring Adrian Cockcroft
Dun & Bradstreet Cloud Innovation Center
 
Micro service Arthicetcure
Kian Paimani
 
Modern application delivery with Consul
Mitchell Pronschinske
 
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
Ludovic Piot
 
Introduction to Cloudify for OpenStack users
Nati Shalom
 
The world of Docker and Kubernetes
vty
 
Cloud computing
Manish Chiniwalar
 
Introduction to Microsoft Azure
Sayed Erfan Arefin
 
Red Hat Openshift on Microsoft Azure
John Archer
 
Ad

Recently uploaded (20)

PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Python basic programing language for automation
DanialHabibi2
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Ad

How to Design a Backend for IoT

  • 1. HOW TO DESIGN A BACKEND FOR THE IOT İBRAHİM GÜRSES
  • 2. WHO AM I? ▸ Graduated From Bilkent University in 2011 ▸ Vakıfbank, Gate Elektronik, T2 Yazılım, OpsGenie, Hazelcast, Arçelik. ▸ Currently working on IoT infrastructure @Arçelik ▸ Co-Founder of Ankara Cloud Meetup
  • 4. SERVERLESS COMPUTING WITH AWS HTTPS://WWW.YOUTUBE.COM/WATCH?V=LEPQXTOWDJS
  • 5. DEVOPS CULTURE AND PRACTICES HTTPS://WWW.YOUTUBE.COM/WATCH?V=D3E0XJCRWCE
  • 6. AGENDA ▸ IOT ▸ DevOps ▸ 12 Factor App ▸ Cloud ▸ Microservices ▸ Q&A & Demo
  • 7. IOT
  • 8. FROM MOORE’S LAW TO METCALFE’S LAW Metcalfe's law states that the value of a telecommunications network is proportional to the square of the number of connected users of the system
  • 9. WHAT IS IOT? ▸ The network of physical object that contain embedded technology to communicate and interact with their internal states or the external environment. (Gartner) ▸ The term is coined by Kevin Ashton in 1999 in Procter&Gamble ▸ Also called M2M, Industrial Internet, Web of Things, Internet of Everything, Industry 4.0
  • 10. 3 PILARS OF IOT
  • 12. FATHER OF JAVA AND IOT
  • 13. FATHER OF JAVA AND IOT
  • 14. A TYPICAL IOT DATA PROCESSING ARCHITECTURE Source : Internet of Things: Principles and Paradigms, Elsevier Science, 2016
  • 15. PROCESSING DATA FROM THE EDGE ▸ Collect ▸ Instrument apps ▸ Deliver events to analytics service ▸ Receive and store many live data streams ▸ Analyze ▸ Real-time and historical analysis of event streams ▸ Aggregations, pivots and patterns ▸ Consume ▸ Publish analytics in a consumable format ▸ Inform and influence ▸ Make better decisions
  • 19. DEVELOPMENT BEFORE DEVOPS ▸ DevOps is a new term that primarily focuses on improved collaboration, communication, and integration between software developers and IT operations. It’s an umbrella term that some describe as a philosophy, cultural change, and paradigm shift. Figure shows developer throwing code "over the wall" Historically many organisations have been vertically structured with poor integration among development, infrastructure, security and support teams. Frequently the groups report into different organisational structures with different corporate goals and philosophies.
  • 21. WHAT DEVOPS BRINGS ▸ Today, these old divisions are breaking down, with the IT and developer roles merging and following a series of systematic principles: ▸ Infrastructure as code ▸ Continuous deployment ▸ Automation ▸ Monitoring ▸ Security
  • 22. INFRASTRUCTURE AS CODE ▸ Repeatability (Humans make mistakes) ▸ Agility (Roll forward or roll back easily) ▸ Auditing and Security (Paper trail and permissions)
  • 23. AUTOMATION AND CONFIGURATION MANAGEMENT ▸ Provisioning (CloudFormation, OpsWorks, BeansTalk) ▸ Declarative (Loosely coupled to implementation) ▸ Configuration (Chef, Pupper, SaltStack, Ansible, DSC)
  • 24. MONITORING AND SECURITY ▸ Processing all systems logs in real time. ▸ Logs should be considered as events ▸ Security can inject analysis tools to dev pipeline. ▸ Testing is not optional in devops.
  • 25. DEVOPS ▸ Do not write code and toss it to ops and testing team ▸ Do not repeat task manually ▸ Rise of devops tools(Chef, Puppet, Ansible) ▸ Spend time developing business code instead of infrastructure code (NoOps)
  • 26. MOVING LEGACY APPS ON CLOUD ▸ Asset Hosting ▸ How do you deal with uploaded content? (images/ videos/music)? ▸ Session Management ▸ How do you deal with session data? Session replication will be a necessity, sticky session is bad for scalability and availability
  • 27. MOVING LEGACY APPS ON CLOUD CONTD ▸ SQL ▸ What considerations are there SQL? (How to handle stored procedures) ▸ NoSQL ▸ How can you take advantage modern trends of NoSQL?
  • 28. MOVING LEGACY APPS ON CLOUD CONTD ▸ Caching ▸ How do you incorporate modern caching techniques? ▸ Async Processing ▸ How do you handle long running processes?
  • 31. WHAT IS 12 FACTOR APP? ▸ It is a methodology for building SaaS application ▸ Tries to define systematic problems in app development ▸ Tries to define a set of conceptual solutions to those problems
  • 32. GENERAL PROPERTIES OF 12 FACTOR APP ▸ Uses declarative format for setup automation.(Easy orientation for new joining devs) ▸ Has a clean contract with underlying operations system (Increases portability) ▸ Is suitable for deployment on modern cloud systems (CloudNative app, also no need for an army of ops guys to deploy and maintain the app)
  • 33. 12 FACTOR APP ▸ Code is version Controlled ▸ Always tracked in version control system ▸ 1:1 relationship between code base and app ▸ Many deploys of given app ▸ Codebase same across deploys version may differ
  • 35. 12 FACTOR APP ▸ Dependencies are declared and Isolated ▸ Never assume system-wide packages ▸ Dependency declaration manifest ▸ Isolated so no dependency leak from system ▸ Helps new developers
  • 36. WHAT WE DO? We use maven. A new developer can start working by simply typing single command `mvn clean install` and all library dependencies will be installed.
  • 37. 12 FACTOR APP ▸ Configuration is Stored in the Environment ▸ Should store in env variables ▸ Should not be constants in code ▸ Ideally not in conf files ▸ Avoid grouping as environments
  • 38. WHAT WE DO? ▸ All environment variable and configuration information is stored over AWS and all applications including mobile client and wifi-card gets their configuration information from a single place.
  • 39. 12 FACTOR APP ▸ Backing Services as Attached Resource ▸ Services consumed over the network ▸ No distinction between local or third party services ▸ Keep Dependencies de-coupled ▸ Attach and detach at will
  • 40. WHAT WE DO? ▸ We use AWS services for both SQL and NoSQL data storage (RDS,DynamoDB)
  • 41. 12 FACTOR APP ▸ Build and Run Stages are separated ▸ Impossible to change code at runtime ▸ Releases should have IDs ▸ Build may be complex, started by Devs ▸ Run is simple and completely unattended
  • 43. 12 FACTOR APP ▸ Application Executed as Stateless Processes ▸ Share Nothing (Universal Scalability Law) ▸ Persisted data in stateful backing store ▸ Memory and File System is for cache only ▸ Avoid sticky Sessions
  • 44. WHAT WE DO? ▸ We implemented stateless serverless architecture with AWS API Gateway and Lambda. ▸ Each request to cloud is executed within a Lambda function inside a isolated stateless container
  • 45. 12 FACTOR APP ▸ Services Exported via Port Binding ▸ Self Contained ▸ Embedded servers ▸ Listen on specific port ▸ Very specific and idealistic
  • 46. 12 FACTOR APP ▸ Application scaled out via process model ▸ Processes are first class citizens ▸ Work assigned to process type ▸ Applications have process that span servers ▸ Use OS process managers not deamons
  • 47. 12 FACTOR APP ▸ Processes are disposable ▸ Can be started or stopped at any time ▸ Minimal start up time, graceful shutdown ▸ Worker processes return to work queue ▸ Robust against sudden death
  • 48. 12 FACTOR APP ▸ Parity Between Application Environments ▸ Avoid time/personnel/tool gaps ▸ Design for continuous deployment ▸ Very important for backing services ▸ Containers and config mgmt. makes this easier.
  • 49. 12 FACTOR APP ▸ Logs are stream of time-ordered events ▸ App is never concerned with storing log files ▸ Execution environment capture logs ▸ May be routed to file, watched, sent to external service
  • 50. WHAT WE DO? ▸ We use AWS CloudWatch to monitor system logs.
  • 51. 12 FACTOR APP ▸ Management Task Run as One-off Process ▸ Run in identical environment ▸ Separate out as scripts that are source controlled ▸ Don’t run from local terminal ▸ Don’t run directly against the database
  • 52. ADDITIONAL DEVOPS DESIGN CONSIDERATIONS ▸ Rely on sync messaging ▸ Compose applications out of service ▸ Assess portability requirements ▸ Embrace the abstractions
  • 53. DEVOPS ANTI-PATTERNS ▸ Relying on the local file system ▸ Building services that scale up ▸ Trying to change code server side ▸ Manually coordinating builds ▸ Hard-coding configuration ▸ Cramming everything into one app
  • 54. DEVOPS CONCEPTS BEFORE FAILURE ▸ Chaos Monkey ▸ Blue/Green - Canary Deployment ▸ Dependency Injection ▸ Andon Cords ▸ The Cloud ▸ Embedded Teams
  • 55. DEVOPS CONCEPTS AFTER FAILURE ▸ Blameless Postmortems ▸ Public Status Page ▸ Developers on Call ▸ Incident Command System
  • 56. CAMS MODEL ▸ Culture ▸ Automation ▸ Measurement ▸ Sharing
  • 57. KAIZEN’S GUIDES ▸ Good processes bring good results ▸ Go see for yourself (gemba) ▸ Speak with data, manage by facts ▸ Take action to contain and correct root causes ▸ Work as a team ▸ Kaizen is everybody’s business
  • 59. LEVELS OF MATURITY OF DEVOPS PROCESS
  • 61. CLOUD
  • 63. CLOUD APPLICATION DELIVERY MODELS ▸ IaaS (Infrastructure as a Service) - Host ▸ PaaS (Platform as a Service) - Build ▸ SaaS (Software as a Service) - Consume
  • 68. AWS IOT COMPONENTS ▸ Device Gateway ▸ Enables devices to securely and efficiently communicate with AWS IoT. ▸ Message Broker ▸ Provides a secure mechanism for things and AWS IoT applications to publish and receive messages from each other. You can use either the MQTT protocol directly or MQTT over WebSocket to publish and subscribe. You can use the HTTP REST interface to publish.
  • 69. AWS IOT COMPONENTS ▸ Rule Engine ▸ Provides message processing and integration with other AWS services. You can use a SQL-based language to select data from message payloads, process and send the data to other services, such as Amazon S3, Amazon DynamoDB, and AWS Lambda. You can also use the message broker to republish messages to other subscribers ▸ Security and Identity Service ▸ Provides shared responsibility for security in the AWS cloud. Your things must keep their credentials safe in order to securely send data to the message broker. The message broker and rules engine use AWS security features to send data securely to devices or other AWS services.
  • 70. AWS IOT COMPONENTS ▸ Thing registry ▸ Organizes the resources associated with each thing. You register your things and associate up to three custom attributes with each thing. You can also associate certificates and MQTT client IDs with each thing to improve your ability to manage and troubleshoot your things.Security and Identity Service. ▸ Thing Shadow Service ▸ Provides persistent representations of your things in the AWS cloud. You can publish updated state information to a thing shadow, and your thing can synchronize its state when it connects. Your things can also publish their current state to a thing shadow for use by applications or devices.
  • 74. MOBILE SAMPLE BACKEND SERVERLESS ARCITECTURE
  • 76. AMAZON S3 HOSTED WEBSITE
  • 79. MICROSERVICE ▸ Is there a formal definition for microservice architecture ? ▸ No ▸ What is the Difference between monolithic and micro service styles? ▸ Easy to maintain ▸ Deployment ▸ Scaling
  • 84. ADVANTAGES ▸ Can use right tool for the job ▸ Can replace entire components easier ▸ Can scale specific components ▸ Super cloud friendly ▸ Will push you DevOps
  • 85. CHALLENGES ▸ Distributed/versioned configuration ▸ Auto configurations and refresh on runtime ▸ New services can auto register at startup ▸ Service registration and discovery ▸ Centralised log management ▸ Collects and visualise log events from distributed processes ▸ Circuit Breaker (Bulk Heading) ▸ Prevent problems with chain of failures ▸ Security
  • 87. SUN’S FALLACIES OF DISTRIBUTED COMPUTING ▸ The network is reliable. ▸ Latency is zero. ▸ Bandwidth is infinite. ▸ The network is secure. ▸ Topology doesn't change. ▸ There is one administrator. ▸ Transport cost is zero. ▸ The network is homogeneous.
  • 88. ANY ORGANIZATION THAT DESIGNS A SYSTEM WILL PRODUCE A DESIGN WHOSE STRUCTURE IS A COPY OF THE ORGANIZATION’S COMMUNICATION STRUCTURE. Melvin Conway CONWAY’S LAW
  • 89. DEMO