#social 2017-07-14

2017-07-14 UTC
#
saranix
Happy 1.5 billion seconds everyone
#
ajordan
hahaha saranix I *almost* put that into this channel :D
#
Loqi
rofl
#
ajordan
happy 1.5 billion seconds to you too!
#
saranix
lol
#
Loqi
Now: 2017-07-14 04:00:35 UTC Unixtime: 1500004835 Stardate: -305468.3886137 NewCal: 2017-4-12, New Tuesday, the 12th day of the fourth bim
#
xmpp-social
[ajordan] Hahahahaha
#
Loqi
hehe
prtksxna and xmpp-social joined the channel
#
ajordan
figured you'd appreciate that given our discussion earlier today P
#
ajordan
s/P/:P/
#
puckipedia
so I was thinking, it'd probably be possible to limit the overhead of string IDs by having a map [uri -> internal id] and another map [internal id -> object data]
#
puckipedia
e.g. on my test instance two 8-bit ints would be 16 bytes, and the entire two ids concatenated would be 96 bytes
#
puckipedia
assuming e.g. mastodon.social, and everyone on there follows 10 people and everyone exactly posted the average statuses ... just the table mapping entities to collections would be 2GB
#
ajordan
puckipedia: overhead?
#
ajordan
cwebber2: just started reading the Uses This interview you did
#
ajordan
"birdsite"
#
ajordan
love it :D
#
puckipedia
ajordan: I mean, e.g. my collection table is in the format [https://lol.puckipedia.com/users/puckipedia/outbox contains https://lol.puckipedia.com/puckipedia/status/asdfasdf]
#
ajordan
and am gonna steal it and use it (reminds me of "the orange site"
#
puckipedia
if I were to store the ID string separately and give entities an integer primary key I could store it like [12312 contains 898373]
#
ajordan
ah so the string is kinda unneeded when you could just use a number? is that the concern?
#
ajordan
right gotcha
#
puckipedia
and then of course I could improve efficiency of storing by, just before serializing the data into the table, replacing ID strings with their internal representation (if possible)
#
ajordan
definitely do what you think is best BUT my outsider's perspective, not having looked at your implementation, is that that sounds like premature optimization
#
puckipedia
hm, could be
#
ajordan
¯\ (ツ) like I said I obviously don't know your constraints
#
ajordan
so if you think it's worth it by all means go ahead!
#
puckipedia
well, I would like to figure out if it would give a performance boost (because I don't know how well postgresql likes text/varchar as primary key)
#
puckipedia
okay :< let's not do that for now
#
puckipedia
git reset --hard
#
ajordan
puckipedia: git checkout -b ;)
#
puckipedia
tbh I just pressed "undo changes" in visual studio
#
ajordan
hahahaha
#
Loqi
nice
#
ajordan
mv activitypub.cs-backup-final-FINAL-draft2-dbtestFINAL.bak activitypub.cs
#
puckipedia
let's build an admin entity info screen
prtksxna joined the channel
#
puckipedia
. o O ( activitypub over gopher )
#
cwebber2
ajordan: :)
prtksxna joined the channel
#
puckipedia
cwebber2: huh, I looked at init-as-objects.sql in pubstrate
#
puckipedia
and well, that's also a way to fix it :P
#
cwebber2
puckipedia: oh that file's unused...
#
puckipedia
well, I was just wondering, but the idea of having a bigserial id, then the id is just an index inside the jsonb
#
cwebber2
puckipedia: currently pubstrate uses a series of gdbm files
#
cwebber2
eventually it'll use postgres
#
cwebber2
that was from an experiment
#
cwebber2
pubstrate was originally a series of experiments and only accidentally became serious, there's stuff I need to clean up from the old days :)
#
cwebber2
puckipedia: but anyway, is that a good idea or bad idea? i dunno, I need to revisit it :)
#
puckipedia
cwebber2: that depends, I wonder if PostgreSQL can optimize on id retrieval? If I were to do this in Kroeg I'd add a computed column(is that a thing?)
#
puckipedia
reasoning is mostly because I use an ORM, Entity Framework Core, and hack it to do some jsonb queries
#
puckipedia
optimally I should make a small query rewriter that can rewrite e.g. .Where(a => a.Data["object"].Contains("https://example.com")) to "where \"SerializedData\" @> '{"object": "https://example.com"}'::jsonb"
#
puckipedia
so currently on my Update blacklist is attributedTo, created, id, deleted, type, object, and actor
#
puckipedia
ooh bleh trying to federate with distbin is a clusterfuck
#
puckipedia
... Kroeg somehow started to generate its own IDs for distbin items
#
puckipedia
because they don't have IDs in distbin itself :<
#
puckipedia
I should probably refuse to generate IDs when flattening remote items
#
Loqi
definitely
#
puckipedia
fixed that
#
puckipedia
... :D: I broke distbin by replying to a Kroeg post
#
puckipedia
https://distbin.com/activities/be734dc2-3a3b-4487-a835-6913d9c19cb5.json I can guarantee users/puckipedia has an inbox
#
puckipedia
it's just that it GETs it with the wrong accept header
#
puckipedia
application/ld+json; profile="https://www.w3.org/ns/activitystreams#"
#
Loqi
[Amy Guy] ActivityStreams 2.0 Terms
#
puckipedia
well it's a MUST in ActivityPub spec that the Accept header must be correct. it isn't, so..... :PPP
#
puckipedia
"A key-value pair in the body of a JSON-LD document whose value is null has the same meaning as if the key-value pair was not defined."
#
puckipedia
well
#
puckipedia
Q: how can "An ID explicitly specified as the JSON null object, which implies an anonymous object (a part of its parent context)" work then?
#
saranix
puckipedia: postgres can index on text columns just fine (default is btree hashtable-like index). varchars are crappy for other reasons, avoid them, always use text instead. I didn't understand the other pg ques but also FYI pg has jsonb indexing too
#
puckipedia
ah, right
#
puckipedia
huh. id being null is invalid?
#
puckipedia
... yuup
prtksxna_ joined the channel
#
puckipedia
I can read the mastodon activitypub data, and probably even process it
#
Loqi
[Amy Guy] Social Web Protocols
#
Loqi
[strugee] #51 Correct AS2 spec URL
#
ajordan
thx :)
#
saranix
ajordan++
#
Loqi
ajordan has 13 karma
timbl and ben_thatmustbeme joined the channel
#
ben_thatmustbeme
Wouldn't count on postactiv for AP then either
#
xmpp-social
[ajordan] Wow
#
xmpp-social
[ajordan] Wouldn't do it myself but I certainly sympathize