Intending to retrieve info from a noSQL database

Hello !

We intend to build a two-side application, one side constituted by xwiki, the other by a js/react application dealing with a noSQL (couchDB) database. The xwiki part is working all right but now we’d like to set up links and to retrieve (and edit ?) information from the noSQL database.
I read https://forum.xwiki.org/t/accessing-database-table-in-page/3333 , it seems to be possible to do things manually in Macros. But maybe working with a noSQL database implies specificities.

If you want to have a glimpse of the kind of application we want to connect : http://vitraux.porphyry.org/.

I’m interested in any global advise/feedback of external database connexion, etc…
For example, should I use one type of script more than another ? Groovy more than Velocity ?

Many thanks in advance !

Some info on https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/#HChoosingaScriptinglanguage

Nothing special, you’ll just need to use some Java API to access to the NoSQL DB by following the doc for that DB.

You could do that from Groovy. If you can do Java development, I’d recommend doing that and implementing some component and expose it using a Script Service to scripts. That would allow you to write proper automated tests, ensure dev quality in general and easier debugging.

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingComponents/

1 Like