weekly tech session
TRANSCRIPT
![Page 1: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/1.jpg)
Team – Durgesh, Rohit,
Pankaj10th Feb 2017
WEEKLY TECH SESSION – 1
![Page 2: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/2.jpg)
AgendaWeb app architectureDevice app architecture?What is Rest API?How mobile applications interact with web?List of storage in web/deviceWhat and How is Heroku.com? Configuration of Heroku on Ubuntu.Create a web app with rest api and deploy it to HerokuCreate a device app and use of rest api provided by web
![Page 3: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/3.jpg)
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.
![Page 4: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/4.jpg)
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.
![Page 5: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/5.jpg)
Web app architecture3. 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.
![Page 6: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/6.jpg)
Web app architecture
Web Servers
o Nginxo Apache HTTPo IISo Lighttpdo Apache Tomcat
App Servers
o Phusion Passengero WebSphereo GlassFisho JBoss
Database Servers
o MySQLo MS-SQLo PostgreSQLo MongoDBo OracleDBo SQLite
![Page 7: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/7.jpg)
How web request and response works
Client (PC / Mobile)
Server ComputerInternet
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 URLInto a browser starts a request-response cycle
![Page 8: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/8.jpg)
Device app architecture
DB
![Page 9: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/9.jpg)
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.
![Page 10: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/10.jpg)
HEROKU?
![Page 11: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/11.jpg)
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.
![Page 12: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/12.jpg)
![Page 13: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/13.jpg)
INSTALL HEROKU TOOLBELTOn
UBUNTU
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
https://devcenter.heroku.com/articles/heroku-cli
![Page 14: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/14.jpg)
Configure Heroku Toolbelt with your Account
> heroku login
Configure heroku repo url with your rails project
> git remote add heroku <heroku-repo-url>
![Page 15: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/15.jpg)
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>
![Page 16: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/16.jpg)
Migrate database
> heroku run rake db:migrate
Open heroku app
> heroku open
![Page 17: Weekly Tech Session](https://reader035.vdocuments.mx/reader035/viewer/2022081605/58cf37031a28ab00168b6677/html5/thumbnails/17.jpg)
Thank you