We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byIgnacio Stork
Modified about 1 year ago
Thread pool based Web server 조태문
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 2 개발 계획 1/3 필수 요구사항 –“Get” method 에 대한 응답을 처리할 수 있어야 함. –thread pool mechanism –Boss & worker model – 각 쓰레드간 자원 공유는 전역 변수 ( 구조체 ) 를 통함. – 용도 및 목적에 따른 구조화 프로그래밍 source 분할 header 는 통합 –memory leakage 및 기타 서비스에 큰 영향이 없어야함. – 쓰레드간 동기화는 mutex 사용 –Busy wait 없음 : signal 사용. ( 조건변수로 변경 ) –daemon 화로 서비스에 등록 가능한 상태 ( 테스트 못함 )
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 3 개발 계획 2/3 부가 개발계획 – 확장성 : cgi, POST 등 ( 적용되어 있지 않음. ) –logging thread 사용 ( 적용되어 있지 않음. ) –Real time mechanism 적용. ( 필요없음. )
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 4 개발 계획 3/3 개발기간 –2009/01/19 ~ 2009/02/9 시험목록 – 안정 – 성능
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 5 Server over view Start run loop = 1 Server initailize SIG_INT signal? loop = 0 loop? Server destroy End loop == 1 loop == 0 accept Client socket queue (Shared) mutex_locking push mutex_unlocking HTTP processing in Worker thread Main thread mutex_locking pop mutex_unlocking Send HTML to client
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 6 initializing scenario Start Create listen socket SO_REUSEADDR SIG_INT wait Create clinet scoket queue Init socket queue Init thread pool Create worker thread Init work thread info thread detach Init main(accept loop) thread thread detach All threads check worker thread suspend
Copyright © 2005 Thin Multimedia, Inc. All Rights Reserved. thin multimedia inc. » 7 Boss & Worker & Shared queue accept Client socket queue (Shared) mutex_locking push mutex_unlocking client request Connect() Search Idle woker thread pthread_cond_wait thread info = BUSY request read ( timeout 10 sec) HTTP parsing HTML read send HTML to client( timeout 10 sec ) thread info = IDLE Worker thread init mutex_locking pop mutex_unlocking loop? Worker thread exit pthread_cond_signal going active pop fail going suspend pop success loop == 1 loop == 0 mutex_locking pop mutex_unlocking loop? loop == 1 Main thread exit loop == 0
CLIENT (Browser) socket accept C1 C2 recv C2 recv send C2 send end_thread recv C3 send bind connect Web Server Proxy recv close C3 close C2 end_thread.
Kernel mode linux. Why? ● The pros – There is a C like interface inside the Linux kernel already. – The speed. – The size of AP. ● The cons – Missing.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L22 (Chapter 25) Networking.
Page: 1 Director 1.0 TECHNION Department of Computer Science The Computer Communication Lab (236340) Summer 2002 Submitted by: David Schwartz Idan Zak.
Apache API Notes Robert S. Thau (Presented by Justin Erenkrantz)
CSE 451: Operating Systems Section 6 Project 2b; Midterm Review.
CSE 451: Operating Systems Section 6 Project 2b. Midterm Scores will be on Catalyst and midterms were handed back on Friday(?) in class Talk to Ed,
CSCE Systems Programming Lecture 24 POSIX Threads Again CSCE April 15, 2013.
Web Server Architecture. Complex –Helpful to consider best design practices Items to consider –Response Time Use concurrency –Features HTTP/1.1 CGI.
CP476 Internet Computing CGI1 Cookie –Cookie is a mechanism for a web server recall info of accessing of a client browser –A cookie is an object sent by.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L23 (Chapter 25) Networking.
CGIWrap CGIWrap is a gateway program that allows general users to use CGI scripts and HTML forms without compromising the security of the http server.
Using TCP sockets in Perl Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
How Web Database Architectures Work CPS181s April 8, 2003.
NoTorrent A Peer-to-Peer Web Caching System Modeled Partially After BitTorrent but Without the Need for.torrent Files Howie Vegter, hrv2101 Columbia University.
CSCE Systems Programming Lecture 22 POSIX Threads CSCE March 25, 2013.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
1 Interprocess Communication Race Conditions Two processes want to access shared memory at same time.
Multithreaded Web Server.
CGI and Perl MSc Publishing on the WWW. What is CGI ? (1) User Buying and selling Playing games Customised web pages Developer Means to run external programs.
A Chat Server DBI – Representation and Management of Data on the Internet.
CSE 434: Computer Networks Project Single vs. Per Connection vs. Pooling Threading Techniques Dominic Hilsbos, Dorothy Johnson, Chris Volpe, Andy Wong,
June-Hyun, Moon Computer Communications LAB., Kwangwoon University Chapter 26 - Threads.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
HTTP; The World Wide Web Protocol HTTP Web Content Caching Marc Andreessen.
Sockets For Servers Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
CSE451 Section 6: Spring 2006 Web server & preemption.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Objectives Ch. D - 1 At the end of this chapter students will: Know the general architecture and purpose of servlets Understand how to create a basic servlet.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
subscribe create subscription object with in the memory system. it can destroy unsubscribe operation. Persistence(option) to store it during.
Web Operated Robot Arm Matanya Elchanani and Tarek Sobh University of Bridgeport Department of Computer Science and Engineering Robotics, Intelligent.
Application for Internet Radio Directory 19/06/2012 Industrial Project (234313) Kickoff Meeting Supervisors : Oren Somekh, Nadav Golbandi Students : Moran.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop VI Scheduling & Process Management Professional.
Programming Project #3CS-4513, D-Term Programming Project #3 Simple Web Server CS-4513 D-Term 2007 (Slides include materials from Operating System.
2 장 프로세스 제 03 강 : 프로세스. Multi-user System OS boot 탐색기 hwp OS kernel a.out game.
Server-side http General form of http response/request GET request method POST request method Responses Servlet support.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 34 Servlets.
Socket Programming. Sockets are a protocol independent method of creating a connection between processes. Sockets can be either connection based (TCP:
Communication protocols 2. HTTP Hypertext Transfer Protocol, is the protocol of World Wide Web (www) Client web browser Web server Request files Respond.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
UDP File Transfer Nathan Kiel CSE434. Goal Explore difficulties of UDP transport in a file transfer application Direct experience by writing an FTP style.
CGI Programming. What is it? CGI –Common Gateway Interface Standard way to pass information back to the Web Server –GET Query String –POST Standard Input.
Operating Systems Distributed-System Structures. Topics –Network-Operating Systems –Distributed-Operating Systems –Remote Services –Robustness –Design.
Web Server Implementation On DE2 Final Presentation Performed by: Ariel Morali Nadav Malki Supervised by: Ina Rivkin.
Servlets Life Cycle. The Servlet Life Cycle A servlet life cycle can be defined as the entire process from its creation till the destruction. The following.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
© 2017 SlidePlayer.com Inc. All rights reserved.