Skip to content

ServiceEnhancer Improvements#3706

Draft
Aklakan wants to merge 1 commit intoapache:mainfrom
Aklakan:20260118-serviceenhancer
Draft

ServiceEnhancer Improvements#3706
Aklakan wants to merge 1 commit intoapache:mainfrom
Aklakan:20260118-serviceenhancer

Conversation

@Aklakan
Copy link
Contributor

@Aklakan Aklakan commented Jan 19, 2026

GitHub issue resolved (TDB)

This is a long standing revision of the service enhancer module. It can go into a dot release after jena 6. There are a couple of places that seem odd to me and which I want to give another look.

Pull request Description:

Code maintenance:

  • Migrated to Junit 5 / Jupiter
  • Migrated to Caffeine Cache (instead of Guava Cache - The Guava dependency is still needed for RangeMap though)
  • Refactored the core cache execution class RequestExecutor to support read-transaction-aware concurrent execution.

Bug Fixes:

  • The Service Enhancer assembler now supports the standard ja:dataset property instead of the custom ja:baseDataset. Use of the latter still works but now raises a warning.
  • Fixed a bug with the plugin that caused colons at the end of URLS to become removed (SERVICE <https://.../foo:> became SERVICE <https://.../foo>)
  • Fixed a bug where result sets could become cut off due to concurrent cache eviction. Typically this bug occurred when using SELECT ... LIMIT X where X was slightly larger than the maximum cache size.
  • Introduced context constants (that match that of the assembler) to configure cache sizes. As a side effect, Service Enhancer Cache initialization is now lazy in order to have a chance to read the config from the context. Once created, the settings are fixed.
  • Iterators that cache data should now honor the abort signal.

New Features:

  • Added scoped option for loop (SERVICE <loop+scoped:>) to mimic the behavior of LATERAL - when scoped is set, then only in-scope variables become substituted instead of all variables with the same base name.
  • Added experimental concurrent feature. There is an example in the class ServiceConcurrentExample. Essentially, it allows one to do SERVICE <loop+scoped:concurrent+2-10:bulk+10:cache:https://example.org/sparql>: Use 2 additional threads with 10 bindings each, to build bulk requests of 10 bindings, caching the responses to query the specified sparql endpoint. Concurrent requests try to preserve the order of bindings. Of course, one must be cautious not to flood public endpoints. The feature is intended as a tool to improve query federation performance over endpoints that one controls.

  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@Aklakan Aklakan marked this pull request as draft January 19, 2026 12:26
@Aklakan Aklakan force-pushed the 20260118-serviceenhancer branch from c3a88b9 to 33f1a03 Compare January 23, 2026 11:40
@Aklakan Aklakan force-pushed the 20260118-serviceenhancer branch from 33f1a03 to f1520d1 Compare February 4, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant