# Programming Java SNARL vs SPARQL

**URL:** <https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053>\
**Category:** Support\
**Created:** [May 17, 2018, 2:31pm UTC](https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053 "2018-05-17T14:31:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![semanticfire](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/semanticfire/32/47_2.png) [@semanticfire](https://community.stardog.com/u/semanticfire)\
**Post date:** [May 17, 2018, 2:31pm UTC](https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053/1 "2018-05-17T14:31:07Z")

</div>

Hi,

For querying stardog there are 2 options:

1. Use the standard SPARQL endpoint https://:5820//query
2. Use the SNARL programming interface through the Java API

What are the pros/cons of both methods, would there be a performance benefit or anything else with using SNARL over SPARQL ?

Looking forward to your repsonse

Bart

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [May 17, 2018, 2:46pm UTC](https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053/2 "2018-05-17T14:46:58Z")

</div>

Hi Bart,

There are actually [a few](https://github.com/stardog-union/stardog.js) other [ways](https://github.com/stardog-union/stardog-groovy) to [query](https://github.com/stardog-union/stardog-clj) Stardog, however they all ultimately wrap some version of the HTTP API. I suppose, therefore, there is possibly a performance hit when using the APIs versus sending an HTTP call directly, but it would be negligible.

---

<div class="post-metadata">

**Author:** ![semanticfire](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/semanticfire/32/47_2.png) [@semanticfire](https://community.stardog.com/u/semanticfire)\
**Post date:** [May 17, 2018, 3:03pm UTC](https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053/3 "2018-05-17T15:03:47Z")

</div>

okay, so in general for pure query operations a direct http sparql call benefits from simplicity ( no elaborate dependencies ) where the performance tradeoff can be neglected.

Good to know!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 31, 2018, 3:03pm UTC](https://community.stardog.com/t/programming-java-snarl-vs-sparql/1053/4 "2018-05-31T15:03:49Z")

</div>

Closed on May 31, 2018, 3:03pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
