New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ability to list admin comments/queries about an entity #586

Open
GKFX opened this Issue Jan 26, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@GKFX
Copy link
Member

GKFX commented Jan 26, 2019

Currently when querying some aspect of a show it's necessary to send an email, most straightforwardly from a personal account to the show admin's personal account, which is a bit clunky. It would be nice to add a simple comments feature to entities to bring this discussion onto the site, meaning all show and site admins could see it.

In terms of implementation, a JSON array of comment objects of the form

{
    'authorid': 68,
    'time': '2019-02-01T14:08:09',
    'content': 'blah',
    'replies': [ <More comments> ],
}

could be attached to each show object; it wouldn't be expected to grow very large. This is kind of dependant on #548 to make it notify users in a sensible manner.

@GKFX GKFX added this to the Future milestone Jan 26, 2019

@philosophicles

This comment has been minimized.

Copy link
Member

philosophicles commented Jan 26, 2019

I agree this would be a useful feature.

Regarding implementation, I am less sure about leaning on JSON within SQL table fields. I'm dimly aware we did this somewhere else recently and I recall seeing a decent reason for it in that case. Here, an extra SQL table (joining to shows) seems to me like it'd work just fine?

Just because our RDBMS can handle JSON doesn't mean we should... my experience with embedding any kind of plaintext data structures within SQL (JSON, XML, etc) leads me to worry that it will become more of a headache in time. The KISS principle might apply here.

I'm not inherently anti-JSON for data storage (e.g. document NoSQL databases) - it's just a very different paradigm to relational tables.

@hoyes

This comment has been minimized.

Copy link
Member

hoyes commented Jan 27, 2019

The idea sounds great, but I agree we should try and pick RDB or NoSQL and try not to mash up the two within the same DB too much. I realise it's first-class JSON support and not plaintext persay, but the functionality looks a little new and it's generally a good idea to be a little cautious of new features until they're more widely adopted. I don't see MariaDB/MySQL ever going full-NoSQL. The JSON struct you describe should work equally well as some sort of "acts_shows_comments" table.

It's trendy these days to think about such things in terms of isolated services. E.g. you could have a "comments" API backed by its own datastore (which could be RDB or NoSQL), and have either the frontend or PHP backend query this API and render the content. Might be overkill for this (and Antigone isn't really set up for this sort of deployment) but might be worth considering in the wider context of stuff discussed on #548, #512 and #87

@GKFX

This comment has been minimized.

Copy link
Member Author

GKFX commented Jan 27, 2019

I’m more than happy to go with both of your judgement on storage, I’m not at all experienced in these things :)

Isolating it off as a service is an interesting thought, and maybe wouldn’t be too challenging either; there might well be a project that already does this. Implementing a chat system from scratch does feel a bit like reinventing the wheel!

@CHTJonas

This comment has been minimized.

Copy link
Member

CHTJonas commented Jan 27, 2019

All sounds good, agree with everything said here regarding storage. I did have a brief think about integrating a similar idea into our fork of Brimir a while back but decided against it as it wouldn't allow venues and societies to query stuff, only ourselves. But this definitely sounds like a better idea! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment