Turkeys vs. Swans:
Building Antifragile IT Systems
for Disaster Response
MongoDB World 2019
Imanuel Portalatín
iportalatin@mitre.org
Approved for Public Release; Distribution Unlimited. Public Release Case Number 19-1264
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
About MITRE
• We work across the whole of government to tackle difficult problems
that challenge the safety, stability and well-being of our nation
through:
• Operation of Federally Funded R&D Centers (FFRDCs)
• Public-private partnerships
• We have a unique vantage point working across federal, state and
local governments, as well as industry and academia
• We work in the public interest to:
• Discover new possibilities and create unexpected opportunities
• Lead by pioneering together for public good to bring innovative ideas into
existence in national security and the public sector
Our mission-driven team is dedicated to solving problems for a safer world.
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Agenda
• Black Swans, Turkeys and Antifragility
• OLAF Prototype Overview
• Lessons Learned
• Ansible MongoDB Deployment
• Tracking, Updating and Sharing Geo-Tagged Data
• OLAF Live Demo
• What’s Next?
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Black Swans, Turkeys and Antifragility
An Introduction
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://www.flickr.com/photos/noaasatellites/37224066361
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: http://www.coastal.jp/tsunami2011/
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Photo By: Michael C. Barton, Mass Communication Specialist 2nd Class, U.S. Navy, Released (100119-N-8878B-322)
Retrieved From: http://www.navy.mil/view_image.asp?id=80340
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://www.maxpixel.net/Bad-Weather-Storm-Highway-Blizzard-Snow-Driving-2053388
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://pixabay.com/photos/black-swan-bird-nature-water-1034891/
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://www.pexels.com/photo/boy-crystal-ball-magic-magician-369384/
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Turkey Problem:
“A turkey is fed by a butcher all its
life so every day that passes confirms
to the turkey and its team of analysts
that butchers love turkeys with
increased statistical confidence.
That is until a few days before
Thanksgiving when there is a big
surprise that the turkey never saw
coming.”
Retrieved From: https://www.maxpixel.net/Free-Range-Turkeys-Plumage-Birds-Poultry-2799462
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://pxhere.com/en/photo/1334293
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Retrieved From: https://www.dreamstime.com/stock-photo-exponential-growth-image18365370#res22058481
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Promoting Antifragility
• Follow simple heuristics (rules of thumb)
• Take small risks with high payoff potential
• Avoid risks that could lead to catastrophic outcomes
• Build in redundancy and multiple layers
• Keep your options open (optionality)
• Use small incremental steps
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
MongoDB and Antifragility
• Document Database
• Dynamic schema supports fluent polymorphism
• Documents (i.e. objects) correspond to native data types in many
programming languages
• High Availability (Replica Sets)
• Automatic failover
• Data redundancy
• Horizontal Scalability
• Sharding distributes data across a cluster of machines
• Compatible with commodity servers and virtualized elastic environments
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Offline Application Facilitation (OLAF)
Prototype Overview
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Problem
• Communication networks are
devastated by regional disasters
• Effective response requires close
coordination between diverse relief
agencies
• Backup communications cannot
handle the volume of data generated
during these disasters
Experts consider communications a basic necessity, like food and water!
Photo By: Michael C. Barton, Mass Communication Specialist 2nd Class, U.S. Navy, Released (100119-N-8878B-322)
Retrieved From: http://www.navy.mil/view_image.asp?id=80340
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
1. Special software is automatically
installed on inexpensive low-power
computers, called edge gateways
2. Edge gateways automatically relay
data through alternate channels
when main networks are down
3. First responders and the public
connect to edge gateways via local
Wi-Fi networks on their own
personal devices
4. Critical information is uploaded via
gateways with active connection to
the internet, called master nodes
5. Up-to-date information is made
available via online services,
improving command & control
capabilities and public awareness
Idea
Retrieved From: https://www.maxpixel.net/Computer-Pi-Technology-Raspberry-
Pi-Electronics-1719219
Photo By: © Arne9001 | Dreamstime.com
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
OLAF Architecture
Affected
Population
First Responders
Command &
Control
Relief
Organizations
General Public
Local Wi-Fi
Edge Gateway
Containerized
app
Local data
Mesh Protocol
Update Agent
Master Node
Automated
Deployment
Shared data
Mesh Protocol
Update Server
DRMS/GeoQ
Other Services
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Lessons Learned
Ansible MongoDB Deployment
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Benefits of Ansible
• Lightweight agent-less IT automation tool
• Designed for simplicity and ease of use
• Minimum moving parts
• Uses SSH for secure transport
• Only depends on Python and OpenSSH
• Easy to understand template language (YAML)
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Ansible Inventory
all:
vars:
ansible_user: olaf
ansible_ssh_private_key_file: ~/.ssh/mesh_node
ansible_become: yes
ansible_become_pass: olaf
children:
master_nodes:
hosts:
master:
ansible_host: 192.168.0.101
mesh_nodes:
hosts:
mesh_node1:
ansible_host: 192.168.0.1
Variables for All Hosts
Hosts and Groups
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Dockerized MongoDB Deployment
---
- name: Deploy MonogDB to all hosts
hosts: all
tasks:
- name: Start Mongo DB container
docker_container:
name: database
image: mongo
state: started
recreate: yes
published_ports:
- 27017:27017
register: docker_container
$ ansible_playbook mongo_deploy.yml –i hosts
mongo_deploy.yml:
Command Line:
Target Hosts or Groups
Tasks to be run on Host
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Node.js App Configuration
- name: Configure Node.js app
hosts: mesh_node
vars:
- mongoConfig:
url: "mongodb://localhost:27017/"
tasks:
- name: Get MongoDB ip from docker_start output
set_fact:
mongodb_ip: "{{ docker_container.ansible_facts.docker_container.NetworkSettings.IPAddress }}”
when: docker_container is defined
- name: Override default MongoDB config
set_fact:
mongoConfig: "{{ mongoConfig | combine({ 'url' : 'mongodb://' + mongodb_ip + '/' }) }}”
when: mongodb_ip is defined
- name: Write Javascript configuration file
copy:
content: "module.exports = {{ appMongoConfig | to_nice_json }}"
dest: /opt/olaf/webapp/config/mongoConfig.js
mongo_deploy.yml (continued):
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Node.js App Configuration (Continued)
module.exports = {
url: "mongodb://172.17.0.2:27017/"
}
./config/mongoConfig.js (auto-generted):
'use strict’;
const mongoConfig = require('./config/mongoConfig’);
MongoClient.connect(mongoConfig.url, function(err, client) {
assert.equal(null, err);
…
});
app.js:
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Lessons Learned
Tracking, Updating and Sharing Geo-Tagged Data
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Geo-Marker Document
{
"_id":"5b0dcb214ff9980016c119f6",
"type":"Feature",
"geometry": {
"type":"Point",
"coordinates": [
-66.03899002075195,
18.398795619534134
]
},
"properties": {
"name":"fire”
}
}
MongoDB ObjectId
GeoJSON Data Fields
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Creating 2dsphere Index in Node.js
…
MongoClient.connect(mongoConfig.url, function(err, client) {
assert.equal(null, err);
const db = client.db(mongoConfig.dbName);
const collection = db.collection(mongoConfig.makerCollection);
collection.createIndex( { “geometry.coordinates” : “2dsphere” }, function(err, result) {
if (err) {
console.log('Error while creating indexes: '+err);
} else {
console.log('All 2dsphere indexes were created successfully!');
client.close();
}});
});
server.js:
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Tracking Updates with MongoDB ObjectID
…
const ObjectID = require('mongodb').ObjectID;
var lastObjectId = ObjectID.createFromTime(0);
setInterval(function() {
var objectId = new ObjectID();
let query = { '$and' : [ { '_id' : { '$gte' : lastObjectId } }, {'_id' : { '$lt' : objectId } } ] };
MongoClient.connect(mongoConfig.url, function(err, client) {
assert.equal(null, err);
const db = client.db(mongoConfig.dbName);
db.collection(col).find(query).toArray(function(err,docs) {
// Process query results …
lastObjectId = objectId;
});
});
},delay);
update.js:
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Graceful Recovery after Disconnect
…
setInterval(function() {
var objectId = new ObjectID();
let query = { '$and' : [ { '_id' : { '$gte' : lastObjectId } }, {'_id' : { '$lt' : objectId } }, { update : { '$exists' : false } } ] };
MongoClient.connect(mongoConfig.url, function(err, client) {
assert.equal(null, err);
const db = client.db(mongoConfig.dbName);
db.collection(col).find(query).toArray(function(err,docs) {
// Process query results …
db.collection(col).update(query, { '$set’ : { 'update’ : 1 } }, { 'multi' : true }, function(err,updated) {
lastObjectId = objectId;
});
});
});
},delay);
update.js:
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Sharing Geo-Tagged Data
DRMS/GeoQ
OLAF Master Node
Automated
Deployment
Shared data
Mesh Protocol
Update Server
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"popupContent": "flood"
}
}
]
}
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Sharing FeatureCollection over HTTP
…
router.route('/getMarkers').get(function(req,res) {
var query = getQuery(req);
var filter = { '_id' : 0 };
…
collection.find(query,filter).toArray(function(err, docs) {
res.setHeader('content-type',"application/geo+json");
// Build the GeoJSON FeatureCollection object
var featureCollection = {
'type' : 'FeatureCollection',
'features’ : docs
}
res.end(JSON.stringify(featureCollection));
});
});
server.js:
Process URL Query String
Query Markers Collection
Set HTTP Response MIME Type
Package Feature Array in
FeatureCollection Object
Remove ObjectID from Results
Send HTTP Response
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
Live Demo
OLAF Prototype
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
What’s Next?
OLAF Prototype
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
1. OLAF Prototype and AWS Greengrass used to deploy
trained ML models and mesh network software to
edge gateways hosted on Raspberry Pi’s.
2. UAVs with on-board OLAF gateways
can transmit overhead imagery and
relay data from other sensors.
4. Local inference on human pose estimation
models and custom analytics at edge
gateways classify images of victims that
are trapped or need of immediate help.
3. Edge gateways are
deployed to autonomous
platforms able to operate
in hard to access and
hazardous areas.
5. Geotagged images of
victims trapped or in
need of assistance are
sent to OLAF master
nodes at forward
command center and
displayed at DMRS
console.
DRMS Console
6. Analysts use DRMS to
validate automatic
classification and
identify cells where
resources need to be
deployed immediately.
©2019 The MITRE Corporation. ALL RIGHTS RESERVED.

More Related Content

PDF
2018 Cybersecurity Predictions
PPT
State of Cybersecurity in 2018 - Our Top Predictions
PDF
Integrated Cybersecurity and the Internet of Things
PPTX
Webinar: CYREN WebSecurity for Enterprise
PPTX
Webinar: CYREN WebSecurity for Healthcare
PDF
The Attack Surface of the Healthcare Industry
PDF
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
PPTX
Tackling today's cyber security challenges - WISER Services & Solutions
2018 Cybersecurity Predictions
State of Cybersecurity in 2018 - Our Top Predictions
Integrated Cybersecurity and the Internet of Things
Webinar: CYREN WebSecurity for Enterprise
Webinar: CYREN WebSecurity for Healthcare
The Attack Surface of the Healthcare Industry
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Tackling today's cyber security challenges - WISER Services & Solutions

Similar to MongoDB World 2019: Turkeys vs. Swans: Building Antifragile IT Systems for Disaster Response (20)

PDF
MITRE ATT&CKcon 2.0: ATT&CK Updates - Sightings; John Wunder, MITRE
PDF
ATT&CKing Your Adversaries - Operationalizing cyber intelligence in your own ...
PDF
Understanding IoT Security: How to Quantify Security Risk of IoT Technologies
PPTX
Privacy preserving computing and secure multi-party computation ISACA Atlanta
PPTX
Protecting data privacy in analytics and machine learning ISACA London UK
PDF
IAM for mobile and BYOD
PDF
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™
PDF
Neo Automation Series Part 1 - Primer
PPTX
Law seminars intl cybersecurity in the power industry
PPTX
The Inconvenient Truth About API Security
PDF
Harbor Research: IoT Investment Report - June 2017
PDF
BYOD: Be your own device?
PPTX
Proteja sus datos en cualquier servicio Cloud y Web de forma unificada
PDF
Extreme Automation: The Emergence of RPA and AI for Treasury
PDF
FIWARE Global Summit - FIWARE For Smart Agrifood - An Open Integration Approach
PDF
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...
PPTX
Aalto cyber-10.4.18
PDF
The UK's Code of Practice for Security in Consumer IoT Products and Services ...
PPTX
IOT - Internet of Things - September 2017
PPTX
Io t for_scm
MITRE ATT&CKcon 2.0: ATT&CK Updates - Sightings; John Wunder, MITRE
ATT&CKing Your Adversaries - Operationalizing cyber intelligence in your own ...
Understanding IoT Security: How to Quantify Security Risk of IoT Technologies
Privacy preserving computing and secure multi-party computation ISACA Atlanta
Protecting data privacy in analytics and machine learning ISACA London UK
IAM for mobile and BYOD
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™
Neo Automation Series Part 1 - Primer
Law seminars intl cybersecurity in the power industry
The Inconvenient Truth About API Security
Harbor Research: IoT Investment Report - June 2017
BYOD: Be your own device?
Proteja sus datos en cualquier servicio Cloud y Web de forma unificada
Extreme Automation: The Emergence of RPA and AI for Treasury
FIWARE Global Summit - FIWARE For Smart Agrifood - An Open Integration Approach
A Diet of Poisoned Fruit: Designing Implants & OT Payloads for ICS Embedded D...
Aalto cyber-10.4.18
The UK's Code of Practice for Security in Consumer IoT Products and Services ...
IOT - Internet of Things - September 2017
Io t for_scm
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
Ad

Recently uploaded (20)

PPTX
Build Your First AI Agent with UiPath.pptx
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Five Habits of High-Impact Board Members
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
The various Industrial Revolutions .pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
DOCX
search engine optimization ppt fir known well about this
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PPTX
Modernising the Digital Integration Hub
Build Your First AI Agent with UiPath.pptx
Flame analysis and combustion estimation using large language and vision assi...
Chapter 5: Probability Theory and Statistics
Custom Battery Pack Design Considerations for Performance and Safety
Taming the Chaos: How to Turn Unstructured Data into Decisions
Five Habits of High-Impact Board Members
sustainability-14-14877-v2.pddhzftheheeeee
The various Industrial Revolutions .pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
search engine optimization ppt fir known well about this
Getting started with AI Agents and Multi-Agent Systems
Zenith AI: Advanced Artificial Intelligence
UiPath Agentic Automation session 1: RPA to Agents
Benefits of Physical activity for teenagers.pptx
STKI Israel Market Study 2025 version august
Comparative analysis of machine learning models for fake news detection in so...
Developing a website for English-speaking practice to English as a foreign la...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Modernising the Digital Integration Hub

MongoDB World 2019: Turkeys vs. Swans: Building Antifragile IT Systems for Disaster Response

  • 1. Turkeys vs. Swans: Building Antifragile IT Systems for Disaster Response MongoDB World 2019 Imanuel Portalatín iportalatin@mitre.org Approved for Public Release; Distribution Unlimited. Public Release Case Number 19-1264 ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 2. About MITRE • We work across the whole of government to tackle difficult problems that challenge the safety, stability and well-being of our nation through: • Operation of Federally Funded R&D Centers (FFRDCs) • Public-private partnerships • We have a unique vantage point working across federal, state and local governments, as well as industry and academia • We work in the public interest to: • Discover new possibilities and create unexpected opportunities • Lead by pioneering together for public good to bring innovative ideas into existence in national security and the public sector Our mission-driven team is dedicated to solving problems for a safer world. ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 3. Agenda • Black Swans, Turkeys and Antifragility • OLAF Prototype Overview • Lessons Learned • Ansible MongoDB Deployment • Tracking, Updating and Sharing Geo-Tagged Data • OLAF Live Demo • What’s Next? ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 4. Black Swans, Turkeys and Antifragility An Introduction ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 6. ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 8. Photo By: Michael C. Barton, Mass Communication Specialist 2nd Class, U.S. Navy, Released (100119-N-8878B-322) Retrieved From: http://www.navy.mil/view_image.asp?id=80340 ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 12. Turkey Problem: “A turkey is fed by a butcher all its life so every day that passes confirms to the turkey and its team of analysts that butchers love turkeys with increased statistical confidence. That is until a few days before Thanksgiving when there is a big surprise that the turkey never saw coming.” Retrieved From: https://www.maxpixel.net/Free-Range-Turkeys-Plumage-Birds-Poultry-2799462 ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 15. Promoting Antifragility • Follow simple heuristics (rules of thumb) • Take small risks with high payoff potential • Avoid risks that could lead to catastrophic outcomes • Build in redundancy and multiple layers • Keep your options open (optionality) • Use small incremental steps ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 16. MongoDB and Antifragility • Document Database • Dynamic schema supports fluent polymorphism • Documents (i.e. objects) correspond to native data types in many programming languages • High Availability (Replica Sets) • Automatic failover • Data redundancy • Horizontal Scalability • Sharding distributes data across a cluster of machines • Compatible with commodity servers and virtualized elastic environments ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 17. Offline Application Facilitation (OLAF) Prototype Overview ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 18. Problem • Communication networks are devastated by regional disasters • Effective response requires close coordination between diverse relief agencies • Backup communications cannot handle the volume of data generated during these disasters Experts consider communications a basic necessity, like food and water! Photo By: Michael C. Barton, Mass Communication Specialist 2nd Class, U.S. Navy, Released (100119-N-8878B-322) Retrieved From: http://www.navy.mil/view_image.asp?id=80340 ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 19. 1. Special software is automatically installed on inexpensive low-power computers, called edge gateways 2. Edge gateways automatically relay data through alternate channels when main networks are down 3. First responders and the public connect to edge gateways via local Wi-Fi networks on their own personal devices 4. Critical information is uploaded via gateways with active connection to the internet, called master nodes 5. Up-to-date information is made available via online services, improving command & control capabilities and public awareness Idea Retrieved From: https://www.maxpixel.net/Computer-Pi-Technology-Raspberry- Pi-Electronics-1719219 Photo By: © Arne9001 | Dreamstime.com ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 20. OLAF Architecture Affected Population First Responders Command & Control Relief Organizations General Public Local Wi-Fi Edge Gateway Containerized app Local data Mesh Protocol Update Agent Master Node Automated Deployment Shared data Mesh Protocol Update Server DRMS/GeoQ Other Services ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 21. Lessons Learned Ansible MongoDB Deployment ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 22. Benefits of Ansible • Lightweight agent-less IT automation tool • Designed for simplicity and ease of use • Minimum moving parts • Uses SSH for secure transport • Only depends on Python and OpenSSH • Easy to understand template language (YAML) ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 23. Ansible Inventory all: vars: ansible_user: olaf ansible_ssh_private_key_file: ~/.ssh/mesh_node ansible_become: yes ansible_become_pass: olaf children: master_nodes: hosts: master: ansible_host: 192.168.0.101 mesh_nodes: hosts: mesh_node1: ansible_host: 192.168.0.1 Variables for All Hosts Hosts and Groups ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 24. Dockerized MongoDB Deployment --- - name: Deploy MonogDB to all hosts hosts: all tasks: - name: Start Mongo DB container docker_container: name: database image: mongo state: started recreate: yes published_ports: - 27017:27017 register: docker_container $ ansible_playbook mongo_deploy.yml –i hosts mongo_deploy.yml: Command Line: Target Hosts or Groups Tasks to be run on Host ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 25. Node.js App Configuration - name: Configure Node.js app hosts: mesh_node vars: - mongoConfig: url: "mongodb://localhost:27017/" tasks: - name: Get MongoDB ip from docker_start output set_fact: mongodb_ip: "{{ docker_container.ansible_facts.docker_container.NetworkSettings.IPAddress }}” when: docker_container is defined - name: Override default MongoDB config set_fact: mongoConfig: "{{ mongoConfig | combine({ 'url' : 'mongodb://' + mongodb_ip + '/' }) }}” when: mongodb_ip is defined - name: Write Javascript configuration file copy: content: "module.exports = {{ appMongoConfig | to_nice_json }}" dest: /opt/olaf/webapp/config/mongoConfig.js mongo_deploy.yml (continued): ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 26. Node.js App Configuration (Continued) module.exports = { url: "mongodb://172.17.0.2:27017/" } ./config/mongoConfig.js (auto-generted): 'use strict’; const mongoConfig = require('./config/mongoConfig’); MongoClient.connect(mongoConfig.url, function(err, client) { assert.equal(null, err); … }); app.js: ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 27. Lessons Learned Tracking, Updating and Sharing Geo-Tagged Data ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 28. Geo-Marker Document { "_id":"5b0dcb214ff9980016c119f6", "type":"Feature", "geometry": { "type":"Point", "coordinates": [ -66.03899002075195, 18.398795619534134 ] }, "properties": { "name":"fire” } } MongoDB ObjectId GeoJSON Data Fields ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 29. Creating 2dsphere Index in Node.js … MongoClient.connect(mongoConfig.url, function(err, client) { assert.equal(null, err); const db = client.db(mongoConfig.dbName); const collection = db.collection(mongoConfig.makerCollection); collection.createIndex( { “geometry.coordinates” : “2dsphere” }, function(err, result) { if (err) { console.log('Error while creating indexes: '+err); } else { console.log('All 2dsphere indexes were created successfully!'); client.close(); }}); }); server.js: ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 30. Tracking Updates with MongoDB ObjectID … const ObjectID = require('mongodb').ObjectID; var lastObjectId = ObjectID.createFromTime(0); setInterval(function() { var objectId = new ObjectID(); let query = { '$and' : [ { '_id' : { '$gte' : lastObjectId } }, {'_id' : { '$lt' : objectId } } ] }; MongoClient.connect(mongoConfig.url, function(err, client) { assert.equal(null, err); const db = client.db(mongoConfig.dbName); db.collection(col).find(query).toArray(function(err,docs) { // Process query results … lastObjectId = objectId; }); }); },delay); update.js: ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 31. Graceful Recovery after Disconnect … setInterval(function() { var objectId = new ObjectID(); let query = { '$and' : [ { '_id' : { '$gte' : lastObjectId } }, {'_id' : { '$lt' : objectId } }, { update : { '$exists' : false } } ] }; MongoClient.connect(mongoConfig.url, function(err, client) { assert.equal(null, err); const db = client.db(mongoConfig.dbName); db.collection(col).find(query).toArray(function(err,docs) { // Process query results … db.collection(col).update(query, { '$set’ : { 'update’ : 1 } }, { 'multi' : true }, function(err,updated) { lastObjectId = objectId; }); }); }); },delay); update.js: ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 32. Sharing Geo-Tagged Data DRMS/GeoQ OLAF Master Node Automated Deployment Shared data Mesh Protocol Update Server { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [0, 0] }, "properties": { "popupContent": "flood" } } ] } ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 33. Sharing FeatureCollection over HTTP … router.route('/getMarkers').get(function(req,res) { var query = getQuery(req); var filter = { '_id' : 0 }; … collection.find(query,filter).toArray(function(err, docs) { res.setHeader('content-type',"application/geo+json"); // Build the GeoJSON FeatureCollection object var featureCollection = { 'type' : 'FeatureCollection', 'features’ : docs } res.end(JSON.stringify(featureCollection)); }); }); server.js: Process URL Query String Query Markers Collection Set HTTP Response MIME Type Package Feature Array in FeatureCollection Object Remove ObjectID from Results Send HTTP Response ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 34. Live Demo OLAF Prototype ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 35. What’s Next? OLAF Prototype ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.
  • 36. 1. OLAF Prototype and AWS Greengrass used to deploy trained ML models and mesh network software to edge gateways hosted on Raspberry Pi’s. 2. UAVs with on-board OLAF gateways can transmit overhead imagery and relay data from other sensors. 4. Local inference on human pose estimation models and custom analytics at edge gateways classify images of victims that are trapped or need of immediate help. 3. Edge gateways are deployed to autonomous platforms able to operate in hard to access and hazardous areas. 5. Geotagged images of victims trapped or in need of assistance are sent to OLAF master nodes at forward command center and displayed at DMRS console. DRMS Console 6. Analysts use DRMS to validate automatic classification and identify cells where resources need to be deployed immediately. ©2019 The MITRE Corporation. ALL RIGHTS RESERVED.