LAMP Flashcards
What does the server do?
Accept a request from the client and respond to it
What does the client do?
Web browser and the computer, send requests and
receive returned data
What are between protocols and devices?
Switches, routers, proxies, gateways, TCP/IP
What do Switches, routers, proxies, gateways, TCP/IP do between protocols and devices?
ensure that the requests and responses are correctly
transferred
What does TCP stand for?
Transmission Control Protocol
What does IP stand for?
Internet Protocol
What does TCP do?
error detection, flow control, and
overall reliability
• ensures the data gets delivered
to the server without getting
lost or duplicated
• resend information that might
get lost in transit
What does an internet protocol do?
Deliver data through devices
from one network to the next
and all around the world
– IP address
What is a ‘data link layer’?
travel over a piece of wire, a
fiber optic cable, a wireless
network, or a satellite link.
What does URL stand for and what do they do?
Uniform Resource Locators
– a type of uniform resource indicators (URIs)
– Identify the resources
What does HTTP stand for and what does it do?
HTTP: Hyper Text Transfer Protocol
– used to transfer Hyper Text representation of a resource
from the server to client
– helps clients request/receive information from servers
What does HTML stand for and what is it?
HTML: Hyper Text Markup Language
– The programming language
– helps render the information appropriately on the client
What are the seven steps in requesting from a static website?
Web pages are delivered to the user exactly as stored
1. Enter http://server.com into browser
2. Browser looks up the IP address for server.com
3. Browser issues a request for the home page
4. Request crosses the internet and arrives at the web
server
5. Web server looks for the web pages on its disk
6. Web page is retrieved by the server and returned to the
browser
7. Browser displays the web page
Why use a dynamic website instead of static?
Provide a “live”, “dynamic”, or “interactive” user
experience.
Content (text, images, form fields, etc.) can change
• In response to different contexts or conditions
What are the six main components of a dynamic website?
– PHP
• PHP handles all the main work on the web server
– MySQL
• MySQL manages all the data
– JavaScript
• JavaScript can also talk with your PHP code on the web server
whenever it needs to update something
– CSS
• the combination of CSS and JavaScript looks after web page
presentation
– HTML 5
• A new standard HTML
– Webserver
What are the three strategies for dynamic web content?
Client side scripting
Server side scripting
Hybrid
Describe client side scripting
Processes the web page using HTML scripting in the
browser.
It uses:
DOM
JavaScript
CSS
Describe server side scripting
Web page construction is controlled by an application
server
– Generate content, parameters, client-side code.
Dynamically inserting the contents of one
html file—or the output of a system call—into
another one).
– PHP’s simplicity and built-in links to the MySQL
database program
– Perl (an alternative to the PHP language)
Describe a hybrid type of scripting
Combine both client and server side technologies
Single page for variant web content
– combination of both client-side scripting and server-side requests.
• Ajax engine sits on the browser requesting,
– send requests for parts of its DOM items to the server for data
– The server returns the data which is then processed by a client side
script (JavaScript).
– web content rendered on the same page
• Benefit
– client does not request the entire webpage to be regenerated by the
server
• only the content that will change is transmitted.
• reduce server load time
– send requests to web servers in the background
• without the web user being aware that this is going on.
– Google Maps uses Ajax techniques.
What does LAMP stand for?
Linux
APACHE
MySQL
PHP
Describe apache Http server
The most popular web server on the public
Internet
– Serve 52.27% of all active websites, estimated In
June 2014
– Followed by nginx with 14.36%
• Apache is open-source software
– developed and maintained by an open community
of developers
• Support a wide variety of features
Describe mySQL
MySQL is a multithreaded, multi-user, SQL
database management system (DBMS)
– Acquired by Oracle Corporation in 2010.
• Alternatives:
– RDBMS: MariaDB or PostgreSQL
– NoSQL DB: MongoDB
• JSON-like documents with dynamic schemas
• Making the integration of data in certain types of
applications easier and faster
Describe PHP
A server-side scripting language
– designed for web development
• generate the resulting web page
– also used as a general-purpose programming language
• PHP code/commands can be either
– embedded directly into an HTML source document, or
– Saved in an external/ file rather than calling
– interpreted by a web server via a PHP processor
module
• It has command-line interface capability
• can be used in standalone graphical applications
Describe high availability
Requirement for websites: High-availability
– Multiple web and database servers
• serve large numbers of requests
• provide services that demand high uptime
What is load balancing?
Placing a load balancer in front of them • Using Linux Virtual Server (LVS) – Logical aggregation of resources from multiple servers – Distribution of the workload across multiple servers
What is data redundancy?
– MySQL provides internal replication mechanisms
• master/slave relationship between the original
database (master) and its copies (slaves)
– Without interrupting the users of services
• Some down, others are still available
– Without data loss when hardware failures
– Almost linear improvements in data access
• when database read operations much higher than the
number of write/update operations