Opened 12 years ago
Closed 4 years ago
#543 closed enhancement (no-action)
atom feed IDs: reevalaute taguri
Reported by: | Elrond | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
Our atom feeds use taguris (RFC 4151).
First thing to re-evaluate: Do we want to/have to use taguris in this place?
There might be good reasons to want this.
taguris have the form {ownerid_namespace}:{localpart}
. This is so they are human generatable AND universal unique. the {ownerid_namespace}
is formed of {DNSname_or_email},{date}
. The date is the time when the domain/email was owned by the author. This is so that a domain can go to a new owner, which in turn has a new namespace.
For feeds owned by a user, we can use the registration date of the user. We currently use the *current* year. Which is plain wrong. Because the id should never change after first being shipped. So this should be fixed soon.
For site feeds we currently use 2011 as the date. We probably should switch this over to something like the "deploy date". The problem is how to find out about it. We could use the date of the oldest entry in the db, but that will change when the oldest image gets deleted by the owner. ("You may not delete the master goblin image.", hoho). No easy solution currently available.
Change History (7)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
I never understood why we are not simply using the feeds URL for the id tag as is done so often, so thanks for the link to RFC 4151 for the justification. I have to say that even after reading of the RFC I remain unconvinced of the advantage of RFC 4151. The main selling argument over an URL seems to be that you can change the id when the domain owner changes hand.
Well, the domain changing hand and the feed URL remaining at the exact same location as before is certainly more of a fringe case in my book than the added complexity thinking about years, uuids and whatnot. Even if it changes hands, we'd need to either manually fudge the tag years or include logic to always calculate the correct year based on deployment (and making sure this value does not change on reinstalls or version upgrades!)
I am +1 for KISS and simply using the feeds URL as id. It is globally unique and remains across version upgrades. The feed tag not changing when the domain owner changes, that should be the least of our worries for now.
comment:3 by , 12 years ago
Lazily attaching this information:
22:52:17 < joar> if we were to use a GUID, we'd have to store that with the collection 22:59:22 < Elrond> 22:55 <joar> http://www.ietf.org/rfc/rfc4287, section 4.2.6 22:59:46 < Elrond> Can you add that to the bug? That's the one telling us, that we need something uuid-like. 23:00:08 < Elrond> ... and taguris are better than storing yet another crappy DCE-UUID.
Also, diff for proposed solution:
-
mediagoblin/user_pages/views.py
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index dea47fb..8602c58 100644
a b def collection_atom_feed(request): 539 539 'href': push_url}) 540 540 541 541 feed = AtomFeed( 542 "MediaGoblin: Feed for %s's collection %s" % (request.matchdict['user'], collection.title), 543 feed_url=request.url, 544 id='tag:{host},{year}:collection.user-{user}.title-{title}'.format( 545 host=request.host, 546 year=datetime.datetime.today().strftime('%Y'), 547 user=request.matchdict['user'], 548 title=collection.title), 549 links=atomlinks) 542 "MediaGoblin: Feed for %s's collection %s" % 543 (request.matchdict['user'], collection.title), 544 feed_url=request.url, 545 id=u'tag:{user}@{host},{year}:collection.slug-{slug}'\ 546 .format( 547 host=request.host, 548 year=collection.created.strftime('%Y'), 549 user=request.matchdict['user'], 550 slug=collection.slug), 551 links=atomlinks) 550 552 551 553 for item in cursor: 552 554 entry = item.get_media_entry
comment:4 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → in_progress |
Okay. I'll revisit this fully the next week. I need to reread a bunch of things and understand them.
comment:5 by , 10 years ago
Owner: | removed |
---|---|
Status: | in_progress → accepted |
Okay, I have no idea, what's going on here, I am completely out of the loop. Someone else should revisit this.
comment:6 by , 9 years ago
Type: | defect → enhancement |
---|
comment:7 by , 4 years ago
Resolution: | → no-action-required |
---|---|
Status: | accepted → closed |
Closing this ticket - seems to be a low-priority enhancement. As far as I can see we're just using URLs in the feed.
I vote: