Agile Web Development with Rails a Pragmatic Guide

Total Page:16

File Type:pdf, Size:1020Kb

Agile Web Development with Rails a Pragmatic Guide Prepared exclusively for Mathieu Beautru Agile Web Development with Rails A Pragmatic Guide Dave Thomas David Heinemeier Hansson with Leon Breedt Mike Clark Thomas Fuchs Andreas Schwarz The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas Prepared exclusively for Mathieu Beautru Pragmatic Bookshelf Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragmaticprogrammer.com Copyright © 2005 The Pragmatic Programmers LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN 0-9766940-0-X Printed on acid-free paper with 85% recycled, 30% post-consumer content. Fourth printing, December 2005 Version: 2005-12-24 Prepared exclusively for Mathieu Beautru Contents 1Introduction 1 1.1 Rails Is Agile ........................... 3 1.2 Finding Your Way Around ................... 4 1.3 Acknowledgments ........................ 6 Part I—Getting Started 8 2 The Architecture of Rails Applications 9 2.1 Models, Views, and Controllers ................ 9 2.2 Active Record: Rails Model Support ............. 13 2.3 Action Pack: The View and Controller ............ 17 3 Installing Rails 19 3.1 Installing on Windows ..................... 19 3.2 Installing on Mac OS X ..................... 20 3.3 Installing on Unix/Linux .................... 20 3.4 Rails and Databases ...................... 21 3.5 Keeping Up-to-Date ....................... 24 3.6 Rails and ISPs .......................... 24 4 Instant Gratification 25 4.1 Creating a New Application .................. 25 4.2 Hello, Rails! ........................... 27 4.3 Linking Pages Together ..................... 37 4.4 What We Just Did ........................ 41 Prepared exclusively for Mathieu Beautru CONTENTS v Part II—Building an Application 42 5 The Depot Application 43 5.1 Incremental Development ................... 43 5.2 What Depot Does ........................ 44 5.3 Let’s Code ............................ 48 6 Task A: Product Maintenance 49 6.1 Iteration A1: Get Something Running ............ 49 6.2 Iteration A2: Add a Missing Column ............. 57 6.3 Iteration A3: Validate! ..................... 60 6.4 Iteration A4: Prettier Listings ................. 63 7 Task B: Catalog Display 67 7.1 Iteration B1: Create the Catalog Listing ........... 67 7.2 Iteration B2: Add Page Decorations ............. 70 8 Task C: Cart Creation 74 8.1 Sessions ............................. 74 8.2 More Tables, More Models ................... 76 8.3 Iteration C1: Creating a Cart ................. 78 8.4 Iteration C2: Handling Errors ................. 86 8.5 Iteration C3: Finishing the Cart ................ 90 9 Task D: Checkout! 95 9.1 Iteration D1: Capturing an Order ............... 96 9.2 Iteration D2: Show Cart Contents on Checkout ...... 104 10 Task E: Shipping 109 10.1 Iteration E1: Basic Shipping ................. 109 11 Task F: Administrivia 118 11.1 Iteration F1: Adding Users ................... 118 11.2 Iteration F2: Logging In .................... 123 11.3 Iteration F3: Limiting Access ................. 125 11.4 Finishing Up ........................... 129 11.5 More Icing on the Cake ..................... 130 Report erratum Prepared exclusively for Mathieu Beautru CONTENTS vi 12 Task T: Testing 132 12.1 Tests Baked Right In ...................... 132 12.2 Testing Models ......................... 133 12.3 Testing Controllers ....................... 148 12.4 Using Mock Objects ....................... 161 12.5 Test-Driven Development ................... 162 12.6 Running Tests with Rake ................... 165 12.7 Performance Testing ...................... 168 Part III—The Rails Framework 172 13 Rails in Depth 173 13.1 So Where’s Rails? ........................ 173 13.2 Directory Structure ....................... 173 13.3 Rails Configuration ....................... 177 13.4 Naming Conventions ...................... 180 13.5 Active Support .......................... 184 13.6 Logging in Rails ......................... 186 13.7 Debugging Hints ........................ 186 13.8 What’s Next ........................... 188 14 Active Record Basics 190 14.1 Tables and Classes ....................... 191 14.2 Columns and Attributes .................... 192 14.3 Primary Keys and IDs ..................... 197 14.4 Connecting to the Database .................. 199 14.5 CRUD—Create, Read, Update, Delete ............ 201 14.6 Relationships between Tables ................. 216 14.7 Transactions ........................... 237 15 More Active Record 243 15.1 Acts As .............................. 243 15.2 Aggregation ........................... 247 15.3 Single Table Inheritance .................... 253 15.4 Validation ............................ 256 15.5 Callbacks ............................. 264 15.6 Advanced Attributes ...................... 272 15.7 Miscellany ............................ 275 Report erratum Prepared exclusively for Mathieu Beautru CONTENTS vii 16 Action Controller and Rails 278 16.1 Context and Dependencies .................. 278 16.2 The Basics ............................ 279 16.3 Routing Requests ........................ 280 16.4 Action Methods ......................... 291 16.5 Cookies and Sessions ...................... 301 16.6 Flash—Communicating between Actions .......... 311 16.7 Filters and Verification ..................... 313 16.8 Caching, Part One ....................... 318 16.9 The Problem with GET Requests ............... 324 17 Action View 327 17.1 Templates ............................ 327 17.2 Builder templates ........................ 329 17.3 RHTML Templates ....................... 330 17.4 Helpers .............................. 332 17.5 Formatting Helpers ....................... 335 17.6 Linking to Other Pages and Resources ............ 337 17.7 Pagination ............................ 340 17.8 Form Helpers .......................... 341 17.9 Layouts and Components ................... 356 17.10 Caching, Part Two ........................ 366 17.11 Adding New Templating Systems ............... 370 18 The Web, V2.0 373 18.1 Introducing AJAX ........................ 373 18.2 The Rails Way .......................... 376 18.3 The User Interface, Revisited ................. 384 18.4 Advanced Techniques ..................... 389 19 Action Mailer 399 19.1 Sending E-mail ......................... 399 19.2 Receiving E-mail ........................ 406 19.3 Testing E-mail .......................... 408 20 Web Services on Rails 411 20.1 What AWS Is (and What It Isn’t) ................ 411 20.2 The API Definition ........................ 412 20.3 Dispatching Modes ....................... 417 20.4 Using Alternate Dispatching .................. 420 20.5 Method Invocation Interception ................ 421 20.6 Testing Web Services ...................... 423 20.7 Protocol Clients ......................... 425 Report erratum Prepared exclusively for Mathieu Beautru CONTENTS viii 21 Securing Your Rails Application 427 21.1 SQL Injection .......................... 427 21.2 Cross-Site Scripting (CSS/XSS) ................ 430 21.3 Avoid Session Fixation Attacks ................ 433 21.4 Creating Records Directly from Form Parameters ..... 434 21.5 Don’t Trust ID Parameters ................... 435 21.6 Don’t Expose Controller Methods ............... 436 21.7 File Uploads ........................... 438 21.8 Don’t Cache Authenticated Pages ............... 438 21.9 Knowing That It Works ..................... 439 22 Deployment and Scaling 440 22.1 Picking a Production Platform ................. 440 22.2 A Trinity of Environments ................... 448 22.3 Iterating in the Wild ...................... 450 22.4 Maintenance ........................... 454 22.5 Scaling: The Share-Nothing Architecture .......... 456 22.6 Finding and Dealing with Bottlenecks ............ 459 22.7 Case Studies: Rails Running Daily .............. 463 Part IV—Appendices 466 AIntroductiontoRuby 467 A.1 Ruby Is an Object-Oriented Language ............ 467 A.2 Ruby Names ........................... 468 A.3 Methods ............................. 469 A.4 Classes .............................. 471 A.5 Modules ............................. 473 A.6 Arrays and Hashes ....................... 474 A.7 Control Structures ....................... 475 A.8 Regular Expressions ...................... 476 A.9 Blocks and Iterators ...................... 476 A.10 Exceptions ............................ 477 A.11 Marshaling Objects ....................... 478 A.12 Interactive Ruby ......................... 478 A.13 Ruby Idioms ..........................
Recommended publications
  • Managing the Performance Impact of Web Security
    Electronic Commerce Research, 5: 99–116 (2005) 2005 Springer Science + Business Media, Inc. Manufactured in the Netherlands. Managing the Performance Impact of Web Security ADAM STUBBLEFIELD and AVIEL D. RUBIN Johns Hopkins University, USA DAN S. WALLACH Rice University, USA Abstract Security and performance are usually at odds with each other. Current implementations of security on the web have been adopted at the extreme end of the spectrum, where strong cryptographic protocols are employed at the expense of performance. The SSL protocol is not only computationally intensive, but it makes web caching impossible, thus missing out on potential performance gains. In this paper we discuss the requirements for web security and present a solution that takes into account performance impact and backwards compatibil- ity. Keywords: security, web performance scalability, Internet protocols 1. Introduction Security plays an important role in web transactions. Users need assurance about the au- thenticity of servers and the confidentiality of their private data. They also need to know that any authentication material (such as a password or credit card) they send to a server is only readable by that server. Servers want to believe that data they are sending to paying customers is not accessible to all. Security is not free, and in fact, on the web, it is particularly expensive. This paper focuses on managing the performance impact of web security. The current web security standard, SSL, has a number of problems from a performance perspective. Most obviously, the cryptographic operations employed by SSL are computationally expensive, especially for the web server. While this computational limitation is slowly being overcome by faster processors and custom accelerators, SSL also prevents the content it delivers from being cached.
    [Show full text]
  • Direct Internet 3 User Manual for the Windows Operating Systems
    DIRECT INTERNET 3 User Manual for the Mac OS® Operating System Iridium Communications Inc. Rev. 2; October 29, 2010 Table of Contents 1 OVERVIEW ............................................................................................................................................1 2 HOW IT WORKS ....................................................................................................................................1 3 THE DIAL-UP CONNECTION ...............................................................................................................2 3.1 Connect ..........................................................................................................................................2 3.2 Disconnect .....................................................................................................................................5 4 DIRECT INTERNET 3 WEB ACCELERATOR ......................................................................................6 4.1 Launch ...........................................................................................................................................6 4.2 The User Interface Menu ...............................................................................................................7 4.3 Start and Stop ................................................................................................................................8 4.4 Statistics .........................................................................................................................................9
    [Show full text]
  • Combating Spyware in the Enterprise.Pdf
    www.dbebooks.com - Free Books & magazines Visit us at www.syngress.com Syngress is committed to publishing high-quality books for IT Professionals and delivering those books in media and formats that fit the demands of our cus- tomers. We are also committed to extending the utility of the book you purchase via additional materials available from our Web site. SOLUTIONS WEB SITE To register your book, visit www.syngress.com/solutions. Once registered, you can access our [email protected] Web pages. There you will find an assortment of value-added features such as free e-booklets related to the topic of this book, URLs of related Web site, FAQs from the book, corrections, and any updates from the author(s). ULTIMATE CDs Our Ultimate CD product line offers our readers budget-conscious compilations of some of our best-selling backlist titles in Adobe PDF form. These CDs are the perfect way to extend your reference library on key topics pertaining to your area of exper- tise, including Cisco Engineering, Microsoft Windows System Administration, CyberCrime Investigation, Open Source Security, and Firewall Configuration, to name a few. DOWNLOADABLE EBOOKS For readers who can’t wait for hard copy, we offer most of our titles in download- able Adobe PDF form. These eBooks are often available weeks before hard copies, and are priced affordably. SYNGRESS OUTLET Our outlet store at syngress.com features overstocked, out-of-print, or slightly hurt books at significant savings. SITE LICENSING Syngress has a well-established program for site licensing our ebooks onto servers in corporations, educational institutions, and large organizations.
    [Show full text]
  • Performance Analysis of a Client-Side Caching/Prefetching System for Web Traffic
    1 Performance Analysis of a Client-Side Caching/Prefetching System for Web Traffic Abdullah Balamash and Marwan Krunz Department of Electrical & Computer Engineering University of Arizona Tucson, AZ 85721 fbalamash,[email protected] Philippe Nain INRIA 06902 Sophia Antipolis, France [email protected] Abstract Network congestion remains one of the main barriers to the continuing success of the Internet. For Web users, congestion manifests itself in unacceptably long response times. One possible remedy to the latency problem is to use caching at the client, at the proxy server, or within the Internet. However, Web documents are becoming increasingly dynamic (i.e., have short lifetimes), which limits the potential benefit of caching. The performance of a Web caching system can be dramatically increased by integrating document prefetching (a.k.a. “proactive caching”) into its design. Although prefetching reduces the response time of a requested document, it also increases the network load, as some documents will be unnecessarily prefetched (due to the imprecision in the prediction algorithm). In this study, we analyze the confluence of the two effects through a tractable mathematical model that enables us to establish the conditions under which prefetching reduces the average response time of a requested document. The model accommodates both passive client and proxy caching along with prefetching. Our analysis is used to dynamically compute the “optimal” number of documents to prefetch in the subsequent client’s idle (think) period. In general, this optimal number is determined through a simple numerical procedure. Closed-form expressions for this optimal number are obtained for special yet important cases.
    [Show full text]
  • Web Acceleration Mechanics
    Web Acceleration Mechanics Alexander Krizhanovsky Tempesta Technologies, Inc. [email protected] Who am I? CEO at Tempesta Technologies, INC Custom software development since 2008: ● Network security: WAF, VPN, DPI etc. e.g. Positive Technologies AF, “Visionar” Gartner magic quadrant’15 ● Databases: one of the top MariaDB contributors ● Perfomance tuning Tempesta FW – Linux Application Delivery Controller Tempesta FW: Application Delivery Controller (ADC) Web accelerator Load balancing Backend connections management TLS termination Protocol downgrade Cache responses Agenda & Disclaimer Mechanics: ● HTTP connections & messages management ● HTTP decoders & parsers ● Web caches ● Network I/O ● Multitasking ● TLS The web accelerators are mentioned only as implementation examples Some software is just more familiar to me HTTP connections & messages management Server connections New connections or persistent connections (usual) HTTP keep-alive connections Keep-Alive: timeout=5, max=10000 Reestablish closed KA connection New connections if all are busy N backend connections = N backend requests in-flight DDoS and flash crowds: as many server connections as client connections Run out of port numbers HTTP/1 message pipelining Mostly unused by proxies Squid, Tempesta FW, Polipo Messages multiplexing Forwarding and reforwarding issues Security issues ● Breaking authentication ● HTTP Response splitting HTTP Response Splitting attack (Web cache poisoning) [CRLF CRLF] Client: /redir_lang.jsp?lang=foobar%0d%0aContent-Length:%200%0d%0a%0d%0a HTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0a
    [Show full text]
  • The Medusa Proxy a Tool for Exploring User-Perceived Web Performance
    The Medusa Proxy A Tool For Exploring User-Perceived Web Performance Mimika Koletsou and Geoffrey M. Voelker Department of Computer Science and Engineering University of California, San Diego 9500 Gilman Dr., MS 0114 La Jolla, CA 92093-0114 USA g fkoletsou,voelker @cs.ucsd.edu Abstract example, it is not uncommon for users to believe that Web caches impose noticeable overhead to browsing, or for content distribu- In this paper we describe the Medusa proxy, a tool for explor- tion network (CDN) companies such as Akamai [1] to make ag- ing user-perceived Web performance. The Medusa proxy is a gressive claims about improvements in download performance. non-caching forwarding proxy used in conjunction with a user’s Currently, though, there is no convenient way for users to vali- browser. The two key features that the Medusa proxy provides date those beliefs or claims. are (1) the ability to simultaneously mirror HTTP requests from Characterizing user-perceived Web performance is challenging the browser to different Web delivery systems and directly com- because of the difficulty of generalizing conclusions about per- pare the results, and (2) the ability to transform requests, e.g., to formance results across a wide range of user environments and transform Akamai URLs back into URLs to the customer’s origin network locations. Rather than try to generalize our conclusions server. across a diverse group of users, we have developed the Medusa We show how the Medusa proxy can be used to explore user- proxy as a convenient tool with which individual users can ex- perceived Web performance using two experiments that deter- plore their Web performance, and the impact of various Web de- mine (1) to what extent using large-scale caching systems like livery systems on that performance, from their desktop.
    [Show full text]
  • Web Cache for Grid HTTP Access
    Web cache for grid HTTP access Duarte Meneses Fabrizio Furano [email protected] [email protected] April 1, 2014 1 1 Introduction Sites have usually several jobs and people accessing files in the grid. Even though files are often on site, these files may come from several storage elements, which can be located at any other site. Due to recent developments, many storage elements have currently an HTTP interface, implemented for example, with XRootd or with a WebDAV server. Thus, the files can be accessed with this widely known protocol using any HTTP client, instead of forcing the usage of grid-specific protocols. The use of HTTP could also enable easy caching of data using existing web caching products. In this document we explore further this possibility. The HTTP resources (files) can be re-fetched several times within the same site, ei- ther by the same user or not. This can be especially frequent with batch jobs, that pull periodically the same files from the network. To optimize the access to the data and reduce the load in the network, we are in- vestigating potential advantages and implications of deploying HTTP caches at the sites. Accessing a cached file within the site could bring a significant performance boost, pactic- ularly for sites that constantly consume external resources, i.e. resources located in other sites. Using web caches is a solution adopted often by websites for optimizing the access to it by caching its contents (possibility at several locations, close to the users). These web caches are deployed in reverse mode, and the DNS is usually pointed to it.
    [Show full text]
  • Tempesta FW Linux Application Delivery Controller
    Tempesta FW Linux Application Delivery Controller Alexander Krizhanovsky Tempesta Technologies, Inc. [email protected] Who am I? CEO & CTO at Tempesta Technologies (Seattle, WA) Developing Tempesta FW – open source Linux Application Delivery Controller (ADC) Custom software development in: ● high performance network traffic processing e.g. WAF mentioned in Gartner magic quadrant ● Databases e.g. MariaDB SQL System Versioning is coming soon (https://github.com/tempesta-tech/mariadb_10.2) Challenges Usual Web accelerators aren’t suitable for HTTP filtering Kernel HTTP accelerators are better, but they’re dead => need a hybrid of HTTP accelerator and a firewall ● Very fast HTTP parser to process HTTP floods ● Very fast Web cache to mitigate DDoS which we can’t filter out ● Network I/O optimized for massive ingress traffic ● Advanced filtering abilities at all network layers L7 DDoS mitigation Web accelerator? Application Delivery Controller (ADC) Use cases CMSes, CDNs, virtual hostings, heavy loaded Web sites, OEMs in Web security etc. Usual ADC cases: ● When you need performance ● Web content acceleration ● Web application protection ● HTTP load balancing Application layer DDoS Service from Cache Rate limit Nginx 22us 23us (Additional logic in limiting module) Fail2Ban: write to the log, parse the log, write to the log, parse the log… Application layer DDoS Service from Cache Rate limit Nginx 22us 23us (Additional logic in limiting module) Fail2Ban: write to the log, parse the log, write to the log, parse the log… - really in 21th century?! tight integration of Web accelerator and a firewall is needed Web-accelerator capabilities Nginx, Varnish, Apache Traffic Server, Squid, Apache HTTPD etc.
    [Show full text]
  • Optimasi Apache Web Server Menggunakan Varnish Web Cache Dan Reverse Proxy Nginx
    OPTIMASI APACHE WEB SERVER MENGGUNAKAN VARNISH WEB CACHE DAN REVERSE PROXY NGINX Skripsi disusun sebagai salah satu syarat untuk memperoleh gelar Sarjana Komputer Program Studi Teknik Informatika Oleh Anindya Putri Arunawati 4611416030 JURUSAN ILMU KOMPUTER FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM UNIVERSITAS NEGERI SEMARANG 2020 ii iii iv MOTTO DAN PERSEMBAHAN MOTTO • Jika yang dapat kau lakukan hanyalah merangkak, maka mulailah merangkak (Rumi) • Semakin dia yakin kepada Allah, semakin sedikit dia mengeluh dalam hidupnya (ust. Hanan Attaki) • Jangan pernah lelah untuk berdoa dan percayakan semuanya pada Allah, Allah yang mengatur segalanya (Anindya) PERSEMBAHAN Skripsi ini saya persembahkan kepada: • Kedua Orang Tua saya Bapak Achmad Daserun dan Ibu Watini yang telah mencurahkan keringatnya untuk membiayai pendidikan saya, yang selalu memberikan kasih sayang, doa, dan dukungannnya. • Adik saya, Hilal Hubdin yang telah memberikan dukungan serta doa yang terus dipanjatkan. • Teman-teman saya di jurusan Ilmu Komputer, Fakultas MIPA, serta teman-teman di Universitas Negeri Semarang. • Semua pihak yang tidak dapat disebutkan satu persatu yang telah membantu hingga terselesaikannya penulisan skripsi ini. • Almamater, Universitas Negeri Semarang. v PRAKATA Puji syukur penulis panjatkan kepada Allah Subhanahu wa ta'ala atas berkat rahmat dan hidayah-Nya penulis dapat menyelesaikan skripsi yang berjudul “Optimasi Apache Web Server Menggunakan Varnish Web Cache Dan Reverse Proxy Nginx”. Penulis menyadari bahwa penulisan skripsi ini tidak akan selesai tanpa adanya dukungan serta bantuan dari berbagai pihak. Oleh karena itu, penulis ingin menyampaikan ucapan terima kasih kepada: 1. Prof. Dr. Fathur Rokhman, M.Hum., Rektor Universitas Negeri Semarang. 2. Dr. Sugianto M.Si., Dekan Fakultas Matematika dan Ilmu Pengetahuan Alam Universitas Negeri Semarang.
    [Show full text]
  • Performance Evaluation of Raspberry Pi 3B As a Web Server
    Performance evaluation of Raspberry pi 3B as a web server Meron Istifanos and Israel Tekahun 18-06-2020 Faculty of Computing Blekinge Institute of Technology SE-371 79 Karlskrona Sweden This thesis is submitted to the Faculty of Computing at Blekinge Institute of Tech- nology in partial fulfillment of the requirements for the bachelor’s degree in software engineering. The thesis is equivalent to 10 weeks of full-time studies. Contact Information: Author(s): Meron Istifanos E-mail: [email protected] Israel Tekahun E-mail: [email protected] University advisor: Dr. Michel Nass Department of Software Engineering Faculty of Computing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE-371 79 Karlskrona, Sweden Fax : +46 455 38 50 57 Abstract Context. During the usage of a product, evaluating its performance quality is a crucial procedure. Web servers are one of the most used technological products in today’s modern world[1]. Thus, in this thesis we will evaluate and compare the performances of two web servers. The servers that are tested in the experiment are a raspberry pi 3B and a personal HP laptop. Objectives. The main objective of the study is to evaluate the performance of a raspberry pi 3B as a web server. In order to give a clearer image of how the rasp- berry pi performs, the laptop will also be evaluated and its performance will be used as a contrast during the study. Realization. To fulfill our objective, an experiment was conducted with the help of a performance testing tool called apache bench.
    [Show full text]
  • SO De Xarxes D'àrea Local
    Gestió de xarxes d’àrea local TEMA 3: S.O. De Xarxes d'Àrea Local Introducció SO de Xarxes 3 Introducció......................................................................................................................4 3.0 Instal·lació d'un SO Lan..........................................................................................4 3.0.1 Instal·lació de Linux .......................................................................................5 3.0.1.1 Instal·lació amb els Cds o el DVD..........................................................5 3.0.1.2 sense Cds.................................................................................................5 3.1 Instal·lació d’una LAN............................................................................................6 3.1.1 LAN en DOS...................................................................................................6 3.1.2 LAN en Windows...........................................................................................7 3.1.21 Configuració TCP/IP des de consola......................................................13 3.1.3 LAN en Linux...............................................................................................14 3.1.3.1 LAN sense fils en Linux........................................................................18 3.2 Configuració automàtica de xarxes.......................................................................21 3.2.1 Bootstrap protocol.........................................................................................21
    [Show full text]
  • A Ground-Up Approach to High-Throughput Cloud Computing
    Università degli Studi di Torino Scuola di Dottorato in Scienze ed Alte Tecnologie XXVI ciclo Tesi di Dottorato A ground-up approach to High-Throughput Cloud Computing in High-Energy Physics Dario Berzano Relatore Correlatori Prof. Massimo Masera Dott. Gerardo Ganis Università degli Studi di Torino CERN Dott. Stefano Bagnasco INFN Torino CERN-THESIS-2014-376 16/04/2014 Controrelatore Prof. Marco Paganoni Università degli Studi di Milano-Bicocca Anno Accademico 2012–2013 «Simplicity is the ultimate sophistication.» Apple II commercial (1977) Table of Contents 1 Virtualization and Cloud Computing in High Energy Physics 13 1.1 Computing in the LHC era . 13 1.1.1 Hierarchy of computing centres . 16 1.1.2 Event processing paradigm . 17 1.1.3 Analysis framework and data format: ROOT . 18 1.1.4 The ALICE Experiment . 19 1.2 Virtualization and Cloud Computing . 21 1.2.1 State of the art . 23 1.3 From the Grid to clouds? . 25 1.3.1 Grid over clouds and more . 26 1.4 Overview of this work . 27 2 Building a Private Cloud out of a Grid Tier-2 29 2.1 Overview of the INFN Torino Computing Centre . 29 2.1.1 Grid VOs and ALICE . 30 2.2 Rationale of the Cloud migration . 32 2.2.1 No performance loss through virtualization . 32 2.2.2 Abstraction of resources in the Grid and the cloud . 32 2.2.3 Harmonization of diverse use cases in a private cloud . 33 2.2.4 IaaS: separating administrative domains . 34 2.2.4.1 Virtual farm administrator .
    [Show full text]