Zorba with more than just a filesystem
Is it possible to use Zorba (and xquery/jsoniq) to query documents stored in something other than a filesystem? I saw a slidedeck from 28msec and others that suggested they had done this, but I wasn't sure how. I didn't know if they used 3rd party code or something else.
I tried and liked Basex but it doesn't support JSONiq and I believe doesn't scale out.
xquery zorba jsoniq
add a comment |
Is it possible to use Zorba (and xquery/jsoniq) to query documents stored in something other than a filesystem? I saw a slidedeck from 28msec and others that suggested they had done this, but I wasn't sure how. I didn't know if they used 3rd party code or something else.
I tried and liked Basex but it doesn't support JSONiq and I believe doesn't scale out.
xquery zorba jsoniq
add a comment |
Is it possible to use Zorba (and xquery/jsoniq) to query documents stored in something other than a filesystem? I saw a slidedeck from 28msec and others that suggested they had done this, but I wasn't sure how. I didn't know if they used 3rd party code or something else.
I tried and liked Basex but it doesn't support JSONiq and I believe doesn't scale out.
xquery zorba jsoniq
Is it possible to use Zorba (and xquery/jsoniq) to query documents stored in something other than a filesystem? I saw a slidedeck from 28msec and others that suggested they had done this, but I wasn't sure how. I didn't know if they used 3rd party code or something else.
I tried and liked Basex but it doesn't support JSONiq and I believe doesn't scale out.
xquery zorba jsoniq
xquery zorba jsoniq
asked Jan 1 at 19:24
WoodsmanWoodsman
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Zorba can query not only the local file system, but also any documents stored in a way accessible via a REST API.
First, Zorba provides a few built-in modules to connect to Couchbase, SQL databases, etc
http://www.zorba.io/documentation/latest/modules/connectors
Second, support for more stores can be implemented using the REST module:
http://www.zorba.io/documentation/latest/modules/zorba/io/http-client
For each new document store to be supported, it is common to create a new user-defined module that wraps the REST calls into a JSONiq module API that mimics that of a document store, in a way that maps naturally to the underlying REST API (e.g., connect, get, put, update, delete, ...). The parameters of this module's functions can be JSON objects or XML documents almost identical to those actually passed as content/body to the REST API (e.g., query by example).
With knowledge of the module syntax, this usually takes about 1000 lines of code and a few days to do, and if applicable can easily be shared with other users for example on GitHub as it is mostly a single module file. Some such modules may be available online.
It should also be said that Zorba supports the standardized EXPath HTTP client as well (similar to the other one, but with general parameters passed in XML format instead of JSON). This means that any modules designed to query XML-based document stores should even be interoperable with XQuery/JSONiq engines besides Zorba.
Document stores that do not support REST can also be supported, but this requires C++ coding and is significantly more involved.
Since you mention scaling up, I should also mention Sparksoniq, which scales up to query JSON data (tested up to a few billion objects) stored on HDFS.
I hope this helps you further.
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998289%2fzorba-with-more-than-just-a-filesystem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Zorba can query not only the local file system, but also any documents stored in a way accessible via a REST API.
First, Zorba provides a few built-in modules to connect to Couchbase, SQL databases, etc
http://www.zorba.io/documentation/latest/modules/connectors
Second, support for more stores can be implemented using the REST module:
http://www.zorba.io/documentation/latest/modules/zorba/io/http-client
For each new document store to be supported, it is common to create a new user-defined module that wraps the REST calls into a JSONiq module API that mimics that of a document store, in a way that maps naturally to the underlying REST API (e.g., connect, get, put, update, delete, ...). The parameters of this module's functions can be JSON objects or XML documents almost identical to those actually passed as content/body to the REST API (e.g., query by example).
With knowledge of the module syntax, this usually takes about 1000 lines of code and a few days to do, and if applicable can easily be shared with other users for example on GitHub as it is mostly a single module file. Some such modules may be available online.
It should also be said that Zorba supports the standardized EXPath HTTP client as well (similar to the other one, but with general parameters passed in XML format instead of JSON). This means that any modules designed to query XML-based document stores should even be interoperable with XQuery/JSONiq engines besides Zorba.
Document stores that do not support REST can also be supported, but this requires C++ coding and is significantly more involved.
Since you mention scaling up, I should also mention Sparksoniq, which scales up to query JSON data (tested up to a few billion objects) stored on HDFS.
I hope this helps you further.
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
add a comment |
Zorba can query not only the local file system, but also any documents stored in a way accessible via a REST API.
First, Zorba provides a few built-in modules to connect to Couchbase, SQL databases, etc
http://www.zorba.io/documentation/latest/modules/connectors
Second, support for more stores can be implemented using the REST module:
http://www.zorba.io/documentation/latest/modules/zorba/io/http-client
For each new document store to be supported, it is common to create a new user-defined module that wraps the REST calls into a JSONiq module API that mimics that of a document store, in a way that maps naturally to the underlying REST API (e.g., connect, get, put, update, delete, ...). The parameters of this module's functions can be JSON objects or XML documents almost identical to those actually passed as content/body to the REST API (e.g., query by example).
With knowledge of the module syntax, this usually takes about 1000 lines of code and a few days to do, and if applicable can easily be shared with other users for example on GitHub as it is mostly a single module file. Some such modules may be available online.
It should also be said that Zorba supports the standardized EXPath HTTP client as well (similar to the other one, but with general parameters passed in XML format instead of JSON). This means that any modules designed to query XML-based document stores should even be interoperable with XQuery/JSONiq engines besides Zorba.
Document stores that do not support REST can also be supported, but this requires C++ coding and is significantly more involved.
Since you mention scaling up, I should also mention Sparksoniq, which scales up to query JSON data (tested up to a few billion objects) stored on HDFS.
I hope this helps you further.
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
add a comment |
Zorba can query not only the local file system, but also any documents stored in a way accessible via a REST API.
First, Zorba provides a few built-in modules to connect to Couchbase, SQL databases, etc
http://www.zorba.io/documentation/latest/modules/connectors
Second, support for more stores can be implemented using the REST module:
http://www.zorba.io/documentation/latest/modules/zorba/io/http-client
For each new document store to be supported, it is common to create a new user-defined module that wraps the REST calls into a JSONiq module API that mimics that of a document store, in a way that maps naturally to the underlying REST API (e.g., connect, get, put, update, delete, ...). The parameters of this module's functions can be JSON objects or XML documents almost identical to those actually passed as content/body to the REST API (e.g., query by example).
With knowledge of the module syntax, this usually takes about 1000 lines of code and a few days to do, and if applicable can easily be shared with other users for example on GitHub as it is mostly a single module file. Some such modules may be available online.
It should also be said that Zorba supports the standardized EXPath HTTP client as well (similar to the other one, but with general parameters passed in XML format instead of JSON). This means that any modules designed to query XML-based document stores should even be interoperable with XQuery/JSONiq engines besides Zorba.
Document stores that do not support REST can also be supported, but this requires C++ coding and is significantly more involved.
Since you mention scaling up, I should also mention Sparksoniq, which scales up to query JSON data (tested up to a few billion objects) stored on HDFS.
I hope this helps you further.
Zorba can query not only the local file system, but also any documents stored in a way accessible via a REST API.
First, Zorba provides a few built-in modules to connect to Couchbase, SQL databases, etc
http://www.zorba.io/documentation/latest/modules/connectors
Second, support for more stores can be implemented using the REST module:
http://www.zorba.io/documentation/latest/modules/zorba/io/http-client
For each new document store to be supported, it is common to create a new user-defined module that wraps the REST calls into a JSONiq module API that mimics that of a document store, in a way that maps naturally to the underlying REST API (e.g., connect, get, put, update, delete, ...). The parameters of this module's functions can be JSON objects or XML documents almost identical to those actually passed as content/body to the REST API (e.g., query by example).
With knowledge of the module syntax, this usually takes about 1000 lines of code and a few days to do, and if applicable can easily be shared with other users for example on GitHub as it is mostly a single module file. Some such modules may be available online.
It should also be said that Zorba supports the standardized EXPath HTTP client as well (similar to the other one, but with general parameters passed in XML format instead of JSON). This means that any modules designed to query XML-based document stores should even be interoperable with XQuery/JSONiq engines besides Zorba.
Document stores that do not support REST can also be supported, but this requires C++ coding and is significantly more involved.
Since you mention scaling up, I should also mention Sparksoniq, which scales up to query JSON data (tested up to a few billion objects) stored on HDFS.
I hope this helps you further.
edited Jan 3 at 10:46
answered Jan 3 at 8:15


Ghislain FournyGhislain Fourny
5,16812027
5,16812027
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
add a comment |
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
Thanks. Is there an example to insert or query? Let's say I wanted to use Postgres. Is there a schema to use? Hopefully I can find a way
– Woodsman
Jan 20 at 19:18
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53998289%2fzorba-with-more-than-just-a-filesystem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown