Team –
Durgesh, Rohit, Pankaj
10th Feb 2017
WEEKLY
TECH SESSION – 1
Agenda
Web app architecture
Device app architecture?
What is Rest API?
How mobile applications interact with web?
List of storage in web/device
What and How is Heroku.com?
Configuration of Heroku on Ubuntu.
Create a web app with rest api and deploy it to Heroku
Create a device app and use of rest api provided by web
Web app architecture
When deciding which server architecture to use for your
environment, there are many factors to consider, such as
performance, scalability, availability, reliability, cost, and ease of
management.
Here is a list of commonly used server setups, with a short
description of each, including pros and cons. Keep in mind that
all of the concepts covered here can be used in various
combinations with one another, and that every environment
has different requirements, so there is no single, correct
configuration.
Web app architecture
1. Everything On One Server The entire environment
resides on a single server. For
a typical web application,
that would include the web
server, application server, and
database server. A common
variation of this setup is a
LAMP stack, which stands for
Linux, Apache, MySQL, and
PHP, on a single server.
Web app architecture
3. Load Balancer (Reverse Proxy) / 3 Tier
Load balancers can be added to a server environment to improve
performance and reliability by distributing the workload across multiple
servers. If one of the servers that is load balanced fails, the other servers will
handle the incoming traffic until the failed server becomes healthy again. It
can also be used to serve multiple applications through the same domain and
port, by using a layer 7 (application layer) reverse proxy.
Web app architecture
Web Servers
o Nginx
o Apache HTTP
o IIS
o Lighttpd
o Apache Tomcat
App Servers
o Phusion Passenger
o WebSphere
o GlassFish
o JBoss
Database Servers
o MySQL
o MS-SQL
o PostgreSQL
o MongoDB
o OracleDB
o SQLite
How web request and
response works
Client (PC / Mobile)
Server Computer
Internet
HTTP Request
(http://example.com/sign-in)
HTTP Response
(http://example.com/sign-in)
HTML Web Page
Main web communications protocol:
HTTP – Hypertext Transfer Protocol
Clicking on a hyperlink or typing a URL
Into a browser starts a request-response cycle
Device app architecture
DB
What is REST API?
• REST stands for Representational State Transfer. (It is
sometimes spelled "ReST".)
• A REST API defines a set of functions which developers can
perform requests and receive responses via HTTP protocol
such as GET and POST.
HEROKU?
http://www.heroku.com
• Node
• Ruby
• Java
• PHP
• Python
• Go
• Scala
• Clojure
Heroku is a cloud platform as a service (PaaS) that lets
companies build, deliver, monitor, and scale apps.
INSTALL HEROKU TOOLBELT
On
UBUNTU
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
https://devcenter.heroku.com/articles/heroku-cli
Configure Heroku Toolbelt with your Account
> heroku login
Configure heroku repo url with your rails project
> git remote add heroku <heroku-repo-url>
Deploy your code
> git add .; git commit –m <message>; git push heroku master;
Configure heroku repo url with your rails project
> git remote add heroku <heroku-repo-url>
Migrate database
> heroku run rake db:migrate
Open heroku app
> heroku open
Weekly Tech Session

Weekly Tech Session

  • 1.
    Team – Durgesh, Rohit,Pankaj 10th Feb 2017 WEEKLY TECH SESSION – 1
  • 2.
    Agenda Web app architecture Deviceapp architecture? What is Rest API? How mobile applications interact with web? List of storage in web/device What and How is Heroku.com? Configuration of Heroku on Ubuntu. Create a web app with rest api and deploy it to Heroku Create a device app and use of rest api provided by web
  • 3.
    Web app architecture Whendeciding which server architecture to use for your environment, there are many factors to consider, such as performance, scalability, availability, reliability, cost, and ease of management. Here is a list of commonly used server setups, with a short description of each, including pros and cons. Keep in mind that all of the concepts covered here can be used in various combinations with one another, and that every environment has different requirements, so there is no single, correct configuration.
  • 4.
    Web app architecture 1.Everything On One Server The entire environment resides on a single server. For a typical web application, that would include the web server, application server, and database server. A common variation of this setup is a LAMP stack, which stands for Linux, Apache, MySQL, and PHP, on a single server.
  • 5.
    Web app architecture 3.Load Balancer (Reverse Proxy) / 3 Tier Load balancers can be added to a server environment to improve performance and reliability by distributing the workload across multiple servers. If one of the servers that is load balanced fails, the other servers will handle the incoming traffic until the failed server becomes healthy again. It can also be used to serve multiple applications through the same domain and port, by using a layer 7 (application layer) reverse proxy.
  • 6.
    Web app architecture WebServers o Nginx o Apache HTTP o IIS o Lighttpd o Apache Tomcat App Servers o Phusion Passenger o WebSphere o GlassFish o JBoss Database Servers o MySQL o MS-SQL o PostgreSQL o MongoDB o OracleDB o SQLite
  • 7.
    How web requestand response works Client (PC / Mobile) Server Computer Internet HTTP Request (http://example.com/sign-in) HTTP Response (http://example.com/sign-in) HTML Web Page Main web communications protocol: HTTP – Hypertext Transfer Protocol Clicking on a hyperlink or typing a URL Into a browser starts a request-response cycle
  • 8.
  • 9.
    What is RESTAPI? • REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) • A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST.
  • 10.
  • 11.
    http://www.heroku.com • Node • Ruby •Java • PHP • Python • Go • Scala • Clojure Heroku is a cloud platform as a service (PaaS) that lets companies build, deliver, monitor, and scale apps.
  • 13.
    INSTALL HEROKU TOOLBELT On UBUNTU wget-O- https://toolbelt.heroku.com/install-ubuntu.sh | sh https://devcenter.heroku.com/articles/heroku-cli
  • 14.
    Configure Heroku Toolbeltwith your Account > heroku login Configure heroku repo url with your rails project > git remote add heroku <heroku-repo-url>
  • 15.
    Deploy your code >git add .; git commit –m <message>; git push heroku master; Configure heroku repo url with your rails project > git remote add heroku <heroku-repo-url>
  • 16.
    Migrate database > herokurun rake db:migrate Open heroku app > heroku open