w3c-social/activitypump-server

Implement storage

evanp opened this issue · 1 comments

We can implement, hopefully, simplistic in-memory storage. Maybe a big hashtable thing with one entry per user, each entry having that user's profile and relevant streams (JSON example):

    {
        "cwebber": { ... },
        "jessica": { ... },
        "evan": {
            "preferredUsername": "evan",
            "displayName": "Evan Prodromou",
            "summary": "A great guy",
            "icon": "http://example.com/images/evan.jpg",
            "following": ["cwebber", "jessica"],
            "followers": ["cwebber"],
            "inbox": [1, 3, 9, 22, 50],
            "outbox": [3, 22],
            "faves": ["object1", "object2"]
         }
    }

So, I threw in a "users" global, and although Go maps are weird, I think it works OK.