[mas 500] various topics

15
MAS.500 - Software Module - Rahul Bhargava Various Topics 2014.11.27

Upload: rahulbot

Post on 13-May-2015

325 views

Category:

Education


3 download

TRANSCRIPT

Page 1: [Mas 500] Various Topics

MAS.500 - Software Module - Rahul Bhargava

Various Topics 2014.11.27

Page 2: [Mas 500] Various Topics

Topics

❖ Homework Share-back

❖ Servers / CLI

❖ NecSys

❖ Security

❖ Client/Server Products

Page 3: [Mas 500] Various Topics

Servers / CLI

Page 4: [Mas 500] Various Topics

Servers

❖ Virtual Server vs. On-Demand Cloud Server vs. Physical Server

❖ Lots of unix options

❖ APT: Debian, Ubuntu

❖ RPM: Redhat, CentOS, Fedora

❖ Decide based on ability to get help

❖ most folks I know in the lab use Ubuntu

❖ lots use S3 for flexible hosting

Page 5: [Mas 500] Various Topics

CLI

❖ Commands:

❖ each command does one thing

❖ commands can be chained together by piping them

❖ Permissions

❖ users can be in one or more groups

❖ permissions can be set for owner, group, other

❖ read, write, and execute are controlled independently

❖ super-user can do anything, let users pretend to be root via “sudo”

❖ Cron is useful to schedule things

❖ live tour of Ubuntu

Page 6: [Mas 500] Various Topics

Security

Page 7: [Mas 500] Various Topics

Security

❖ key-based login demo

❖ never commit passwords in code

❖ database, api, etc.

❖ config via template file

❖ security audit - have someone outside the team do it

❖ ssl certificates for secure communications with clients

Page 8: [Mas 500] Various Topics

Client/Server Products

Page 9: [Mas 500] Various Topics

An Example To Think With

Realtime Signage

Page 10: [Mas 500] Various Topics

Servers: Client/Server

Your AppClient

The Old WayOpen a custom socket and send data

back and forth in some format

The New Waya) ASync: Client make HTTP request,

your app returns JSON.b) Sync: Client opens a persistent WebSocket, data is sent back and

forth.

Data

Page 11: [Mas 500] Various Topics

Servers: Development Architecture

Server(Windows, Mac, Linux, etc.)

Your App

Hardware(your computer, VM, etc.)

Zero-configuration, opens its own port

and handles requests

Built-in Framework Server(Flask, Rails, Django etc)

Page 12: [Mas 500] Various Topics

Servers: Production Architecture

Server(Ubuntu)

Web Server(Apache2)

Gateway(mod_php, fastCGI, WSGI,

passenger)

Your App

Hardware(VM)

Server-specific application settings

Configuration files

Page 13: [Mas 500] Various Topics

Deployment: Ideas

❖ Release Early, Release Often❖ Extreme Programming is one methodology

❖ Managing like a Product❖ Have development, staging & production

copies❖ Follow a release process

❖ Automate so you don’t mess it up

Page 14: [Mas 500] Various Topics

Deployment: Managing a Product

❖ Playground to develop code❖ Commit when code works

Local Machine

Development System

Staging System

Production System

❖ Resembles the production system❖ Updated frequently with latest code as an

integration point between multiple developers

❖ Duplicate of the production system❖ When ready to release: freeze/tag code,

push to staging

❖ Once verified on staging system, push to production and test again

Page 15: [Mas 500] Various Topics

Homework

❖ bit.ly/mas500f14