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

In-Journal:
LJ Extras:
Planets:
View previous entry View newer entry

Chris Schmidt's Journal


[info]crschmidt

photogeek
13th May, 2004 at 11:20 pm

ApacheBench testing of XML Parsing

So, I've been working on a project called PeopleAggregator, and we've been talking about integrating with a lot of different platforms, among them Drupal. (For the record, this is completely unrelated to the MT stuff that went on today. I may write on that later, but really, everyone else has said what I would in a million different ways.) Anyway, we were talking about RAP and how it's too bulky and slow to work for what we need.

So, we got a guy on the team - Joel De Gan, who's working on the PeoplesDNS project for us, and he offered to write us a parser. This is going to be a replacement for RAP, for those of us who can't deal with the slowness of RAP.

Now, I don't know much about RAP. And I don't know much about PHP, or parsing XML, or really anything - I pick up the bits I need to know as I go along. So I'm just kind of standing on the sidelines, but today, I got a demo of what Joel's parser can do.

LiveJournal FOAF files are typically big. Mine is no exception - over 100 friends, random contact data, etc. All in all, a 40KB document about me. I want to parse this data. So I attempt to using both RAP and Joel's parser.

To alleviate network traffic conditions, I copy the file I want locally. To simulate the action of opening a file and reading it, I did keep it on the webserver, so I will admit there may be some kind of bias in that, but I used the exact same method to open the file in both cases (fopen) so I don't think that's an issue that would cause any major difference. I also disabled all printed output.

Anyway, I used this file to check the parsers. Using ab (apache benchmarking utility - fetches a page a bunch of times and tells you how long it took). Using a 50 request check, I got averages on the two parsing utilities:

Joel De Gan's XML parser, parses data into a multileveled array as displayed at http://crschmidt.net/parse/parse.php (source available):

Requests per second: 11.25 [#/sec] (mean)
Time per request: 88.92 [ms] (mean)
Time per request: 88.92 [ms] (mean, across all concurrent requests)

(Full Stats)

RAP, parses into RDF models. (source, + RAP. The parser isn't actually here):

Requests per second: 1.35 [#/sec] (mean)
Time per request: 739.82 [ms] (mean)
Time per request: 739.82 [ms] (mean, across all concurrent requests)

(Full Stats)

So, we've got a parser that to a guy like me seems simpler to use (advanced data structures are part of the limited experience I did get from LiveJournal), is lightweight (one file, as opposed to 256 in RAP), and faster by an order of magnitude.

That, to me, sounds like a winner. Props to Joel for his great work. His next step is to implement OWL capabilities into RDF parsing, and that's going to kick even more ass. As Eric said at one point about this: "Be still my beating heart."

| Comment | Read 9 | Link
From: [info]vanbeast
Date: May 13th, 2004 - 09:29 pm (UTC) (Link)
I have absolutely no idea what happened with MT, other than hearing vague rumors that sixapart may have gotten attacked. Do you have any links or anything?
(Reply) (Thread)
From: [info]crschmidt
Date: May 13th, 2004 - 10:06 pm (UTC) (Link)
... Attacked? Well, I suppose that could be what you would call every "blogger in the blogosphere" deciding that you've "jumped ship", "gone corporate", or in other ways fucked up your licensing.

http://secure.sixapart.com/ just about sums it up. Basically, if you have more than one user on your SixApart site, you're going to have to shell out cash: at regular account prices, even for three authors and a commercial license, $100 bucks, for the new version.

Needless to say, many users don't have that kind of cash - or if they do, don't want to spend it on a project like Movable Type.

Mena's article is at http://www.sixapart.com/corner/archives/2004/05/its_about_time.shtml . The trackbacks from the post tell the tale better than I need to.

The message Six Apart is sending is loud and clear: We don't want personal users. The new version isn't for you. Sorry.
(Reply) (Parent) (Thread)
From: [info]vanbeast
Date: May 13th, 2004 - 10:36 pm (UTC) (Link)
ahh. For some reason I heard that their site had been hacked or something. I could well have misunderstood.
(Reply) (Parent) (Thread)
From: [info]mathwhiz78
Date: May 13th, 2004 - 09:38 pm (UTC) (Link)
I bow to your supreme nerdiness and geekdom.
(Reply) (Thread)
From: [info]jpallan
Date: May 14th, 2004 - 03:59 am (UTC) (Link)
Though I only vaguely understand this, I do concede it sounds very cool, and I'm curious about the generalities of the old system of data parsing vs. his new model. It sounds very innovative, but I am curious about the hows. :)
(Reply) (Thread)

Offtopic

From: [info]sova
Date: May 17th, 2004 - 02:55 am (UTC) (Link)
Since http://www.heterosapiens.com/~crschmidt/garfield.xml probably belongs to you (and thus so does [info]dailygarfield), will you please fix it? I'm not getting my Garfield for a week now, and withdrawal pains are here already :-(((
(Reply) (Thread)

Re: Offtopic

From: [info]crschmidt
Date: May 17th, 2004 - 07:40 am (UTC) (Link)
Not possible in the way I'm doing it now. They switched to a javascript form for writing the URL to the comic of the day - meaning that it's randomly generated, and that I can't pull it out of the page.

Sorry. You'll have to find another way to get your garfield cravings.
(Reply) (Parent) (Thread)

Re: Offtopic

From: [info]sova
Date: May 18th, 2004 - 02:23 am (UTC) (Link)
thanks. you might wish to update the userinfo on that feed, or something.
(Reply) (Parent) (Thread)

Re: Offtopic

From: [info]sova
Date: May 18th, 2004 - 02:33 am (UTC) (Link)
Oh!!!! It would seem that in their quest to break your feed, UComics swithced to nice URLs like http://images.ucomics.com/comics/ga/2004/ga040511.gif (that's May 11's offering). This maked it all way simpler, doesn't it?
(Reply) (Parent) (Thread)
Tags: 4th of july (2) * alicia (2) * allston st. (5) * apartment (1) * apple (1) * awesome things (3) * bills (1) * biodiesel (1) * birthdays (1) * blasphemy (1) * boston (2) * boy scouts (1) * butterflies (1) * cambridge (7) * cambridge public schools (1) * camping (2) * canobie lake (1) * cars (1) * champaign (1) * christmas (1) * church (1) * commune (5) * communities (1) * commuting (2) * concert (1) * condolences (1) * conferences (3) * coolidge (1) * daily life (39) * ddr (1) * development (1) * diving (1) * drinking (2) * drumm (1) * easter (1) * eating out (1) * education (1) * eeepc (5) * erie st. (1) * erik (1) * evilwm (1) * family (8) * fathers day (2) * firefly (1) * first parish (1) * flickr (1) * flying (2) * foss4g (1) * foss4g2008 (1) * friendly's (1) * friends (1) * gdd07 (1) * geeky (1) * geo (1) * gifts (1) * girls (2) * grand cayman (1) * growing up (2) * hacks (1) * harry potter (1) * head of the charles (1) * hiking (1) * home (1) * hospital (3) * humor (1) * ice cream (1) * internet (2) * introspection (1) * ipod (3) * jess (9) * jessica (1) * jetta (1) * julie (3) * jury duty (1) * kitties (2) * lausanne (1) * license (1) * linux (1) * location (1) * locative (1) * ma (1) * mac (1) * massachusetts (1) * media (1) * meetup (2) * meme (4) * memories (3) * meta (10) * mobile (3) * moving (6) * musem (1) * music (2) * n95 (3) * netflix (1) * new experiences (3) * new house (1) * ning (5) * nokia (1) * office (1) * oneaday (1) * openguides (2) * openlayers (3) * openstreetmap (1) * os x (2) * osm (1) * out and about (1) * packing (1) * parking (1) * party (3) * personal (2) * pete (1) * photography (6) * photos (4) * polls (2) * ponderings (4) * powerbook (1) * presents (1) * python (1) * questions (1) * random (1) * reading (1) * rmv (1) * roller coasters (1) * roy (1) * s2 (1) * s60 (1) * sappy (1) * school (1) * schuyler (1) * sfo (1) * skating (1) * sopranos (1) * spoiler (1) * stc (1) * stupidity (1) * switzerland (1) * tech (12) * the commune (1) * thoughtful (3) * tired (1) * tokyo (1) * travel (7) * travelling (1) * triad (1) * twitter (1) * ubuntu (2) * unpacking (1) * upxiii (1) * usenet (1) * vacation (1) * visa (1) * voting (1) * weather (1) * wedding (4) * wii (3) * work (23) * x (1) *
View previous entry View newer entry

Copyright 2003-2005, Christopher Schmidt