foxfirefey: A series of interconnected dots in the shape of an M. (memewidth)
[personal profile] foxfirefey posting in [community profile] memewidth
So far Dreamwidth has been sorely lacking an equivalent to LJ's fdata, the data file that told you the relationships of a user with other users. Our new equivalent to that will be called edges. Because of the new complexity of DW's relationship structure, and due to a desire to use more standards, this data file will be in the JSON format. The bug for it is Bug 857.

I currently have my proposed patch in. It's not committed yet, or live on the site, but I think it probably will be within the next month. If you want a chance to prepare, I have my patch applied on my development server. It's possible that details will change with feedback, though, so be forewarned! My server has open registration, so you can feel free to create accounts and play around, but I've made a small set of test accounts such as this one. You can view an example edge data file here:

http://www.dev.memewidth.org/data/edges?account=amy

Here is an example of a community's edges file:

http://www.dev.memewidth.org/data/edges?account=bonny_bunnies

The data is in one big hash. There is an "account_type" variable, set to the type of the account. That makes it easy to determine what kind of account you are fetching data for. The other base variables are relationship types, such as "watched", "watched_by", or "member_of", that are a hash of arrays--all the accounts with a given relationship are split up into account types.

Any commentary on this planned data file? Problems you want to fix now, before it's implemented? Any plans for it you want to share?

(no subject)

Date: 2009-08-18 03:24 am (UTC)
zvi: self-portrait: short, fat, black dyke in bunny slippers (Default)
From: [personal profile] zvi
My (extremely cursory) understanding of JSON is that one of the reasons it is attractive is that it's human readable.

The long hash isn't really human readable, I think it would be good to put some whitespace in.

(no subject)

Date: 2009-08-19 08:08 am (UTC)
birguslatro: Birgus Latro III icon (Default)
From: [personal profile] birguslatro
Does this help? (hopefully I've got it right)...
example edge data file...

{
    "maintainer": {
        "personal": [ "beth" ]
    },
    "moderator": {},
    "member": {
        "personal": [ "amy", "beth" ] 
    },
    "watched_by": {
        "personal": [ "amy", "beth", "caitlin" ]
    },
    "account_type": "community"
}

example of a community's edges file...

{
    "trusted_by": {
        "personal": [ "ellen", "gina" ]
    },
    "trusted": {
        "personal": [
            "beth", "caitlin", "ellen", "fiona", "gina", "hayley",
            "ingrid", "janice", "kelly", "margaret", "nina"
        ]
    },
    "watched": {
        "community": [
            "anophalous_ages", "bonny_bunnies", "every_elephant",
            "fickle_feelings"
        ],
        "personal": [
            "beth", "caitlin", "danni", "ellen", "fiona", "gina", "hayley",
            "ingrid", "janice", "kelly", "leala", "nina"
        ]
    },
    "watched_by": {
        "personal": [ "ellen", "fiona", "gina" ]
    },
    "member_of": {
        "community": [
            "anophalous_ages", "bonny_bunnies", "cautious_coneys",
            "fickle_feelings", "great_grapes"
        ]
    },
    "account_type": "personal"
}

(no subject)

Date: 2009-08-18 10:50 am (UTC)
cesy: "Cesy" - An old-fashioned quill and ink (Default)
From: [personal profile] cesy
What kind of things use this data?

(no subject)

Date: 2009-08-18 05:35 pm (UTC)
cesy: "Cesy" - An old-fashioned quill and ink (Default)
From: [personal profile] cesy
Oh, that would be so cool.

(no subject)

Date: 2009-08-18 09:46 pm (UTC)
sofiaviolet: drawing of three violets and three leaves (Default)
From: [personal profile] sofiaviolet
seeing what journals or communities or feeds you had the most circle people watching that you don't

So, like popwithfriends.bml? No lie, I was pondering a suggestion that DW implement some kind of Popular with Your Subscriptions feature.

(no subject)

Date: 2009-08-18 10:06 pm (UTC)
sofiaviolet: drawing of three violets and three leaves (Default)
From: [personal profile] sofiaviolet
Sure. :)

(no subject)

Date: 2009-08-19 08:32 am (UTC)
birguslatro: Birgus Latro III icon (Default)
From: [personal profile] birguslatro
What does this give you that the FOAF file doesn't? Just a more parser-friendly file?

(no subject)

Date: 2009-08-20 11:09 am (UTC)
birguslatro: Birgus Latro III icon (Default)
From: [personal profile] birguslatro
Ah - that makes sense. And FOAF I assume has to be more generic, whereas this can be specifically tailored to DW.

Carry on! :)

(no subject)

Date: 2009-08-26 07:22 am (UTC)
birguslatro: Birgus Latro III icon (Default)
From: [personal profile] birguslatro
I nearly commented before about similarities in format between JSON and REBOL, (my language of choice), but I didn't. But I've just watched a video of a talk JSON's designer gave on the history of JSON, and he mentioned REBOL as an influence, so I wasn't just seeing things! It's a good talk too, so have a look if you've not already seen it...

http://developer.yahoo.com/yui/theater/video.php?v=crockford-json

A full transcript's there too.

(REBOL's problem is it isn't open-source - makes you weep, it does.)

April 2011

S M T W T F S
     12
3456789
10111213 141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags