Joe has published his third draft of a possible API specification. I am working on a Python client-side implementation. REST is so easy, it’s hard, because you expect web services to be complicated, and REST is so uncomplicated, it’s confusing. (Anyone who says RPC-style wrappers are easy has probably never had to debug them. Debugging means removing abstraction layers and looking at the bits on the wire. Everything looks easy once you get your code working properly. REST is easy even before your code works properly.)
The RSS validator now has preliminary support for Pie, based on the 0.1 snapshot of July 1. The validator has been renamed the Feed Validator
to reflect the fact that it now validates both RSS and Pie feeds.
Source code is available here: feedvalidator-1.1.zip. It includes the 700 test cases we use to validate the validator. Be conservative in what you produce.
The new version of the feed validator also fixes the spurious UnicodeError bug reported two weeks ago. Thanks to Sam for figuring it out, writing a test case, and fixing it.
I have updated my ultra-liberal RSS parser to parse Pie feeds, and renamed it the ultra-liberal feed parser
. It still parses RSS feeds. If you’re potentially parsing both, you’ll need to know the different element names of the two formats to know where to look for stuff. Actually, at this point it’s a weird hybrid; feed-level metadata gets returned in the channel dictionary, even for Pie (which doesn’t have a channel element). And the list of entries still gets returned as items, even though they’re a sequence of entry elements in the original Pie feed. But the elements within those dictionaries have the names of the elements as they appear in the Pie feed (or RSS feed, depending).
This is the sort of thing that makes perfect sense if you’ve been engrossed in the formats for a long time, but makes no sense at all to someone who learned about syndication yesterday and wanted to start parsing Pie feeds today. Anyway, the parser works, but it’s a work in progress. At some point I may add an option to normalize the dictionary key names before returning the data, so you could handle both RSS and Pie feeds on a minimal level without having to know the differences between them.
People have asked me whether I plan to drop support for RSS from the ultra-liberal feed parser. The answer is no. Be liberal in what you accept. Or ultra-liberal, as the case may be.
Update: the name Pie
is not set in stone. We have not reached consensus on a name. I’m just tired of calling it (not-)Echo
.
Update 2: for about an hour this morning, the text of this entry was deleted and replaced with the text of a deleted (off-topic) comment. It doesn’t appear to be a hack attempt, and I didn’t make a copy-and-paste error, so I’m chalking it up to a weird Safari + MT bug. No matter. The topic of the day is Pie. Comments on all other topics will be deleted as off-topic.
§
[The following is reposted from Sam Ruby's blog since no one answered my question there]
I’m too busy with work and play (RSS Bandit/BlogX) to track the Echo project so I have a question. Currently I’ve only seen proposals for a RESTful Echo API, what about a SOAP API?
More importantly what is the plan for allowing extensibility of the API. As it stands the proposed API is minimally functional and doesn’t hit the 80/20 mark for what I’d like to expose to blog posting clients from BlogX. I can think of a number of extensibility mechanisms using XML Web Services technologies and would like to ensure they are not overlooked for the RESTful API.
http://www.fishrush.com/warnocksdilemma.shtml
— Joe ![]()
Maybe it should be called “Feed” instead of Pie or (n)Echo.
— ralph ![]()
Dare,
this is my soap/rss rpc which i’m adding echo too
http://www.kbcafe.com/iBLOGthere4iM/comments.aspx?guid=20030709143822
if you are interested in collaborating Dare, I’d appreciate it.
— Randy ![]()
I like Pie.
— Arthur ![]()
Randy,
Like my post says I’m too busy to track this stuff let alone work on it. All I want to make sure, is that when I do finally have time to work on this that it would already have been taken care of by the Echo API instead of me coming up with my own solution.
Mark: the validator seems to be very confused in parsing the dates in my Necho feed. I get a bunch of messages like “modified must be an ISO-8601 date” and “Date should include a timezone”; however, the modified date is an ISO-8601 date:
“[modified]2003-07-12T02:07:08-0500[/modified]”
(Angle brackets replaced with square ones.)
It also complains about the [email] tag in the [author] tag, even though [email] appears at http://www.intertwingly.net/wiki/pie/Syntax
To repeat, visit: http://feeds.archive.org/validator/check?url=http%3A%2F%2Fblog.lordsutch.com%2Frss%2F%3Fnecho%3D1
Thanks for the validator!
Chris,
Your timezone needs a colon.
Is there any need to include support for pie in the ultra-liberal feed parser? I thought that the whole reason for that parser was because the RSS specifications were confusing and lots of generators were doing it wrongly.
I didn’t think this was going to be a problem for pie. Is it really a good idea to put a pie parser out there that doesn’t even conform to the XML specification?
Valid PIE being generated by blojsom (http://blojsom.sf.net) and on my blog
http://www.blojsom.com/blog/blojsom/?permalink=ECF55A3157D963A9543DD22DE65618A9.txt
And the necho feed validation: http://feeds.archive.org/validator/check?url=http://www.blojsom.com/blog/?flavor=necho
Thanks again for all the work on the FEED validator as it did spot an error we had in the timezone which is now fixed.
Chris, I ran into the same issue with the missing colon in the timezone. Oddly, the PHP date() doesn’t seem to support this.
Here’s a little workaround we used (PHP):
// Output timezones in iso-8601 format.
$tz = date(”O”,sqldate($postdate));
$tz = substr($tz,0,3).’:’.substr($tz,3);
echo “<dc:date>”.date(”Y-m-d\TH:i:s”,sqldate($postdate)).$tz.”</dc:date>”;
Mark - sorry for the tangent.
The no-colon thing would be a good note to add to the documentation, esp. if PHP doesn’t support it natively.
— Mark ![]()
OMG. I used to think I was a geek but you guys take the biscuite (in a good way). I have no idea what you are talking about Mark but keep up the good work anyway. ;-)
Mark: Just for confirmation, I have encountered the “deleted comment as entry body” bug in Safari as well. Freaked me out the first time I saw it.
— Paul ![]()
Steven, you can simplify that ($time holds the current time):
$iso8601 = “Y-m-d\TH:i:sO”;
echo substr_replace(date($iso8601, $time), ‘:’, -2, 0);
Hmmm I’m not sure if it’s the validator or my feed which has a problem…
http://feeds.archive.org/validator/check?url=http%3A%2F%2Fwww.la-grange.net%2Ffeed.rdf
UnicodeError
Python 2.2.1: /usr/bin/python
Sat Jul 12 09:49:01 2003
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
Mmm! Pie…
One thing that’s been confused me is that with these RSS-to-pie converters, are there assumptions made that turn the loose RSS structure into a tighter pie structure? That is, if it’s possible to do a straight conversion, then could people continue to send out RSS and still participate in any future pieways? Or am I missing something?
Also, is anyone converting RSS to pie and then the resulting pie feed back to RSS? If so, does it come out the same or is it more like one of the Babelfish/telephone experiments?
— xian ![]()
I don’t put a lot of weight in all of these little RSS converters that are popping up. They’re probably about as accurate as reading CNN through Babelfish. And converting the result back to RSS is probably as accurate as running CNN through Babelfish twice.
Writing a format translator is hard. Very few developers really understand all the issues well enough to pull it off. Many of the ones who have tried have undeclared biases or blind spots, and will therefore either generate bad or invalid Pie or will miss many perfectly valid RSS structures. The last one I looked at didn’t even always generate well-formed XML. Your mileage may vary.
— Mark ![]()
I have very little patience for people who claim they don’t have enough time to participate, but seem to have enough time to read the entire draft and repeatedly make vague complaints like “well, it doesn’t really hit the 80/20 mark.” What the hell does that mean? You’ll be calling it “funky” next.
Don’t like something about Joe’s draft? You have several options. You can discuss it on the wiki. You can write up your thoughts on your own site, and link it in from the wiki. You can send Joe camera-ready copy of language you’d like to see in the next draft and convince him why he should accept it. You can make your own draft from scratch and argue for it on its merits. Or you can forget the whole thing and accept whatever decision the rest of the community comes up with.
What you can *not* do is simultaneously complain and do nothing. This is a meritocracy. Put up or shut up.
— Mark ![]()
>I have very little patience for people who claim they don’t have enough time to participate, but seem to have enough time to read the entire draft
I have little patience for those that think that others do not have day jobs or valuable things to do with their free time beyonds chase their pet projects.
>Or you can forget the whole thing and accept whatever decision the rest of the community comes up with
I don’t have to accept anything dictated by “the community” especially if no one is representing my interests in this “community”.
Besides, he who writes the code makes the rules. Roy Fielding has a good quote about this in the bottom of his email at http://lists.w3.org/Archives/Public/www-tag/2003Jul/0057.html
>What you can *not* do is simultaneously complain and do nothing.
Wrong. I can do whatever I want.
Buh bye, Dare! Have fun playing in your little RSS ghetto. Let me know when you get a Winer Number for using RSS for something it’s not designed for. It’s just a syndication format, didn’t you hear? You’re trying to make it into something else, and you’re gonna get bitchslapped for it. Everyone does eventually; it’s just a matter of time. Don’t say I didn’t warn you.
— Mark ![]()
You and Dave Winer make a perfect match Mark - obnoxious when it’s uncalled for, childish at many points.
You have no idea of the history behind this discussion, James. Since day 1 of this project, Dare has been all “hey, I wanna play” and then “no, screw you guys, I’m gonna go do my own thing”. And then something interesting happens, and he’s all like “hey, I wanna play… no, I’m gonna go do my own thing.”
To paraphrase Bender, “I’m gonna build my *own* syndication format… with blackjack, and hookers. In fact, forget the format.” Funny the first time, gets old quickly. I’ve heard it from Dare 4 times now in 3 weeks; it’s getting really old.
Dare, if you want to do your own thing, please go do it. Elsewhere. I wish you the best of luck. I really do. Meanwhile, we’re going to continue doing interesting things over here. You’re welcome to look over our shoulder while we play, but unless you have something more constructive to contribute than “move faster, shoot better”, I don’t really want to hear it.
— Mark ![]()
Mark,
I have better things to do with my time than engage in online mud slinging matches with you. I’m interested in technology for what it can do for me and my users not as a way to engage in petty ego gratifying yet petty online flame wars.
It seems you cannot handle honest criticism and lash out if not lavished with obedience and mind numbing conformance to your view points. I have not flip flopped in my views (it makes sense to integrate blog posting APIs, blog syndication and blog archiving formats) all I’ve done is question how the Echo project has gone about achieving this goal.
Anyway, I’ve gotta go. Presidents of the USA have probably already started playing at http://www.capitolhillblockparty.com/
Take care.
“It doesn’t hit the 80/20 mark” is not criticism. At least, it’s not useful criticism. Come up with something useful and we’ll all listen to you. Sit around repeating the *exact same* vague complaints over and over (while simultaneously complaining that you don’t have enough time to participate, or even check for yourself to see if your question has already been addressed) and we’ll ignore you. It’s really not that complicated.
— Mark ![]()
Mark,
Realize that I’m an outsider to this stuff between you and Dave - and realize that from here, you end up looking like someone working real hard to move down to his level. Mind you, Dave comes off the same way. In other words, as an objective outsider, you both look childish. Dave’s faux shutdown of scripting news may have been pathetic, but the Winer watch and the pedantic playing with links and GUIDs looks the same from where I sit.
What it boils down to is this - there’s no way to tell who’s “right” and who’s “wrong” anymore. You both just look silly.
Mark, Steven: thanks! Add mxDateTime in Python to the list of ISO-8601 generators that misbehave :-)
Update on my comment above about getting PHP to output ISO-8601 dates: apparently the Pear Date class is compliant by default: http://pear.php.net/package-info.php?package=Date
James, you realize I’m talking with Dare here, right? Not Dave.
Re: links and guids. Da*v*e has made it quite clear that *he* is the *only* arbiter of what RSS is or is not. There are many good technical reasons why we are creating a new format (and API), but if you dig deep enough, you’ll always find Dave putting himself at the center of the problem, standing in the way of *any* sort of progress, *any* sort of innovation, *any* sort of usage of RSS that doesn’t personally please him or flatter him. He said we could use namespaces, then later started making up new rules about *how* we could use them.
http://backend.userland.com/davesRss2PoliticalFaq
He said the validator was a great idea, then later decided it was the spawn of the devil.
http://grumet.net/weblog/archives/000118.html
He said guids were just unique identifiers, then later said that guids should be permalinks, and that they should be the *only* representation of permalinks.
http://scriptingnews.userland.com/2003/06/25#theLizardBrainOfRss
And then later (when it was revealed that this would break, like, everything in the known universe) said “no no, you misunderstood, I wasn’t writing spec text, i was just expressing my personal opinion”.
http://scriptingnews.userland.com/stories/storyReader2101
(Another of his “personal opinions” is that everyone in the world must do RSS *exactly* as UserLand does. Don’t agree? Then he’ll intentionally sabotage your formats and APIs by embracing and extending them. http://blogs.law.harvard.edu/bloggingFormatsProtocolsMay2003 )
I give up. Keeping up with the ebb and flow of how RSS changes radically from one day to the next is a full-time job. I gave it my best shot, to do RSS exactly as UserLand does, and if it’s *still* not perfect, well screw it. I give up.
You win, Dave. You can have your little format; you can have your little name-you-tried-to-trademark-once; you can play your own little games in your own little sandbox and pretend you’re king of the world. (And Da*r*e, you are welcome to go try to play in that sandbox too. Careful, Dave kicks sand when you’re least expecting it. Don’t say I didn’t warn you.)
I’ll be over here, working on a truly open format, a truly open API. I refuse to be an RSS sharecropper anymore.
— Mark ![]()
I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)
§
firehose ‧ code ‧ music ‧ planet
© 2001–8 Mark Pilgrim