Results 1 to 1 of 1

Thread: Parsing & Storing/Crawling

  1. #1
    clodey65 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    187
    Rep Power
    4

    Default Parsing & Storing/Crawling

    APIs are accessed by programmatically calling a URL and downloading the results given back. Generally the returned content of an API is XML or JSON. RSS and Atom feeds are in XML. This allows you, as a developer, to easily parse the content and do what you want with it. Depending on your application, there are a few ways in which you can access and work with this structured content.

    Name:  Parsing & Storing Crawling.jpg
Views: 60
Size:  9.5 KB

    One common method is to access and parse the content on the fly as the result of a user action. For example, let's say you provide a feature that allows your users to search for hotels in a specific city. When the user provides the city and dates of interest, your code would access the APIs of one' or more hotel sites"passing the city and dates, to get availability, parse the returned results, and display them to the user immediately. This approach is most useful when you need very fresh data and when you cannot anticipate the values your users are going to search for. The downsides to this method are that there is latency associated with accessing the API (ie, your user must wait) and your site causes a lot of traffic on the API of the remote website. Also, if the remote site goes down, your users will not have access to this feature.

    To address the downsides of the on the-fly method, as well as to allow greater flexibility with how you filter, sort, and modify the returned data, your code can access the content from an API 'offline.' This means that you have some process that runs regularly (not as a result of some user's action) to download the data from a website's API or feed and then store it for access later. The most common place to store such data is in a database (like MySQL) or a search engine (like Lucene/Solr), but you could even store the XML files directly on disk and access them locally.
    Last edited by clodey65; 12-17-2008 at 08:32 AM.

Similar Threads

  1. Replies: 1
    Last Post: 12-16-2009, 03:44 PM
  2. NXP SmartMX: chip for storing biometric data in e-Passport
    By Chaddesley Corbett in forum Latest Hardware News
    Replies: 0
    Last Post: 10-24-2009, 07:42 AM
  3. Disk for storing Files
    By roystin in forum Technologies
    Replies: 0
    Last Post: 01-22-2009, 10:16 AM
  4. Storing sensitive data on portable drives
    By Jacory666 in forum Flash Drives
    Replies: 0
    Last Post: 12-13-2008, 07:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48