apereo oae - architectural overview

47
APEREO OAE Architectural Overview, Miami 2014

Upload: nicolaas-matthijs

Post on 15-Jan-2015

344 views

Category:

Education


2 download

DESCRIPTION

This session provides an overview of the Apereo OAE architecture and the major additions in the past 12 months. The Apereo Open Academic Environment is built from the ground up as a multi-tenant platform designed to host many organizations on a shared infrastructure in the cloud. This session introduces the following architectural components: - Node.js - Apache Cassandra - ElasticSearch - RabbitMQ - Redis - Nginx and the following concepts: - Push notifications - Email aggregation - Performance testing - Production environment - Development to deployment - Responsive UI

TRANSCRIPT

Page 1: Apereo OAE - Architectural overview

APEREO OAEArchitectural Overview, Miami 2014

Page 2: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 3: Apereo OAE - Architectural overview

https://oae.oae-qa0.oaeproject.org

Page 4: Apereo OAE - Architectural overview

PROJECT GOALS

• Multi-tenant platform

• Cloud-ready

• SaaS

• Used at large scale

• Cross-institutional

Page 5: Apereo OAE - Architectural overview

INTEGRATION

• Integrate OAE with other systems

• Integrate other systems with OAE

Page 6: Apereo OAE - Architectural overview

MULTI-TENANCY• Support multiple institutions on same installation

• Easily created, maintained and configured

• Each institution has its own URL, branding, skinning and users

• Share infrastructure

• Institutions can share and collaborate with other institutions

Page 7: Apereo OAE - Architectural overview
Page 8: Apereo OAE - Architectural overview
Page 9: Apereo OAE - Architectural overview
Page 10: Apereo OAE - Architectural overview
Page 11: Apereo OAE - Architectural overview
Page 12: Apereo OAE - Architectural overview
Page 13: Apereo OAE - Architectural overview
Page 14: Apereo OAE - Architectural overview
Page 15: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 16: Apereo OAE - Architectural overview

OAE ARCHITECTUREThe Apereo OAE project is made up of 2 distinct source code platforms:

• “Hilary”

• Server-side RESTful web platform that exposes the OAE services

• Written entirely using server-side JavaScript in Node.js

• “3akai-ux”

• A client-side / browser platform that provides the HTML, JavaScript and CSS that make up the UI of the application

Page 17: Apereo OAE - Architectural overview

OAE ARCHITECTURE

Page 18: Apereo OAE - Architectural overview

APPLICATION SERVERS• Written in server-side JavaScript, run in Node.js

• Light-Weight

• Single-Threaded

• Event-Driven

• Non-Blocking

• Uses callbacks/promises and an event queue to stash work to be done after I/O or other heavy processes complete

• App servers can be configured into functional specialization:

• User Request Processor

• Activity Processor

• Search Indexer

• Preview Processor

Page 19: Apereo OAE - Architectural overview

APACHE CASSANDRA• Authoritative data source

• Provides high-availability and fault-tolerance without trading away performance

• Regarding CAP theorem, Cassandra favours Availability and Partition Tolerance over Consistency, however consistency is tunable on the connection-level (we always use “quorum”)

• Uses a ring topology to shard data across nodes, with configurable replication levels

• Used by: Netflix, eBay, Twitter

Page 20: Apereo OAE - Architectural overview

ELASTICSEARCH• Lucene-backed search platform

• Built for incremental scaling and high-availability

• Exposes HTTP RESTful APIs for indexing and querying documents

• RESTful query interface uses JSON-based Query DSL

• Powers all of Hilary search functions (Library Search, Members / Memberships Search)

• Used by: GitHub, FourSquare, StackOverflow, WordPress

Page 21: Apereo OAE - Architectural overview

RABBITMQ• Light-weight message queue platform written in

Erlang

• Used for distributing tasks to specialized application server instances

• Supports active-active queue mirroring for high availability

• Used by: Joyent

Page 22: Apereo OAE - Architectural overview

REDIS• REmote DIctionary Server

• Fills a variety of functionality in OAE:

• Broadcast messaging (could move to RabbitMQ)

• Locking

• Caching of basic user profiles

• Holds volatile activity aggregation data

• Comes with no managed clustering solution (yet), but has slave replication for active fail-over

• Some clients manage master-slave switching, and distributed reads for you

• Used by: Twitter, Instagram, StackOverflow, Flickr

Page 23: Apereo OAE - Architectural overview

ETHERPAD• Open Source collaborative editing application written

in Node.js

• Originally developed by Google and Mozilla

• Licensed under Apache License v2

• Powers collaborative document editing in OAE

• Collaborative documents sharded by ID to dedicated Etherpad instances

Page 24: Apereo OAE - Architectural overview

NGINX

• HTTP and reverse-proxy server

• Used to distribute load to application servers, etherpad servers and stream file downloads

• Useful rate-limiting features based on source IP

• Proxy web socket connections to Hilary and Etherpad

• Used by: Netflix, WordPress.com

Page 25: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 26: Apereo OAE - Architectural overview

PUSH NOTIFICATIONS• Built on top of activity routing infrastructure

• Subscribe to an activity feed using a persistent websocket connection

• Routed activities fed back into RabbitMQ

• Hilary servers subscribe and pass on to persistent HTTP connections

Page 27: Apereo OAE - Architectural overview

EMAIL AGGREGATION• Built on top of activity aggregation infrastructure

• Schedules email to be sent for a user based on email preference and timezone (“immediate”, daily, weekly)

• When delivered, collects activity in an aggregated “email” activity stream

• Builds HTML email based on activities available

Page 28: Apereo OAE - Architectural overview

NEW INFRASTRUCTURE

Page 29: Apereo OAE - Architectural overview
Page 30: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 31: Apereo OAE - Architectural overview

PERFORMANCE TESTING

Page 32: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 33: Apereo OAE - Architectural overview
Page 34: Apereo OAE - Architectural overview
Page 35: Apereo OAE - Architectural overview

PRODUCTION ENVIRONMENT• 3 x Cassandra

• 2 x ElasticSearch

• 4 x Application (Hilary)

• 3 x Activity (Hilary)

• 3 x Preview Processor (Hilary)

• 3 x Etherpad

• 2 x Application Cache (Redis)

• 2 x Activity Cache (Redis)

• 1 x HAProxy

• 2 x RabbitMQ

• 2 x Nginx

• 1 x Monitoring

• 1 x Syslog

• 1 x Bastion

• 1 x Puppet Master

Page 36: Apereo OAE - Architectural overview

PRODUCTION ENVIRONMENTVM Specs (RAM / # CPUs)

• Cassandra (8GB / 8)

• ElasticSearch (4GB / 2)

• App / Activity (512MB / 1)

• Preview Processor (1GB / 2)

• Etherpad (1GB / 1)

• Redis (512MB / 1)

• HAProxy (512MB / 1)

• RabbitMQ (512MB / 1)

• Nginx (1GB / 2)

• Monitoring (4GB / 2)

• Syslog (512MB / 1)

• Bastion (512MB / 1)

• Puppet Master (4GB / 2)

Page 37: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. Responsive Design

Page 38: Apereo OAE - Architectural overview

FROM DEVELOPMENT TO PRODUCTION

• Github

• Pull-Request, review, iterate, merge

• Travis-CI

• Unit tests, build release artifact, upload to Amazon S3

• Code coverage analysis

• On every commit

Page 39: Apereo OAE - Architectural overview

FROM DEVELOPMENT TO PRODUCTION

• 2 manual steps

• Update version in puppet manifests

• Roll new version out with single Fabric command

Page 40: Apereo OAE - Architectural overview

TOPICS 1. OAE Project

2. Hilary System Architecture

3. Push Notifications

4. Email Aggregation

5. Performance Testing

6. OAE Production Environment

7. Development to Deployment

8. UI Architecture

Page 41: Apereo OAE - Architectural overview

UI ARCHITECTURE

Page 42: Apereo OAE - Architectural overview

UI ARCHITECTURE

• In essence

• HTML • CSS • JavaScript

• Talks to Hilary via REST APIs

Page 43: Apereo OAE - Architectural overview
Page 44: Apereo OAE - Architectural overview

RESPONSIVE UI

• Upgraded to Bootstrap 3

• Fully responsive CSS framework

• New grid system

• A lot of work

Page 45: Apereo OAE - Architectural overview

RESPONSIVE UI

Page 46: Apereo OAE - Architectural overview

Get in touch:

E-mail list: [email protected]

Website: http://www.oaeproject.org/

Demo server : http://oae.oae-qa0.oaeproject.org/

Page 47: Apereo OAE - Architectural overview