-
Notifications
You must be signed in to change notification settings - Fork 50
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
Publisher Points Table #1482
base: main
Are you sure you want to change the base?
Publisher Points Table #1482
Conversation
This fixes #1468 |
I think there is zero purpose to having a name property for every published point. Re. readPermission, setPermission and enabled. These are new features that are unnecessary IMO. Lets keep it simple.
I think it is a good idea to use JSON instead of Java serialized binary data. We definitely should store a version property, however I am not willing to dig right into this right now. I think another area we should look at is using a JSON data type column where supported, e.g. MySQL
Again, not sure we should import/export them separately like this.
We should definitely allow adding/removing published points from a publisher without restarting it. |
Pretty sure you linked the wrong issue here? |
@jazdw yes, wrong issue. I updated the comment to refer to the correct issue. |
I agree about the name. The id would be used like a data point id, if one wanted to update a single published point. I'm open to discussion on this. The xid would be used during import to update the configuration for a published point that already exists. Consider a ModbushPublishedPointVO that has settings beyond what is in the base class. Since we want to be able to add/remove points from a running publisher without restarting it I assumed we would also want to be able to able to modify a running published point. This implies that one could use the JSON Import feature to do this, but I guess this isn't necessary. Before going any further I think we should discuss what we are trying to achieve with this change. Specifically if we need anything other than a nice way to query publisher points and add/remove them from a publisher while it is running without restarting it. I'd also like to know the types of queries we will be doing from the UI as I suspect we will want to join on the dataPoints table to be able to query the source point's settings. |
Upon further investigation I think we can get away with extending AbstractBasicVO which only requires an id field. This will give us access to the AbstractBasicDao that allows RQL and JOOQ conditions. |
Many things outstanding, this is just a proof of concept for H2
05d3376
to
8b143eb
Compare
This is a proof of concept with a JUnit test for H2
The following fields are added to every point as they come for free with a AbstractActionVO:
Do we want to add:
NOTES:
The ‘data’ column stores JSON instead of binary data. I used a CLOB type like the Advanced Scheduler. One point of interest is how to do versioning with module based extension of a PublishedPointVO, I took a crack at it but would like someone to review this.
The upgrade code does not exist yet, the plan is to set all points to enabled and the name to be the data point name.
The legacy JSON for a publisher will need to be supported in addition to a new export of publisherPoints. This will work in the PublisherImporter by checking for the ‘points’ JSON and then importing them separately. i.e. the publisher’s jsonRead method will ignore the ‘points’ JSON and this will be handled in the importer logic.
I will likely add generics to the PublishedPointDao
It is implied that you can save each point individually now, so we will need to modify the RuntimeManager and Publisher RT to support start/stop/restart of published points. But if we don't expose this via REST we can push this off till later if desired.