SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Internet! & HTTP!
      잃어버린 패킷을 찾아서…


                 이동욱
               2009.12.05

          dugan.lee@gmail.com
        http://nephilim.tistory.com
1
HTML(5?)
                   CSS
             Javascript/Ajax

    HTTP    Javascript Library
                  Comet
                Flash/Flex
              RoR, Django
            PHP, Servlet/JSP,
                  ASP…

     1990        2009




2                        그림 출처 - http://en.wikipedia.org
1




            1-1                       1-2




    1-1-1         1-1-2       1-2-1         1-2-2




3
HTTP



                         …




                               javascript   기타 기술들…
    WWW   Server-Side                         (아악!)
                                  Ajax
            Scripts
                                Comet…




4
HTTP Request




                   1
                   GET / HTTP/1.1
                   Host: 127.0.0.1:8080
                   User-Agent: Mozilla/5.0 …
                   Accept: text/html,application/xml;…
                   Accept-Language: ko-kr,ko;q=0.8,en-us
                   Accept-Encoding: gzip,deflate
                   Accept-Charset: EUC-KR,utf-8;q=0.7,*;q=0.7
                   Keep-Alive: 300
                   Connection: keep-alive




5
HTTP Response




                    2
                        HTTP/1.1 200 OK
                        Server: Apache-Coyote/1.1
                        Accept-Ranges: bytes
                        ETag: W/"331-1259569714921"
                        Last-Modified: Mon, 30 Nov 2009 08:28:34 GMT
                        Content-Type: text/html
                        Content-Length: 331
                        Date: Mon, 30 Nov 2009 08:32:30 GMT

                        <html>
                        <head>
                        <title>IBM PetchaKucha</title>
                        </head>
                        <body>
                        Hello Web World!
                        <hr/>
                        <font color="red" size="10"> 안녕하세요</font>
                        </body>
                        </html>
6
많은 Resource들




          <html>
          <body>
              <img   src="images/h.png"   />
              <img   src="images/t.png"   />
              <img   src="images/t.png"   />
              <img   src="images/p.png"   />
          </body>
          </html>




                        (ex) jQuery UI         http://jqueryui.com/themeroller/images/?new=2e83ff&w=256&h=240&f=pn
7                                              g&fltr[]=rcd|256&fltr[]=mask|icons/icons.png
1
    Resource 일부       GET /wicket/1.4.3/apache-wicket-1.4.3.zip HTTP/1.1
                      Host: apache.mirror.cdnetworks.com
                      User-Agent: Mozilla/5.0
                      Accept: text/html,application/xhtml+xml,application/xml
                      Accept-Language: ko-kr,ko;q=0.8,en-us;q=0.5,en;q=0.3
                      Accept-Encoding: gzip,deflate
                      Accept-Charset: EUC-KR,utf-8
                      Keep-Alive: 300
                      Connection: keep-alive
                      Referer: http://apache.mirror.cdnetworks.com/wicket/1.4.3/
                      Range: bytes=21341986-
                      If-Match: "d20802f-1d98c87-476447ce3cc00"
                      If-Unmodified-Since: Mon, 19 Oct 2009 07:13:52 GMT


                  2
                      HTTP/1.1 206 Partial Content
                      Date: Tue, 01 Dec 2009 15:38:24 GMT
                      Server: Apache
                      Last-Modified: Mon, 19 Oct 2009 07:13:52 GMT
                      ETag: "d20802f-1d98c87-476447ce3cc00"
                      Accept-Ranges: bytes
                      Content-Length: 9692517
                      Content-Range: bytes 21341986-31034502/31034503
                      Keep-Alive: timeout=15, max=1000
                      Connection: Keep-Alive
                      Content-Type: application/zip

                      D/0k…(파일 내용)…
8
Form



    <form action="/" method="post">
         <input name="key1" value="value1-1"/>
         <input name="key1" value="value1-2"/>
         <input name="key2" value="value2"/>
    <input type="submit"/>
    </form>




    1
    POST http://192.168.0.100:8080/ HTTP/1.1
    Host: 192.168.0.100:8080
    …(중략)…
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 39

    key1=value1-1&key1=value1-2&key2=value2




9
Form (계속)


       <form action="/" method="post">
            <input type="checkbox" name="checked" value="1"/>
            <input name="userdata" value="value1"/>
            <input type="checkbox" name="checked" value="2"/>
            <input name="userdata" value="value2"/>
            <input type="checkbox" name="checked" value="3"/>
            <input name="userdata" value="value3"/>
            <input type="submit"/>
       </form>



       1
       POST http://192.168.0.100:8080/ HTTP/1.1
       Host: 192.168.0.100:8080
       …(중략)…
       Content-Type: application/x-www-form-urlencoded          userdata의 개수 = 3개
       Content-Length: 51                                       checked의 개수 = 2개!

       check=1&userdata=value1&userdata=value2&check=3&userdata=value3



10
Redirection
                   1
                   GET http://yahoo.co.kr/ HTTP/1.1
                   Host: yahoo.co.kr
                   …

                   2
                   HTTP/1.1 301 Moved Permanently
                   Location: http://kr.yahoo.com
                   Vary: Accept-Encoding
                   Content-Type: text/html; charset=utf-8
                   Age: 533
                   Content-Length: 81

                   1
                   GET http://kr.yahoo.com/ HTTP/1.1
                   Host: kr.yahoo.com
                   …

                   2
                   HTTP/1.1 200 OK
                   Content-Type: text/html
                   …



11
Server-side (Java)




      public class RedirectServlet extends HttpServlet {

          @Override
          protected void service(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {

                response.setStatus(302);
                response.setHeader("Location", "http://www.google.com");
          }
      }



                         response.sendRedirect("http://www.google.com");




12
조건부 GET (캐싱)
               1
               GET http://www.google.co.kr/… HTTP/1.1
               Host: www.google.co.kr
               …(중략)…
               If-Modified-Since: Tue, 10 Nov 2009 23:51:53 GMT
               Cache-Control: max-age=0


               2
               HTTP/1.1 304 Not Modified
               Date: Mon, 30 Nov 2009 16:25:58 GMT
               …




                   이후 브라우저가 Caching한 해당 리소스 표시




13
벌써 마무리…




        칼텍의 동료 교수 핚 사람이 파인만에게 질문을 던졌다.
         “스핀이 1/2인 입자들이 페르미­디랙의 통계를 따르는 이유가 뭘까?”
         파인만은 이렇게 말했다.


         “그 내용으로 1학년생들을 위핚 강의를 준비해 보겠네.”
        그러나 몇 주가 지난 후에 파인만은 솔직하게 털어 놓았다.


         “자네도 짐작했겠지만, 아직 강의 노트를 만들지 못했어. 학부 1학년생들
        도 알아듣게 설명핛 방법이 없더라구. 그러니까 내 말은, 우리가 아직 그것
        을 제대로 이해하지 못하고 있다는 뜻이야. 내 말 알아듣겠나?”


                                    - 파인만의 물리학 강의 중-


14
참고 자료


     URL
       http://www.w3.org/Protocols
       http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
       http://www.w3.org/2001/tag/webarch
       http://www.ietf.org/rfc/rfc3986 - URI
       http://code.google.com/intl/ko/apis/gdata/docs/2.0/reference.html#ResourceVersioning

     서적
       Chuck Musciano and Bill Kennedy, HTTP: The Definitive Guide, 2nd Edition, Oreilly, 1998
       Leonard Richardson and Sam Ruby, RESTful 웹 서비스 : 웹 서비스의 짂화, 정보문화사, 2008
       리차드 파인만, 파인만의 물리학 강의, 승산, 2004

     도구
       cURL               (http://curl.haxx.se )
       wireshark          (http:// www.wireshark.org)
       paros              (http:// www.parosproxy.org )
       firebug            (https://addons.mozilla.org/ko/firefox/addon/1843)
       google chrome      (http://chrome.google.com)


15

Mais conteúdo relacionado

Mais procurados

Comet Server Push Over Web
Comet Server Push Over WebComet Server Push Over Web
Comet Server Push Over WebMorgan Cheng
 
PyConMY 2016 Django Channels
PyConMY 2016 Django ChannelsPyConMY 2016 Django Channels
PyConMY 2016 Django ChannelsKok Hoor Chew
 
MeshU Thin & Rack
MeshU Thin & RackMeshU Thin & Rack
MeshU Thin & Rackguestbac5dc
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaArun Gupta
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django ChannelsAlbert O'Connor
 
Apache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestApache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestMyles Braithwaite
 
Rest in a Nutshell 2014_05_27
Rest in a Nutshell 2014_05_27Rest in a Nutshell 2014_05_27
Rest in a Nutshell 2014_05_27Derrick Isaacson
 
Using ngx_lua in upyun 2
Using ngx_lua in upyun 2Using ngx_lua in upyun 2
Using ngx_lua in upyun 2OpenRestyCon
 
Using ngx_lua in UPYUN 2
Using ngx_lua in UPYUN 2Using ngx_lua in UPYUN 2
Using ngx_lua in UPYUN 2Cong Zhang
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsBen Ramsey
 
HipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyHipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyVadim Borodavko
 
PHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersPHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersLorna Mitchell
 
Working with web_services
Working with web_servicesWorking with web_services
Working with web_servicesLorna Mitchell
 
EuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo DriverEuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo DriverJoe Drumgoole
 

Mais procurados (20)

Comet Server Push Over Web
Comet Server Push Over WebComet Server Push Over Web
Comet Server Push Over Web
 
tdc2012
tdc2012tdc2012
tdc2012
 
PyConMY 2016 Django Channels
PyConMY 2016 Django ChannelsPyConMY 2016 Django Channels
PyConMY 2016 Django Channels
 
Web tech 101
Web tech 101Web tech 101
Web tech 101
 
MeshU Thin & Rack
MeshU Thin & RackMeshU Thin & Rack
MeshU Thin & Rack
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in Java
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django Channels
 
Apache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux FestApache CouchDB talk at Ontario GNU Linux Fest
Apache CouchDB talk at Ontario GNU Linux Fest
 
Rest in a Nutshell 2014_05_27
Rest in a Nutshell 2014_05_27Rest in a Nutshell 2014_05_27
Rest in a Nutshell 2014_05_27
 
Using ngx_lua in upyun 2
Using ngx_lua in upyun 2Using ngx_lua in upyun 2
Using ngx_lua in upyun 2
 
Using ngx_lua in UPYUN 2
Using ngx_lua in UPYUN 2Using ngx_lua in UPYUN 2
Using ngx_lua in UPYUN 2
 
How to ride a whale
How to ride a whaleHow to ride a whale
How to ride a whale
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
 
Real-Time Django
Real-Time DjangoReal-Time Django
Real-Time Django
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
 
HipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyHipHop VM: overclocking Symfony
HipHop VM: overclocking Symfony
 
PHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersPHP And Web Services: Perfect Partners
PHP And Web Services: Perfect Partners
 
Working with web_services
Working with web_servicesWorking with web_services
Working with web_services
 
EuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo DriverEuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo Driver
 

Destaque

Scala, Scalability
Scala, ScalabilityScala, Scalability
Scala, ScalabilityDongwook Lee
 
솔루션 구축 사례를 통해 본 SW아키텍처
솔루션 구축 사례를 통해 본 SW아키텍처솔루션 구축 사례를 통해 본 SW아키텍처
솔루션 구축 사례를 통해 본 SW아키텍처Lim SungHyun
 
Spring one참석기 ksug
Spring one참석기 ksugSpring one참석기 ksug
Spring one참석기 ksugSanghyuk Jung
 
자바8 나머지 공개
자바8 나머지 공개자바8 나머지 공개
자바8 나머지 공개Sungchul Park
 
Ksug2015 - JPA3, JPA 내부구조
Ksug2015 - JPA3, JPA 내부구조Ksug2015 - JPA3, JPA 내부구조
Ksug2015 - JPA3, JPA 내부구조Younghan Kim
 
신기술도입가이드
신기술도입가이드신기술도입가이드
신기술도입가이드Lim SungHyun
 
Spring batch와 함께 하는 TDD
Spring batch와 함께 하는 TDDSpring batch와 함께 하는 TDD
Spring batch와 함께 하는 TDDSanghyuk Jung
 
Ksug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpaKsug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpaYounghan Kim
 
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)ZeroTurnaround
 
Spring framework 4.x
Spring framework 4.xSpring framework 4.x
Spring framework 4.xArawn Park
 
변경에 강한 애플리케이션, 유기적 애플리케이션
변경에 강한 애플리케이션, 유기적 애플리케이션변경에 강한 애플리케이션, 유기적 애플리케이션
변경에 강한 애플리케이션, 유기적 애플리케이션Sungchul Park
 
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용Sungchul Park
 
자바 서버 애플리케이션 아키텍처 안티 패턴
자바 서버 애플리케이션 아키텍처 안티 패턴자바 서버 애플리케이션 아키텍처 안티 패턴
자바 서버 애플리케이션 아키텍처 안티 패턴Sungchul Park
 
Resource Handling in Spring MVC
Resource Handling in Spring MVCResource Handling in Spring MVC
Resource Handling in Spring MVCArawn Park
 
소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategy소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategyKenu, GwangNam Heo
 
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처 스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처 Sungchul Park
 
스프링 코어 강의 1부 - 봄 맞이 준비 운동
스프링 코어 강의 1부 - 봄 맞이 준비 운동스프링 코어 강의 1부 - 봄 맞이 준비 운동
스프링 코어 강의 1부 - 봄 맞이 준비 운동Sungchul Park
 

Destaque (20)

Scalability
ScalabilityScalability
Scalability
 
Scala, Scalability
Scala, ScalabilityScala, Scalability
Scala, Scalability
 
솔루션 구축 사례를 통해 본 SW아키텍처
솔루션 구축 사례를 통해 본 SW아키텍처솔루션 구축 사례를 통해 본 SW아키텍처
솔루션 구축 사례를 통해 본 SW아키텍처
 
Spring one참석기 ksug
Spring one참석기 ksugSpring one참석기 ksug
Spring one참석기 ksug
 
팀장 잔소리
팀장 잔소리팀장 잔소리
팀장 잔소리
 
자바8 나머지 공개
자바8 나머지 공개자바8 나머지 공개
자바8 나머지 공개
 
Ksug2015 - JPA3, JPA 내부구조
Ksug2015 - JPA3, JPA 내부구조Ksug2015 - JPA3, JPA 내부구조
Ksug2015 - JPA3, JPA 내부구조
 
신기술도입가이드
신기술도입가이드신기술도입가이드
신기술도입가이드
 
Spring batch와 함께 하는 TDD
Spring batch와 함께 하는 TDDSpring batch와 함께 하는 TDD
Spring batch와 함께 하는 TDD
 
Ksug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpaKsug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpa
 
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
 
Spring framework 4.x
Spring framework 4.xSpring framework 4.x
Spring framework 4.x
 
변경에 강한 애플리케이션, 유기적 애플리케이션
변경에 강한 애플리케이션, 유기적 애플리케이션변경에 강한 애플리케이션, 유기적 애플리케이션
변경에 강한 애플리케이션, 유기적 애플리케이션
 
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용
스프링 코어 강의 2부 - Java 구성을 활용한 스프링 코어 사용
 
자바 서버 애플리케이션 아키텍처 안티 패턴
자바 서버 애플리케이션 아키텍처 안티 패턴자바 서버 애플리케이션 아키텍처 안티 패턴
자바 서버 애플리케이션 아키텍처 안티 패턴
 
Resource Handling in Spring MVC
Resource Handling in Spring MVCResource Handling in Spring MVC
Resource Handling in Spring MVC
 
소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategy소셜 코딩 GitHub & branch & branch strategy
소셜 코딩 GitHub & branch & branch strategy
 
Social Dev Trend
Social Dev TrendSocial Dev Trend
Social Dev Trend
 
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처 스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처
스프링 코어 강의 3부 - 웹 애플리케이션 아키텍처
 
스프링 코어 강의 1부 - 봄 맞이 준비 운동
스프링 코어 강의 1부 - 봄 맞이 준비 운동스프링 코어 강의 1부 - 봄 맞이 준비 운동
스프링 코어 강의 1부 - 봄 맞이 준비 운동
 

Semelhante a IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."

20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basicMksYi
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?timbc
 
Type URL, Enter, and Then …
Type URL, Enter, and Then …Type URL, Enter, and Then …
Type URL, Enter, and Then …Jinglun Li
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTPBen Ramsey
 
REST and JAX-RS
REST and JAX-RSREST and JAX-RS
REST and JAX-RSGuy Nir
 
Rpi python web
Rpi python webRpi python web
Rpi python websewoo lee
 
Composing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopComposing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopPaul Lam
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesciklum_ods
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28Jxck Jxck
 
Life on the Edge with ESI
Life on the Edge with ESILife on the Edge with ESI
Life on the Edge with ESIKit Chan
 
DEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacksDEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacksFelipe Prado
 
Construindo APIs Usando Rails
Construindo APIs Usando RailsConstruindo APIs Usando Rails
Construindo APIs Usando RailsFernando Kakimoto
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 IntroductionWalter Liu
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketbrent bucci
 
Tuning web performance
Tuning web performanceTuning web performance
Tuning web performanceGeorge Ang
 

Semelhante a IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..." (20)

20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basic
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?
 
HTTP
HTTPHTTP
HTTP
 
Type URL, Enter, and Then …
Type URL, Enter, and Then …Type URL, Enter, and Then …
Type URL, Enter, and Then …
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
 
REST and JAX-RS
REST and JAX-RSREST and JAX-RS
REST and JAX-RS
 
Rpi python web
Rpi python webRpi python web
Rpi python web
 
Composing re-useable ETL on Hadoop
Composing re-useable ETL on HadoopComposing re-useable ETL on Hadoop
Composing re-useable ETL on Hadoop
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
 
Life on the Edge with ESI
Life on the Edge with ESILife on the Edge with ESI
Life on the Edge with ESI
 
DEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacksDEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacks
 
Construindo APIs Usando Rails
Construindo APIs Usando RailsConstruindo APIs Usando Rails
Construindo APIs Usando Rails
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
Caching on the Edge
Caching on the EdgeCaching on the Edge
Caching on the Edge
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 
Tuning web performance
Tuning web performanceTuning web performance
Tuning web performance
 

IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."

  • 1. Internet! & HTTP! 잃어버린 패킷을 찾아서… 이동욱 2009.12.05 dugan.lee@gmail.com http://nephilim.tistory.com 1
  • 2. HTML(5?) CSS Javascript/Ajax HTTP Javascript Library Comet Flash/Flex RoR, Django PHP, Servlet/JSP, ASP… 1990 2009 2 그림 출처 - http://en.wikipedia.org
  • 3. 1 1-1 1-2 1-1-1 1-1-2 1-2-1 1-2-2 3
  • 4. HTTP … javascript 기타 기술들… WWW Server-Side (아악!) Ajax Scripts Comet… 4
  • 5. HTTP Request 1 GET / HTTP/1.1 Host: 127.0.0.1:8080 User-Agent: Mozilla/5.0 … Accept: text/html,application/xml;… Accept-Language: ko-kr,ko;q=0.8,en-us Accept-Encoding: gzip,deflate Accept-Charset: EUC-KR,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive 5
  • 6. HTTP Response 2 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Accept-Ranges: bytes ETag: W/"331-1259569714921" Last-Modified: Mon, 30 Nov 2009 08:28:34 GMT Content-Type: text/html Content-Length: 331 Date: Mon, 30 Nov 2009 08:32:30 GMT <html> <head> <title>IBM PetchaKucha</title> </head> <body> Hello Web World! <hr/> <font color="red" size="10"> 안녕하세요</font> </body> </html> 6
  • 7. 많은 Resource들 <html> <body> <img src="images/h.png" /> <img src="images/t.png" /> <img src="images/t.png" /> <img src="images/p.png" /> </body> </html> (ex) jQuery UI http://jqueryui.com/themeroller/images/?new=2e83ff&w=256&h=240&f=pn 7 g&fltr[]=rcd|256&fltr[]=mask|icons/icons.png
  • 8. 1 Resource 일부 GET /wicket/1.4.3/apache-wicket-1.4.3.zip HTTP/1.1 Host: apache.mirror.cdnetworks.com User-Agent: Mozilla/5.0 Accept: text/html,application/xhtml+xml,application/xml Accept-Language: ko-kr,ko;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: EUC-KR,utf-8 Keep-Alive: 300 Connection: keep-alive Referer: http://apache.mirror.cdnetworks.com/wicket/1.4.3/ Range: bytes=21341986- If-Match: "d20802f-1d98c87-476447ce3cc00" If-Unmodified-Since: Mon, 19 Oct 2009 07:13:52 GMT 2 HTTP/1.1 206 Partial Content Date: Tue, 01 Dec 2009 15:38:24 GMT Server: Apache Last-Modified: Mon, 19 Oct 2009 07:13:52 GMT ETag: "d20802f-1d98c87-476447ce3cc00" Accept-Ranges: bytes Content-Length: 9692517 Content-Range: bytes 21341986-31034502/31034503 Keep-Alive: timeout=15, max=1000 Connection: Keep-Alive Content-Type: application/zip D/0k…(파일 내용)… 8
  • 9. Form <form action="/" method="post"> <input name="key1" value="value1-1"/> <input name="key1" value="value1-2"/> <input name="key2" value="value2"/> <input type="submit"/> </form> 1 POST http://192.168.0.100:8080/ HTTP/1.1 Host: 192.168.0.100:8080 …(중략)… Content-Type: application/x-www-form-urlencoded Content-Length: 39 key1=value1-1&key1=value1-2&key2=value2 9
  • 10. Form (계속) <form action="/" method="post"> <input type="checkbox" name="checked" value="1"/> <input name="userdata" value="value1"/> <input type="checkbox" name="checked" value="2"/> <input name="userdata" value="value2"/> <input type="checkbox" name="checked" value="3"/> <input name="userdata" value="value3"/> <input type="submit"/> </form> 1 POST http://192.168.0.100:8080/ HTTP/1.1 Host: 192.168.0.100:8080 …(중략)… Content-Type: application/x-www-form-urlencoded userdata의 개수 = 3개 Content-Length: 51 checked의 개수 = 2개! check=1&userdata=value1&userdata=value2&check=3&userdata=value3 10
  • 11. Redirection 1 GET http://yahoo.co.kr/ HTTP/1.1 Host: yahoo.co.kr … 2 HTTP/1.1 301 Moved Permanently Location: http://kr.yahoo.com Vary: Accept-Encoding Content-Type: text/html; charset=utf-8 Age: 533 Content-Length: 81 1 GET http://kr.yahoo.com/ HTTP/1.1 Host: kr.yahoo.com … 2 HTTP/1.1 200 OK Content-Type: text/html … 11
  • 12. Server-side (Java) public class RedirectServlet extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setStatus(302); response.setHeader("Location", "http://www.google.com"); } } response.sendRedirect("http://www.google.com"); 12
  • 13. 조건부 GET (캐싱) 1 GET http://www.google.co.kr/… HTTP/1.1 Host: www.google.co.kr …(중략)… If-Modified-Since: Tue, 10 Nov 2009 23:51:53 GMT Cache-Control: max-age=0 2 HTTP/1.1 304 Not Modified Date: Mon, 30 Nov 2009 16:25:58 GMT … 이후 브라우저가 Caching한 해당 리소스 표시 13
  • 14. 벌써 마무리… 칼텍의 동료 교수 핚 사람이 파인만에게 질문을 던졌다. “스핀이 1/2인 입자들이 페르미­디랙의 통계를 따르는 이유가 뭘까?” 파인만은 이렇게 말했다. “그 내용으로 1학년생들을 위핚 강의를 준비해 보겠네.” 그러나 몇 주가 지난 후에 파인만은 솔직하게 털어 놓았다. “자네도 짐작했겠지만, 아직 강의 노트를 만들지 못했어. 학부 1학년생들 도 알아듣게 설명핛 방법이 없더라구. 그러니까 내 말은, 우리가 아직 그것 을 제대로 이해하지 못하고 있다는 뜻이야. 내 말 알아듣겠나?” - 파인만의 물리학 강의 중- 14
  • 15. 참고 자료 URL http://www.w3.org/Protocols http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol http://www.w3.org/2001/tag/webarch http://www.ietf.org/rfc/rfc3986 - URI http://code.google.com/intl/ko/apis/gdata/docs/2.0/reference.html#ResourceVersioning 서적 Chuck Musciano and Bill Kennedy, HTTP: The Definitive Guide, 2nd Edition, Oreilly, 1998 Leonard Richardson and Sam Ruby, RESTful 웹 서비스 : 웹 서비스의 짂화, 정보문화사, 2008 리차드 파인만, 파인만의 물리학 강의, 승산, 2004 도구 cURL (http://curl.haxx.se ) wireshark (http:// www.wireshark.org) paros (http:// www.parosproxy.org ) firebug (https://addons.mozilla.org/ko/firefox/addon/1843) google chrome (http://chrome.google.com) 15