Skip blocks: reusing execution history to accelerate web scripts

Author:

Chasins Sarah1,Bodik Rastislav2

Affiliation:

1. University of California at Berkeley, USA

2. University of Washington, USA

Abstract

With more and more web scripting languages on offer, programmers have access to increasing language support for web scraping tasks. However, in our experiences collaborating with data scientists, we learned that two issues still plague long-running scraping scripts: i) When a network or website goes down mid-scrape, recovery sometimes requires restarting from the beginning, which users find frustratingly slow. ii) Websites do not offer atomic snapshots of their databases; they update their content so frequently that output data is cluttered with slight variations of the same information — e.g. , a tweet from profile 1 that is retweeted on profile 2 and scraped from both profiles, once with 52 responses then later with 53 responses. We introduce the skip block , a language construct that addresses both of these disparate problems. Programmers write lightweight annotations to indicate when the current object can be considered equivalent to a previously scraped object and direct the program to skip over the scraping actions in the block. The construct is hierarchical, so programs can skip over long or short script segments, allowing adaptive reuse of prior work. After network and server failures, skip blocks accelerate failure recovery by 7.9x on average. Even scripts that do not encounter failures benefit; because sites display redundant objects, skipping over them accelerates scraping by up to 2.1x. For longitudinal scraping tasks that aim to fetch only new objects, the second run exhibits an average speedup of 5.2x. Our small user study reveals that programmers can quickly produce skip block annotations.

Funder

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference31 articles.

1. Adelberg Brad. 1998. NoDoSE - a tool for semi-automatically extracting structured and semistructured data from text documents. In: Sigmod record. Adelberg Brad. 1998. NoDoSE - a tool for semi-automatically extracting structured and semistructured data from text documents. In: Sigmod record.

2. Ringer: web automation by demonstration

3. Chang Chia-Hui Kayed Mohammed Girgis Moheb Ramzy & Shaalan Khaled F. 2006. A survey of web information extraction systems. Ieee trans. on knowl. and data eng. 18(10) 1411–1428. Chang Chia-Hui Kayed Mohammed Girgis Moheb Ramzy & Shaalan Khaled F. 2006. A survey of web information extraction systems. Ieee trans. on knowl. and data eng. 18(10) 1411–1428.

4. Chasins Sarah. 2017 ( July). schasins/helena: A chrome extension for web automation and web scraping. https://github.com/ schasins/helena . Chasins Sarah. 2017 ( July). schasins/helena: A chrome extension for web automation and web scraping. https://github.com/ schasins/helena .

5. Flesca Sergio Manco Giuseppe Masciari Elio Rende Eugenio & Tagarelli Andrea. 2004. Web wrapper induction: A brief survey. Ai commun. 17(2) 57–61. Flesca Sergio Manco Giuseppe Masciari Elio Rende Eugenio & Tagarelli Andrea. 2004. Web wrapper induction: A brief survey. Ai commun. 17(2) 57–61.

Cited by 9 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. ImageEye: Batch Image Processing using Program Synthesis;Proceedings of the ACM on Programming Languages;2023-06-06

2. Synthesizing analytical SQL queries from computation demonstration;Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2022-06-09

3. Informing Housing Policy through Web Automation: Lessons for Designing Programming Tools for Domain Experts;CHI Conference on Human Factors in Computing Systems Extended Abstracts;2022-04-27

4. DIY assistant: a multi-modal end-user programmable virtual assistant;Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2021-06-18

5. Web question answering with neurosymbolic program synthesis;Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation;2021-06-18

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3