Hi Yuri, (dropping dev@, definitely a users question)
Thanks for your interest! On Thu, May 31, 2018 at 4:16 PM, Yuri Simione <[email protected]> wrote: > ...I would like to use Sling for other back-ends, not limited Jcr > repositories: how strong > is the relationship between Sling and Jcr? How hard is a new Sling > implementation > that also manages graph or document databases? ... For historical context: when we created Sling back around 2007 there were already Way Too Many Java Web Frameworks (TM) around, so we decided to focus Sling on JCR as a differentiator - while avoiding to hardcode that decision. And I suppose the vast majority of Sling users are using it with JCR today. However, JCR hasn't taken over the world, mostly due (IMO) to the arrival of NoSQL databases just when JCR and its implementations became mature - so it makes perfect sense to use Sling with other backends. We've been working on this, on and off I'd say, and in theory it is perfectly possible to run Sling without JCR. In practice, however, I see two things that might get in the way: 1) As few people are using Sling without JCR, and we don't run a non-JCR integrations test suite there are probably some assumptions or defaults that will cause some problems 2) As JCR provides lots of functionality out of the box, like search, versioning, access control etc. you will have to find alternatives for those things if you need them. Some of our contrib modules might help. As starting points I suggest: a) Playing with the ResourceProvider concept, https://sling.apache.org/documentation/the-sling-engine/resources.html - the planets example there is dead simple, but for read-only resources. b) Playing with the NoSQL ResourceProviders, https://sling.apache.org/documentation/bundles/nosql-resource-providers.html c) Maybe starting with a prototype that still uses JCR in places where Sling really requires it (which hopefully are very few, or maybe even none at all? Haven't tried myself lately) but uses another backend for your application content, mounted as a ResourceProvider. d) Maybe using a [nojcr] subject line header if discussing here, to help raise attention It would be fantastic to have concrete examples of Sling running on non-JCR backends! HTH, -Bertrand
