arne-bdt commented on issue #1961: URL: https://github.com/apache/jena/issues/1961#issuecomment-1662963253
Although I initially didn't plan to share this, given our ongoing discussion, I believe it's appropriate... I'm currently developing a thread-safe graph for Jena, which supports a multiple-reader plus single-writer (MR+SW) model. The existing implementation in Jena is based on [Dexx collections](https://github.com/andrewoma/dexx), which are "a port of Scala's immutable, persistent collection classes to pure Java." This approach has numerous advantages, such as simple implementation, minimal locking requirements, and robustness. However, its main drawback is its poor performance and heavy reliance on the garbage collector. My goal is to offer an alternative that should provide better performance. However, as this new model isn't based on immutable persistent collections, it's quite a delicate endeavor. These graphs could form the foundation for an alternative thread-safe Dataset implementation. Therefore, they could potentially be used in Fuseki. Please note that this is a work in progress and may take a few more weeks (or potentially months) to develop. It's still in an early stage and may need several rounds of refactoring. The current state of development suggests that my plan can be successful. Even considering the overhead of locking, thread-local variables, and some duplicate operations, this implementation can significantly outperform existing ones (as always, this will depend on specific use cases). For anyone who can't resist a sneak peek, you can check out the progress at: [https://github.com/arne-bdt/jena/blob/SWMR_Dataset/jena-arq/src/main/java/org/apache/jena/sparql/core/mem2/GraphWrapperTransactional.java](https://github.com/arne-bdt/jena/blob/SWMR_Dataset/jena-arq/src/main/java/org/apache/jena/sparql/core/mem2/GraphWrapperTransactional.java) Please be patient with me if my approach ends up not being successful. I'm doing my best to tackle this, but there's a high risk of failure. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
