SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Student Services IT
Central Syllabi
A look at the ingredients for a major
new Class Roster feature.
classes.cornell.edu
ECSS3SNS SQS CloudFront SES
Student Services IT
Athletics & Physical Education Dean of Students
Career Services Cornell Health
Chimes Public Service Center
Campus Life Enterprise Services

(Cornell Store, Housing, Dining...)
Student Disability Services
Campus & Community Engagement ... and more
Supported Customers
University Registrar Student Employment
Financial Aid Undergraduate Admissions
Graduate School ... and more
Division of Student and Campus Life (SCL)
Vice Provost for Enrollment
Central Syllabi
Class Roster
‣ Official schedule of classes

classes.cornell.edu
‣ Office of the University Registrar
‣ October 2014

Launched on-premises

Symfony Framework (PHP), MongoDB, MySQL
‣ February 2016

AWS Migration

AWS (EC2, RDS, ELB, ASG), Jenkins, Ansible
‣ March 2016

Released "Scheduler"

AngularJS
‣ June 2017

Released "Central Syllabi"
Central Syllabi
New Functionality - June 2017
‣ Expanded API

Internal & Academic Units
‣ Syllabus Upload

Instructors & Admin. Asst.
‣ Syllabus Download

All
‣ Syllabus Content Search

All
‣ Email Alerts

All
‣ Reports

Instructors, Admin Asst., and Staff
Central Syllabi
New Ingredients
‣ Expanded API

Internal & Academic Units
‣ Syllabus Upload

Instructors & Admin. Asst.
‣ Syllabus Download

All
‣ Syllabus Content Search

All
‣ Email Alerts

All
‣ Reports

Instructors, Admin Asst., and Staff
Message Bus

Amazon SNS + SQS
Object Storage

Amazon S3
Content Delivery

Amazon CloudFront
Full Text Search

Elasticsearch on Amazon ECS
Notifications

Amazon SES (API, not SMTP)
Central Syllabi
‣ Class Roster introduced "API 4.0" to add support for "Central Syllabi"
AngularJS app
‣ Stumbling into an event driven model and a message bus
‣ Amazon SNS - Simple Notification Service
‣ Publish/Subscribe (Pub/Sub) Messaging Service
‣ Publish messages to SNS Topic using AWS SDK/API
‣ Subscribe endpoints (SQS, HTTPS, AWS Lambda, SMS, etc)
‣ Amazon SQS - Simple Queue Service
‣ SQS Queue subscribed to SNS Topic
‣ ReceiveMessage from SQS using AWS SDK/API
‣ at least once delivery; no guarantee on order of messages received
‣ Easy entry point to pub/sub
‣ AWS SDK; serialize/deserialize objects; push to topic and a receive from queue
‣ Pricing: Less than $1/million messages
Expanded API
Central Syllabi
Events
Published to SNS Topic (JSON)
SyllabusCreate SyllabusFileUpload SyllabusAttach ReportGenerate
SyllabusUpdate SyllabusFileDelete SyllabusDetach ReportRun
SyllabusReplace SyllabusFileUnsafe SyllabusPublish RosterRefresh
SyllabusDelete SyllabusUnpublish
SyllabusSearchIngest
Central Syllabi
‣ Publish hydrated messages to SNS
‣ SQS Queue subscribed to SNS Topic
‣ Worker Process (Run Loop)
‣ SQS Long Polling (20s) sqs:ReceiveMessage
‣ Processing of may trigger additional sns:Publish
‣ On success; sqs:DeleteMessage
‣ Advantages
‣ decouple components
‣ async/non-blocking; can parallelize
‣ "Maximum Receives"; redrive policy to DLQ (Dead Letter Queue)
‣ CloudWatch monitor message age (alarmed on failure)
‣ Facilitates future integrations; ex. publishing messages not internally used

(RosterRefresh)
‣ Challenges
‣ Idempotent ("at least once", order not guaranteed); not using FIFO
‣ Fast (async)
Event Processing
{
"type": "SyllabusPublish"
"syllabusId": "..."
"rosterId": 13,
"roster": {
"strm": 2678,
"rosterSlug": "FA17",
...
},
"syllabus": {
"viewPermission": ...
"publishedDttm": ...
"resourceId": ...
...
}
}
Central Syllabi
‣ Amazon S3 (Simple Storage Service)
‣ Unlimited object storage (Key/Value); not a file system
‣ Durability: 99.999999999%
‣ Pricing: about 2 cents/gigabyte month
‣ S3 Bucket "cu-classroster-prod"
‣ Evaluation of several permissions (IAM, Bucket Policy, ACL)
‣ Bucket policy: requires encryption (AES256) and grants CloudFront OAI (user) access
‣ CORS Policy
‣ IAM Role w/policy: GetObject, PutObject only. No DeleteObject
‣ Class Roster provides clients temporary credentials to enable
direct upload to S3
Syllabus Upload
Central Syllabi
‣ AngularJS app w/API 4.0
‣ Client given API Token
‣ Client issues $http request
‣ Client requests includes Authorization: header
‣ Class Roster API uses AWS SDK to generate 

and return security policy 

and signature to client
‣ Client uploads to S3
‣ PutObject (V4)

http://docs.aws.amazon.com/AmazonS3/latest/
API/sigv4-UsingHTTPPOST.html
‣ Client notifies API on completion
‣ SyllabusFileUpload event published to
SNS
Create a POST Policy
{
"s3Key":"prod/syllabus-file/2678/
ae51683709939c0f2ab250e9511606803ab0020e6024e03",
"formInputs": {
"acl": "private",
"X-Amz-Security-Token": "...",
"key": "${filename}",
"X-Amz-Credential": "ASIAJKOTJGRPYKUDMUHA/
20170828/us-east-1/s3/aws4_request",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20170828T231949Z",
"Policy": "...",
"X-Amz-Signature": "..."
},
"formAttributes": {
"action": "https://cu-
classroster-prod.s3.amazonaws.com",
"method": "POST",
"enctype": "multipart/form-data"
},
"fileId": "4c06f8ee0830e747eb791dd01b9a0b7796"
}
Central Syllabi
‣ Amazon CloudFront (Content Delivery Network)
‣ CloudFront vs S3
‣ Or ... why are we not using Amazon S3 for delivery
‣ Distribution
‣ vanity domain: files.classes.cornell.edu + SSL Certificate (Amazon Certificate Manager)
‣ Behaviors (path routing to origin)
‣ Origin (S3)
‣ Allow CloudFront distribution to access origin via bucket policy w/OAI

(Origin Access Identity)
‣ Class Roster authorizes client to access private content
Syllabus Download
Central Syllabi
‣ Signed URL vs Signed Cookie
‣ Signed URL, similar in concept to S3, but uses key-pair (root credentials to create)
‣ short expiration
‣ content-disposition to rename
‣ Client requests syllabus from Class Roster
‣ https://classes.cornell.edu/download/syllabus-simple/FA17/AEM/1220/1/001
‣ Server returns 302 Redirect to Signed URL:
‣ https://files.classes.cornell.edu/prod/

syllabus-file/2678/16d90dc10961b1f4aaf758691fc0ca82b8ca5accc487c85f477a020dc65ffbd

?response-content-disposition=inline:filename="Syllabus-FA17-AEM1220-LEC001-PRIOR-TERM.pdf"

&Expires=<expireUnixTime>

&Signature=<base64Text>

&Key-Pair-Id=<access key>
‣ http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
CloudFront Signed URLs
Central Syllabi
‣ Full text search
‣ "Options": RDBMS (MySQL) vs NoSQL (MongoDB) vs Elasticsearch
‣ What is Elasticsearch?
‣ Full text search engine based on Apache Lucene supported by

elastic.co
‣ Open source; massively scalable; RESTful; "E" in ELK Stack
‣ Not for the faint of heart
‣ Considered AWS Elasticsearch
‣ pros: AWS managed service (backups, scaling)
‣ cons: limited plugins; out of date; costly; not in VPC
‣ ** at time of development, lacked attachment pipeline plugin
‣ Decision: Elasticsearch on EC2 Container Service
‣ Utilize official Elastic Docker images for base

docker pull docker.elastic.co/elasticsearch/elasticsearch
‣ Elasticsearch is I/O Intensive; ECS Task Definition w/placement constraint set to 

container instance that has an attribute to identify our persistent EBS volume
‣ Ansible + Jenkins; lay down task definition, service, IAM roles, etc.
Syllabus Content Search
Central Syllabi
‣ Index - Collection of Types

Syllabi
‣ Type - Consistent Fields within Type

Syllabus
‣ Plugins

ingest-attachment (Apache Tika for text extraction)
‣ APIs (RESTful and JSON) - Indices, Document, Search, etc

PUT /syllabi

PUT /syllabi/syllabus/<syllabusId>

GET /_search
Elasticsearch at a Glance
Central Syllabi
‣ Worker processing of
SyllabusPublish results in
new event:
SyllabusSearchIngest
‣ Worker receives
SyllabusSearchIngest
‣ GetObject from S3
‣ Document API
‣ PUT syllabi/syllabus/<id>
‣ Backup vs DR Plan
‣ re-ingest all docs
Elasticsearch Ingestion
$key = $syllabus->getGeneralFile()->getS3Key();
try {
$s3Object = $s3Client->getObject(

['Key' => $key, 'Bucket' => $this->getS3Bucket()]);
} catch (Exception $e) {
throw new FileNotFoundException('File Not Found');
}
$body = base64_encode($s3Object['Body']);
$esParams = [
'index' => 'syllabi',
'type' => 'syllabus',
'id' => $syllabus->getId(),
'pipeline' => 'attachment',
'body' => [
'rosterId' => $roster->getId(),
'strm' => $roster->getStrm(),
'syllabusId' => $syllabus->getId(),
'updatedDttm' => $syllabus->getUpdatedDttm()-
>format(DATE_ATOM),
'data' => $body
]
];
$result = $this->getElasticsearchClient()->index($esParams);
Central Syllabi
‣ Search API
‣ Example query
‣ GET /_search
‣ Room for improvement
‣ fuzzy matches
‣ phonetic matching
Elasticsearch Query
$params = [
'index' => 'syllabi',
'type' => 'syllabus',
'size' => 50,
'body' => [
'_source' => ['syllabusId'],
'query' => [
'bool' => [
'must' => [
['match' => 

['rosterId' => $roster->getId()]],
['match' => 

['attachment.content' => $searchQuery]]
]
]
]
],
'client' => [
'timeout' => 5,
'connect_timeout' => 5
]
]
$esResults = $this->getElasticsearchClient()

->search($params);
Central Syllabi
Thank You

Questions?

Mais conteúdo relacionado

Mais procurados

Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAmazon Web Services
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Amazon Web Services
 
Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Amazon Web Services
 
Serverless Application Development with SAM
Serverless Application Development with SAMServerless Application Development with SAM
Serverless Application Development with SAMAmazon Web Services
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Julien SIMON
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerAmazon Web Services
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesAmazon Web Services
 
Deep dive on Serverless application development
Deep dive on Serverless application developmentDeep dive on Serverless application development
Deep dive on Serverless application developmentAmazon Web Services
 
Serverless Applications on AWS
Serverless Applications on AWSServerless Applications on AWS
Serverless Applications on AWSDean Bryen
 
Getting Started with Windows Workloads on Amazon EC2 - Toronto
 Getting Started with Windows Workloads on Amazon EC2 - Toronto Getting Started with Windows Workloads on Amazon EC2 - Toronto
Getting Started with Windows Workloads on Amazon EC2 - TorontoAmazon Web Services
 
Moving Viadeo to AWS (2015)
Moving Viadeo to AWS (2015)Moving Viadeo to AWS (2015)
Moving Viadeo to AWS (2015)Julien SIMON
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeAmazon Web Services
 
Microservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMicroservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMitoc Group
 
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016Amazon Web Services
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverlessDhaval Nagar
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAmazon Web Services
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
AWS Big Data combo
AWS Big Data comboAWS Big Data combo
AWS Big Data comboJulien SIMON
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 

Mais procurados (20)

Authoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAMAuthoring and Deploying Serverless Applications with AWS SAM
Authoring and Deploying Serverless Applications with AWS SAM
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
 
Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...
 
Serverless Application Development with SAM
Serverless Application Development with SAMServerless Application Development with SAM
Serverless Application Development with SAM
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
 
SRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and DockerSRV409 Deep Dive on Microservices and Docker
SRV409 Deep Dive on Microservices and Docker
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
Deep dive on Serverless application development
Deep dive on Serverless application developmentDeep dive on Serverless application development
Deep dive on Serverless application development
 
Serverless Applications on AWS
Serverless Applications on AWSServerless Applications on AWS
Serverless Applications on AWS
 
Getting Started with Windows Workloads on Amazon EC2 - Toronto
 Getting Started with Windows Workloads on Amazon EC2 - Toronto Getting Started with Windows Workloads on Amazon EC2 - Toronto
Getting Started with Windows Workloads on Amazon EC2 - Toronto
 
Moving Viadeo to AWS (2015)
Moving Viadeo to AWS (2015)Moving Viadeo to AWS (2015)
Moving Viadeo to AWS (2015)
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Microservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and moreMicroservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using AWS Lambda and more
 
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
AWS CloudFormation: Infrastructure as Code | AWS Public Sector Summit 2016
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverless
 
Deep Dive: AWS Lambda
Deep Dive: AWS LambdaDeep Dive: AWS Lambda
Deep Dive: AWS Lambda
 
AWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWSAWS for Startups, London - Programming AWS
AWS for Startups, London - Programming AWS
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
AWS Big Data combo
AWS Big Data comboAWS Big Data combo
AWS Big Data combo
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 

Semelhante a Cornell University, Central Syllabi - A look at the ingredients for a major new Class Roster feature.

Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...Shaun Murakami
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Amazon Web Services
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Amazon Web Services
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationAnton Babenko
 
Toyko azure meetup # 1 azure paa s overview
Toyko azure meetup # 1   azure paa s overviewToyko azure meetup # 1   azure paa s overview
Toyko azure meetup # 1 azure paa s overviewTokyo Azure Meetup
 
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...Amazon Web Services
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...Amazon Web Services
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...Chris Munns
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsAmazon Web Services
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션Amazon Web Services Korea
 
(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWSAmazon Web Services
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best PracticesAmazon Web Services
 
Building AWS Lambda Applications with the AWS Serverless Application Model (A...
Building AWS Lambda Applications with the AWS Serverless Application Model (A...Building AWS Lambda Applications with the AWS Serverless Application Model (A...
Building AWS Lambda Applications with the AWS Serverless Application Model (A...Amazon Web Services
 
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayMigrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayAmazon Web Services
 
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Amazon Web Services
 
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin PickinItb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin PickinGavin Pickin
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)Julien SIMON
 

Semelhante a Cornell University, Central Syllabi - A look at the ingredients for a major new Class Roster feature. (20)

Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
Toyko azure meetup # 1 azure paa s overview
Toyko azure meetup # 1   azure paa s overviewToyko azure meetup # 1   azure paa s overview
Toyko azure meetup # 1 azure paa s overview
 
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless Applications
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices
 
AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
Building AWS Lambda Applications with the AWS Serverless Application Model (A...
Building AWS Lambda Applications with the AWS Serverless Application Model (A...Building AWS Lambda Applications with the AWS Serverless Application Model (A...
Building AWS Lambda Applications with the AWS Serverless Application Model (A...
 
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayMigrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
 
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
Continuous Integration e Delivery per (r)innovare lo sviluppo software e la g...
 
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin PickinItb 2021 - Bulding Quick APIs by Gavin Pickin
Itb 2021 - Bulding Quick APIs by Gavin Pickin
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
17584568 (2).ppt
17584568 (2).ppt17584568 (2).ppt
17584568 (2).ppt
 

Último

MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 

Último (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 

Cornell University, Central Syllabi - A look at the ingredients for a major new Class Roster feature.

  • 1. Student Services IT Central Syllabi A look at the ingredients for a major new Class Roster feature. classes.cornell.edu ECSS3SNS SQS CloudFront SES
  • 2. Student Services IT Athletics & Physical Education Dean of Students Career Services Cornell Health Chimes Public Service Center Campus Life Enterprise Services
 (Cornell Store, Housing, Dining...) Student Disability Services Campus & Community Engagement ... and more Supported Customers University Registrar Student Employment Financial Aid Undergraduate Admissions Graduate School ... and more Division of Student and Campus Life (SCL) Vice Provost for Enrollment
  • 3. Central Syllabi Class Roster ‣ Official schedule of classes
 classes.cornell.edu ‣ Office of the University Registrar ‣ October 2014
 Launched on-premises
 Symfony Framework (PHP), MongoDB, MySQL ‣ February 2016
 AWS Migration
 AWS (EC2, RDS, ELB, ASG), Jenkins, Ansible ‣ March 2016
 Released "Scheduler"
 AngularJS ‣ June 2017
 Released "Central Syllabi"
  • 4. Central Syllabi New Functionality - June 2017 ‣ Expanded API
 Internal & Academic Units ‣ Syllabus Upload
 Instructors & Admin. Asst. ‣ Syllabus Download
 All ‣ Syllabus Content Search
 All ‣ Email Alerts
 All ‣ Reports
 Instructors, Admin Asst., and Staff
  • 5. Central Syllabi New Ingredients ‣ Expanded API
 Internal & Academic Units ‣ Syllabus Upload
 Instructors & Admin. Asst. ‣ Syllabus Download
 All ‣ Syllabus Content Search
 All ‣ Email Alerts
 All ‣ Reports
 Instructors, Admin Asst., and Staff Message Bus
 Amazon SNS + SQS Object Storage
 Amazon S3 Content Delivery
 Amazon CloudFront Full Text Search
 Elasticsearch on Amazon ECS Notifications
 Amazon SES (API, not SMTP)
  • 6. Central Syllabi ‣ Class Roster introduced "API 4.0" to add support for "Central Syllabi" AngularJS app ‣ Stumbling into an event driven model and a message bus ‣ Amazon SNS - Simple Notification Service ‣ Publish/Subscribe (Pub/Sub) Messaging Service ‣ Publish messages to SNS Topic using AWS SDK/API ‣ Subscribe endpoints (SQS, HTTPS, AWS Lambda, SMS, etc) ‣ Amazon SQS - Simple Queue Service ‣ SQS Queue subscribed to SNS Topic ‣ ReceiveMessage from SQS using AWS SDK/API ‣ at least once delivery; no guarantee on order of messages received ‣ Easy entry point to pub/sub ‣ AWS SDK; serialize/deserialize objects; push to topic and a receive from queue ‣ Pricing: Less than $1/million messages Expanded API
  • 7. Central Syllabi Events Published to SNS Topic (JSON) SyllabusCreate SyllabusFileUpload SyllabusAttach ReportGenerate SyllabusUpdate SyllabusFileDelete SyllabusDetach ReportRun SyllabusReplace SyllabusFileUnsafe SyllabusPublish RosterRefresh SyllabusDelete SyllabusUnpublish SyllabusSearchIngest
  • 8. Central Syllabi ‣ Publish hydrated messages to SNS ‣ SQS Queue subscribed to SNS Topic ‣ Worker Process (Run Loop) ‣ SQS Long Polling (20s) sqs:ReceiveMessage ‣ Processing of may trigger additional sns:Publish ‣ On success; sqs:DeleteMessage ‣ Advantages ‣ decouple components ‣ async/non-blocking; can parallelize ‣ "Maximum Receives"; redrive policy to DLQ (Dead Letter Queue) ‣ CloudWatch monitor message age (alarmed on failure) ‣ Facilitates future integrations; ex. publishing messages not internally used
 (RosterRefresh) ‣ Challenges ‣ Idempotent ("at least once", order not guaranteed); not using FIFO ‣ Fast (async) Event Processing { "type": "SyllabusPublish" "syllabusId": "..." "rosterId": 13, "roster": { "strm": 2678, "rosterSlug": "FA17", ... }, "syllabus": { "viewPermission": ... "publishedDttm": ... "resourceId": ... ... } }
  • 9. Central Syllabi ‣ Amazon S3 (Simple Storage Service) ‣ Unlimited object storage (Key/Value); not a file system ‣ Durability: 99.999999999% ‣ Pricing: about 2 cents/gigabyte month ‣ S3 Bucket "cu-classroster-prod" ‣ Evaluation of several permissions (IAM, Bucket Policy, ACL) ‣ Bucket policy: requires encryption (AES256) and grants CloudFront OAI (user) access ‣ CORS Policy ‣ IAM Role w/policy: GetObject, PutObject only. No DeleteObject ‣ Class Roster provides clients temporary credentials to enable direct upload to S3 Syllabus Upload
  • 10. Central Syllabi ‣ AngularJS app w/API 4.0 ‣ Client given API Token ‣ Client issues $http request ‣ Client requests includes Authorization: header ‣ Class Roster API uses AWS SDK to generate 
 and return security policy 
 and signature to client ‣ Client uploads to S3 ‣ PutObject (V4)
 http://docs.aws.amazon.com/AmazonS3/latest/ API/sigv4-UsingHTTPPOST.html ‣ Client notifies API on completion ‣ SyllabusFileUpload event published to SNS Create a POST Policy { "s3Key":"prod/syllabus-file/2678/ ae51683709939c0f2ab250e9511606803ab0020e6024e03", "formInputs": { "acl": "private", "X-Amz-Security-Token": "...", "key": "${filename}", "X-Amz-Credential": "ASIAJKOTJGRPYKUDMUHA/ 20170828/us-east-1/s3/aws4_request", "X-Amz-Algorithm": "AWS4-HMAC-SHA256", "X-Amz-Date": "20170828T231949Z", "Policy": "...", "X-Amz-Signature": "..." }, "formAttributes": { "action": "https://cu- classroster-prod.s3.amazonaws.com", "method": "POST", "enctype": "multipart/form-data" }, "fileId": "4c06f8ee0830e747eb791dd01b9a0b7796" }
  • 11. Central Syllabi ‣ Amazon CloudFront (Content Delivery Network) ‣ CloudFront vs S3 ‣ Or ... why are we not using Amazon S3 for delivery ‣ Distribution ‣ vanity domain: files.classes.cornell.edu + SSL Certificate (Amazon Certificate Manager) ‣ Behaviors (path routing to origin) ‣ Origin (S3) ‣ Allow CloudFront distribution to access origin via bucket policy w/OAI
 (Origin Access Identity) ‣ Class Roster authorizes client to access private content Syllabus Download
  • 12. Central Syllabi ‣ Signed URL vs Signed Cookie ‣ Signed URL, similar in concept to S3, but uses key-pair (root credentials to create) ‣ short expiration ‣ content-disposition to rename ‣ Client requests syllabus from Class Roster ‣ https://classes.cornell.edu/download/syllabus-simple/FA17/AEM/1220/1/001 ‣ Server returns 302 Redirect to Signed URL: ‣ https://files.classes.cornell.edu/prod/
 syllabus-file/2678/16d90dc10961b1f4aaf758691fc0ca82b8ca5accc487c85f477a020dc65ffbd
 ?response-content-disposition=inline:filename="Syllabus-FA17-AEM1220-LEC001-PRIOR-TERM.pdf"
 &Expires=<expireUnixTime>
 &Signature=<base64Text>
 &Key-Pair-Id=<access key> ‣ http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html CloudFront Signed URLs
  • 13. Central Syllabi ‣ Full text search ‣ "Options": RDBMS (MySQL) vs NoSQL (MongoDB) vs Elasticsearch ‣ What is Elasticsearch? ‣ Full text search engine based on Apache Lucene supported by
 elastic.co ‣ Open source; massively scalable; RESTful; "E" in ELK Stack ‣ Not for the faint of heart ‣ Considered AWS Elasticsearch ‣ pros: AWS managed service (backups, scaling) ‣ cons: limited plugins; out of date; costly; not in VPC ‣ ** at time of development, lacked attachment pipeline plugin ‣ Decision: Elasticsearch on EC2 Container Service ‣ Utilize official Elastic Docker images for base
 docker pull docker.elastic.co/elasticsearch/elasticsearch ‣ Elasticsearch is I/O Intensive; ECS Task Definition w/placement constraint set to 
 container instance that has an attribute to identify our persistent EBS volume ‣ Ansible + Jenkins; lay down task definition, service, IAM roles, etc. Syllabus Content Search
  • 14. Central Syllabi ‣ Index - Collection of Types
 Syllabi ‣ Type - Consistent Fields within Type
 Syllabus ‣ Plugins
 ingest-attachment (Apache Tika for text extraction) ‣ APIs (RESTful and JSON) - Indices, Document, Search, etc
 PUT /syllabi
 PUT /syllabi/syllabus/<syllabusId>
 GET /_search Elasticsearch at a Glance
  • 15. Central Syllabi ‣ Worker processing of SyllabusPublish results in new event: SyllabusSearchIngest ‣ Worker receives SyllabusSearchIngest ‣ GetObject from S3 ‣ Document API ‣ PUT syllabi/syllabus/<id> ‣ Backup vs DR Plan ‣ re-ingest all docs Elasticsearch Ingestion $key = $syllabus->getGeneralFile()->getS3Key(); try { $s3Object = $s3Client->getObject(
 ['Key' => $key, 'Bucket' => $this->getS3Bucket()]); } catch (Exception $e) { throw new FileNotFoundException('File Not Found'); } $body = base64_encode($s3Object['Body']); $esParams = [ 'index' => 'syllabi', 'type' => 'syllabus', 'id' => $syllabus->getId(), 'pipeline' => 'attachment', 'body' => [ 'rosterId' => $roster->getId(), 'strm' => $roster->getStrm(), 'syllabusId' => $syllabus->getId(), 'updatedDttm' => $syllabus->getUpdatedDttm()- >format(DATE_ATOM), 'data' => $body ] ]; $result = $this->getElasticsearchClient()->index($esParams);
  • 16. Central Syllabi ‣ Search API ‣ Example query ‣ GET /_search ‣ Room for improvement ‣ fuzzy matches ‣ phonetic matching Elasticsearch Query $params = [ 'index' => 'syllabi', 'type' => 'syllabus', 'size' => 50, 'body' => [ '_source' => ['syllabusId'], 'query' => [ 'bool' => [ 'must' => [ ['match' => 
 ['rosterId' => $roster->getId()]], ['match' => 
 ['attachment.content' => $searchQuery]] ] ] ] ], 'client' => [ 'timeout' => 5, 'connect_timeout' => 5 ] ] $esResults = $this->getElasticsearchClient()
 ->search($params);