Real Life Web Development. Joseph Paul Cohen

Similar documents
Real World Web Scalability. Ask Bjørn Hansen Develooper LLC

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

Etanova Enterprise Solutions

SEEM4540 Open Systems for E-Commerce Lecture 04 Servers Setup and Content Management Systems

All India Council For Research & Training

Internet Content Distribution

Let's Play... Try to name the databases described on the following slides...

Deployment. Chris Wilson, AfNOG / 26

CMSC 332 Computer Networking Web and FTP

Scaling DreamFactory

Persistence & State. SWE 432, Fall 2016 Design and Implementation of Software for the Web

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Large-Scale Web Applications

Static Webpage Development

MySQL. The Right Database for GIS Sometimes

Application Level Protocols

Mysql Using Php Script

Ampliación de Bases de Datos

How to pimp high volume PHP websites. 27. September 2008, PHP conference Barcelona. By Jens Bierkandt

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

Oh yes, wpcache comes with a dashboard wpcache is not Plugin!

The COS 333 Project. Robert M. Dondero, Ph.D. Princeton University

Advanced Joomla! Dan Rahmel. Apress*

ORACLE APPLICATION EXPRESS, ORACLE REST DATA SERVICES, & WEBLOGIC 12C AUTHOR: BRAD GIBSON SENIOR SOLUTIONS ARCHITECT ADVIZEX

Phpmyadmin Error In Processing Request Error Code 200

s642 web security computer security adam everspaugh

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

Perceptive DataTransfer

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24

McMaster Service-Based ehealth Integration Environment (MACSeie) Installation Guide July 24, 2009

MP 1: HTTP Client + Server Due: Friday, Feb 9th, 11:59pm

Bitnami Ruby for Huawei Enterprise Cloud

CSCI 1320 Creating Modern Web Applications. Content Management Systems

Web, HTTP and Web Caching

VMware vfabric Data Director Installation Guide

Fusion Registry 9 SDMX Data and Metadata Management System

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

HTTP Protocol and Server-Side Basics

Web Engineering (CC 552)

IBM SecureWay On-Demand Server Version 2.0

Lecture 9a: Sessions and Cookies

Developing Web Sites with Free Software

Simplicity and minimalism in software development

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Drupal

SecureAware Technical Whitepaper

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Caching Personalized and Database-related Dynamic Web Pages

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Sentences Installation Guide. Sentences Version 4.0

Mysql Server 4.1 Manually Windows 7 Start Service

FUSION REGISTRY COMMUNITY EDITION SETUP GUIDE VERSION 9. Setup Guide. This guide explains how to install and configure the Fusion Registry.

AN ISO 9001:2008 CERTIFIED COMPANY ADVANCED. Java TRAINING.

Webspeed. I am back. Enhanced WebSpeed

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

Reading How the Web Works

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Servers & Developers. Julian Nadeau Production Engineer

PHP. MIT 6.470, IAP 2010 Yafim Landa

Apache Manual Install Ubuntu Php Mysql. Phpmyadmin No >>>CLICK HERE<<<

How to Install (then Test) the NetBeans Bundle

"Stupid Easy" Scaling Tweaks and Settings. AKA Scaling for the Lazy

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Http Error Code 403 Forbidden Dreamweaver Mysql

Developing Microsoft Azure Solutions (70-532) Syllabus

App Service Overview. Rand Pagels Azure Technical Specialist - Application Development US Great Lakes Region

ICS 351: Today's plan. IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies

Cloud Computing Platform as a Service

(System) Integrity attacks System Abuse, Malicious File upload, SQL Injection

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

Introduction to Ethical Hacking

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

Computer Networks. Wenzhong Li. Nanjing University

Unraveling the Mysteries of J2EE Web Application Communications

Web Architecture and Technologies

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Developing Microsoft Azure Solutions (70-532) Syllabus

CIS 612 Advanced Topics in Database Big Data Project Lawrence Ni, Priya Patil, James Tench

This chapter introduces you to the multisite feature that s built into the

Blog site (cont.) theme, 202 view creations, 205 Browser tools, 196 Buytaert, Dries, 185

TomcatCon London 2017 Clustering Mark Thomas

ReST 2000 Roy Fielding W3C

DIGIT.B4 Big Data PoC

Web API Lab. The next two deliverables you shall write yourself.

Working with Databases

Niagara 3.7 New Feature Review

What is Drupal? What is this Drew-Paul thing you do?

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

RESTful Services. Distributed Enabling Platform

3 Installation from sources

Sucuri Webinar Transcription

Intellicus Enterprise Reporting and BI Platform

Perceptive DataTransfer

Perceptive Nolij Web. Technical Specifications. Version: 6.8.x

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Use Case: Scalable applications

sqlite wordpress 06C6817F2E58AF4319AB84EE Sqlite Wordpress 1 / 6

Networks, WWW, HTTP. Web Technologies I. Zsolt Tóth. University of Miskolc. Zsolt Tóth (University of Miskolc) Networks, WWW, HTTP / 35

Executive Summary. Performance Report for: The web should be fast. Top 1 Priority Issues. How does this affect me?

I hate money. Release 1.0

Transcription:

Real Life Web Development Joseph Paul Cohen joecohen@cs.umb.edu

Index 201 - The code 404 - How to run it? 500 - Your code is broken? 200 - Someone broke into your server? 400 - How are people using your site? 502 - You need to scale?

What is a webserver? browser->dns->ip->port80->listening socket-> <-socket replies with text

GET / HTTP/1.1 Host: defcon.org HTTP/1.1 200 OK Server: lighttpd Cache-Control: public, max-age=600 Content-Language: en Connection: keep-alive Date: Mon, 15 Jul 2013 02:53:06 GMT Last-Modified: Mon, 15 Jul 2013 01:36:50 GMT Content-Type: text/html <html>.

201 - The code

201 - The code Write it yourself? Why? Frameworks vs Solutions

PHP Framework +HTML Generation System +Session Management Many Libraries Image, File, pdf, geo, crypto, database,... http://classes.engineering.wustl.edu/cse330/images/f/fc/php-apache_flowchart.png

Wordpress Blog Solution +Plugins can modify everything +Themes modify public view +Multiple privilege levels +Console to manage content +Tons of plugins (security risks) +Automatic security updates

Themes make all the difference

Java Servlet +Web Framework +HTTP Verb Router +Listens to socket directly +Built-In Session System +JSP (~PHP) or Stream Interface +Many containers (Tomcat,...) +Can use Java Libraries

Java Servlet +Can have service threads running at all times +Thread and session can both store data +Single deployable war file contains entire site +Containers can seamlessly scale website +Can statically analyse code +Good for large projects

Django +Model / View / Template Framework +Model: +Database Abstraction +Entity Relational Mapping +Lazy Queries +View: +Application Code +Template: +Templating Engine +Generic CRUD Templates

Django +Administration Interface +Schema Migrations (South) +Middleware

Django +Lots of Out Of The Box Utility +May Be Overwhelming +Easy CRUD +Many Pieces +Database Agnostic +May Encounter Edge Cases +Entity-Relational Mapping +Less Control / Simplified +Many Packages e.g. South +Program In Python +Develop Big Websites Fast - Henry Lo Django Wizard

PHP Slim Web Framework +HTTP verb & path router +Parses path as variables +Perfect for AJAX interfaces +Error handling and debugging +Database abstraction

Database Tools Most frameworks/solutions support only a few databases Complication vs Speed SQLite > (Postgres MySQL)

SQLite Operates on flat file in same thread Backup is simple (just copy a file) Data can be in same folder as code Supports all standard SQL Command line debugging tool No indexing

MySQL MySQL and MariaDB are daemons Built in authentication. Listens on socket or port. Provides indexing, fulltext search, and clustering Deployed everywhere, many Linux packages. Easy to connect to from any language

PostgreSQL Similar to MySQL -MySQL is an open-source PRODUCT. -Postgres is an open-source PROJECT.

When should you write it yourself?

When should you write it yourself? Nothing else solves the problem Can you change the problem? Existing solutions are bad You want to learn the problems faced

404 - How to run it? Google needed this 200Mhz Sun Microsystems Ultra II 300 MHz dual Pentium II F50 IBM RS/6000 ~300GB Storage ~2GB or RAM What do you need? Only buy that!

404 - How to run it? Lower costs means you can run it longer Do you really want to configure your httpd? Do you really want to manage your server?

You Manage Can install physical server Can have any internet service Managed Can share IP and server Maybe no root access Root access Server operation is assumed You must replace parts Backups done automatically You can run any code You have to set up webserver Server operator on call

500 - Your code is broken?

500 - Your code is broken? Is it your fault? (+1 Managed Hosting) Reduce what you can break! Everything is more complicated than you think! What did you change? (+1 Source Control) Did your code change? Did something happen to your database?

Managed hosting gives your own IT group! Know what they can fix Give them the important info What server? What should it do? What should it not do?

GIT / SVN Storing your website in GIT or SVN allows you to see the changes you made before the site broke.

Commit history helps you Leaving yourself notes helps you figure out how you broke the site $svn log $git log

Database Tools +Command line DB is hard! +phpmyadmin installs on your server +MySQL Workbench and pgadmin are desktop clients

phpmyadmin vs MySQL Workbench phpmyadmin only needs to be set up once and allows administration from anywhere but is slow Desktop clients allow you to connect to multiple servers and run faster but need to be installed. Most have ssh tunneling built in.

200 - Someone broke into your server? How can you tell? + File changes/ + Strange connections + Someone told you How do you recover? + Worst case erase everything

400 - How are people using your site? What data do you have? +Access Logs from httpd +HTTP Header info +Requested pages +Track users with cookies and javascript +Track returning users +Where they are active on page +Track mouse movements and which links are clicked

400 - How are people using your site? Analyze Logs Offline +Webalizer +Grep Javascript based online analysis +Google Analytics (Pay by giving user data) +Pwick (You can run yourself)

+Web logs are a very granular and great for debugging +You can see strange requests very easy

+Error logs provide insight into how your code is working +Using tail -f to follow error logs is useful for development

Google Analytics Add Javascript to all your pages You manage less +1 Google can track your users -1

Where are your visitors from?

Where have people been traveling on your site?

Does the browser make a difference?

Does the browser make a difference?

Where are the engaged visitors from? Focus on the referral URL

502 - You need to scale? What is not scaling? Bandwidth/CPU/Storage

Caching! +Set up your server to cache +Apache mod_cache or mod_file_cache +ngnix +Set up your code to cache +Use HashSets +memcached

Apache mod_cache, mod_file_cache mod_cache +content that has not expired will be cached +Adjust expire time global or per file mod_file_cache +some files never have their handles closed

nginx Answers requests instead of Apache +Forwards to apache if dynamic +Can handle 10k requests in 10mb +Setup filter for what is dynamic (.php) +Can forward requests to many servers

Expand to scalable network +Use dynamic DNS resolution to distribute +Use Content Delivery Network (CDN) +Services provided by CloudFlare/Akami

Web Server l htm. e ag m/p r.co rve //se : http Web Browser http:/ /cdn. serve r.com /imag e.png CDN Servers Content Delivery Network (CDN) +Link static content to CDN network (which uses dynamic DNS)

Caching and dynamic DNS +Network of Edge servers +Give up DNS control to service +Edge servers receive all requests +Forward if content is dynamic +Set list of requests to forward +Transparent to developer http://www.upenn. edu/computing/web/centralhost/caching/akamai.png

</talk>