[NETCONF-718] Switch to using asynchronous JAX-RS interface Created: 03/Aug/20  Updated: 10/Oct/23

Status: Confirmed
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Improvement Priority: High
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: pt
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by NETCONF-1125 Remove PutDataTransactionUtil Resolved
is blocked by NETCONF-1126 Remove PostDataTransactionUtil Resolved
Sub-Tasks:
Key
Summary
Type
Status
Assignee
NETCONF-1155 Make RestconfDataServiceImpl.readData... Sub-task In Progress Robert Varga  
Epic Link: Rewire restconf-nb

 Description   

Current RESTCONF implementation is utterly blocking due to its declared interface towards JAX-RS. This can be fixed with use of @Suspended, so that the implementation properly composes MD-SAL operations and notifies JAX-RS when the result is done.



 Comments   
Comment by Robert Varga [ 11/Jan/23 ]

We need parts of the patches introduced here, but overall this is getting a bit moot with adoption of https://github.com/eclipse/jetty.project/issues/8007 – i.e. once we have Jetty 10. Once we have Java 21 (assuming Loom makes it there as production feature), we just need to make sure it is configured accordingly and then we can revert to sync interface.

If this crops up and we still do not have above, the migration still makes sense to conserve threads.

Comment by Robert Varga [ 10/Sep/23 ]

So JEP-444 is in Java 21, but our adoption quite some time away.
That actually does not make this issue as moot as it would appear, as the async interface allows us to cleanly perform error mapping, e.g. not rely on ExceptionMapper and having RestconfDocumentedException be a proper checked exception.

Comment by Robert Varga [ 10/Sep/23 ]

For reasons of sanity, we need to integrate putData()/postData() into RestconfStrategy first.

Generated at Wed Feb 07 20:15:43 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.