GitHub user zuozhiw added a comment to the discussion: Improvement: Treat 
TexeraAgents as access-controlled Resources, just like other resources 
(workflows, datasets and computing units)

this is a natural step to add persistence,  the table schema overall looks good 
, some comments on the DDL
```
    aid           UUID PRIMARY KEY,
    uid           INT NOT NULL,
    name          VARCHAR(128) NOT NULL,
    model_type    VARCHAR(256) NOT NULL,
    config        JSONB NOT NULL DEFAULT '{}'::jsonb,
    react_steps   JSONB NOT NULL DEFAULT '[]'::jsonb,
    creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE
```
- add a last updated time column
- consider rename uid to createdby_uid
- consider rename `name` to `title`
- think about the alternative of using a separate table to store messages and 
one message per row, because if we store messages in a big json blob, every 
time don't we have to like read and write the whole history? one row per 
message might be more efficient so that we can just do append. Furturemore, in 
that table each row can include some message metadata, also we can build index 
on messages if we ever want to search them. just a suggestion
- also I have a question on the format of react steps, what's the format of 
this? I would highly recommend we don't invent our own format, instead we just 
reuse existing format, e.g., if vercel has some format can't we just use that?

after we store the created by user id access control should be fairly simple 
and reuse whatever we have right now.


GitHub link: 
https://github.com/apache/texera/discussions/5302#discussioncomment-17198750

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to