Hacker Newsnew | past | comments | ask | show | jobs | submit | degyves's commentslogin

In fact you can use XML, but not barebones XML. XML does not contain semantics, which is needed to achieve interoperability. So you should use some more specialized XML, namely, RDF/XML. Which of course will increase complexity to XML. You can use also JSON-LD, which is a more complex JSON bc it adds semantics.


I'm native indigenous from Oaxaca, Mexico, home of several sacred ceremonies with magic mushrooms and other plants from millennia. I'd like to share that our Native Nations do not give permission for scientific research of magic mushrooms outside our culture. This is not an egoistic stand, but it is for your own safety. Sacred plants on pharma and marketing industries hands will only create more damage than good. If you are interested to learn about sacred plants you must learn respect from native nations and come, live here and share for a time, then a request to research can be asked to the community.


There is wisdom in communities that use sacred plants. I hope one day western culture will realize this respect for communities such as yours but also across the world. So much of western culture is based on money and consumption. It really is the root of western ills.


I think these things grow in many more places than yours.


Growing anywhere is not enough reason to use something. A lot of things are available anywhere but not all of these will be safe for your community. Sacred plants are more complex than the individual impact. It has consequences on your society and this is why its management is by law restricted to native nations.


That depends of which precise definition of consciouness you're talking about, which is a flame wars research field. But it is a consensus that consciouness is not equal to inteligence.


Yes, that is why I tried to contrast consciousness with computations.


Some specific reason to not recommend it?


How "most advanced graph database" does not supports already standardized SPARQL query? Have you found anything wrong with standard SPARQL?


We are happy to get new feature requests on github.com/dgraph-io/dgraph!

SPARQL is something we're considering but we haven't heard much interest from any of our customers so it's not very high up on our roadmap.

I'd love to chat with you to figure out how adding this could help your use case though. You can reach me at francesc@dgraph.io.

Cheers!


The most impressive to me, is to read only a single comment worried about the ecological impact and the sustainability


Just start with Apache Jena, standards based with RDF as the exchange format and SPARQL for the query language. Others solutions may use proprietary stuff for better vendor lock-in: This is completely up to you if you want that. But with Apache Jena you can change later to other KG databases. Also: Apache Jena is easy to work with, since it includes Fuseki to start directly using it as a web API.

https://jena.apache.org/ https://jena.apache.org/documentation/fuseki2/

Once you need "big data" for your personal Knowledge Graph, you can use other RDF stores, without vendor lock-in.


Even more, we're already there: US ONC Health IT and HL7 are currently on the FHIR standard, which is slowly integrating linked data principles. E.g. currently uses JSON-LD: https://www.healthit.gov/buzz-blog/interoperability/heat-wav...


Not only now Linked Data + RDF is even simpler and nicer to learn: There are currently more libraries to work with. Also it is more critical than ever for many industries.

Current solution for several issues related with electronic health records concluded to create the new standard, to use RDF and linked data, which solved most of the issues on the previous standard. See FHIR: https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperabili...

In fact, current linked data discussions seem to me that become relevant again because it is more clear now that we have been misusing/overusing/ bad REST, microservices architectures and GraphQL for some already analyzed and solved problems.

But, of course, for a single application which doesn't require interoperability, not requiring standardized data exchange formats, not requiring support for flexible data representation, Linked Data and RDF will be clearly unnecessary. But on time, the future of data interconnection plays on the side of Linked Data IMHO.

Until now, current attempts to create some Linked Data + RDF alternate infraestructures are more likely to create ad-hoc, informally specified, bug-ridden, slow implementations of Linked Data and RDF.


Great. Another solution for an already-solved, already-standardized query API language (SPARQL).


SPARQL demands a certain data model (triple stores). Also, everything about it smells like ivory-tower academic snobbery + ultra-large-enterprise crap. GraphQL does neither.


Funny that ultra-large-enterprise crap could be applied to Facebook and GraphQL?


GraphQL also demands a certain data model. Just that it is not standardized. And no, RDF/XML is not the only representation for SPARQL. It can deal also with JSON.


GraphQL has no demands on your data model. You can do whatever you want behind the schema you provide to client apps


I think you should read it directly from the website: "GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data." You need a type system to bypass the datamodel. Just pushing the issue around.


No, it doesn't, it is agnostic. There's an adapter for every major database out there. Oh, yeah, graphql also has momentum and strong adoption, unlike SPARQL.


Oh yeah, GraphQL is backed by Facebook (may that be a hint of its momentum, like its support for React?) , unlike SPARQL which is a _standard_. You can also convert from PostgreSQL, MySQL, DB/2 and others to SPARQL. Still, only difference seems 1. Facebook pushing its non-standardized tech around and 2. Losing any benefits from HATEOAS from the usage of GraphQL.


Sure but I use GraphQL as middleware when fetching from elasticsearch, or redis, or flat files. It is not something you hook up directly to your database, it's a way to help define an api for your application.

Most of the time, in my app, resource names do not even correspond to single tables or backend data structures but are simply presented that way for ease of use for external consumers.

Subjectively, Implementing it feels more like old school COBRA than REST or SQL.


You’re getting caught up in the “graph” part. GraphQL is unfortunately named, because it doesn’t actually have any “graph” related semantics or features in the graph database sense. The “graph” in GraphQL just refers to the fact that you can use it to retrieve nested data. On the other hand, SPARQL and Tinkerpop (the “true GraphQL” imo) are actually about graphs and related data in the graph database/semantic web sense. GraphQL and SPARQL have nothing to do with each other.


I'm pretty sure the "Graph" part refers to the Facebook's social graph. They already have (REST'ish RPC) Graph API, so there is a precedent here.


GraphQL is not a generic query API language. One of the most unfortunate things about GraphQL is the presence of "QL" in the name makes people think it is somehow comparable to SQL or SPARQL.


Maybe because it IS a query language? From the website: "GraphQL is a query language for your API"... just that it is _not_ a standardized API, so we won't take advantage of HATEOAS.


I recommend this talk to see what both technologies can still "learn" from each other - https://youtu.be/LUF7plExdv8. I don't think SPARQL or GraphQL completely replace one another.


I think GraphQL is just an way to bully the efforts of the W3C to standardize web technologies. It not just is non-standard, also is breaks any advantage of the HATEOAS principle.


I have written HATEOAS APIs (not just “RESTish” APIs). I prefer writing GraphQL APIs by far.

If I have to write something that’s REST-ish, I’ll do my damnedest to make sure it’s HATEOAS, but in my experience, the number of developers who can consistently produce useful and consistent HATEOAS APIs is…vanishingly small.

I can learn more about an API from its GraphQL schema than most of the other API documentation (like OAS/Swagger or RAML) out there.


>the number of developers who can consistently produce useful and consistent HATEOAS APIs is…vanishingly small.

Because relatively few developers truly understand HATEOAS let alone REST. I think that did play a small part in the increased popularity of GraphQL.


Yeah, if you are writing HATEOAS APIs just by personal preference then you are using the wrong technology. You should write HATEOAS to make sure your API will be consistent, standard and automatically browsable on the long term.


Fellow curmudgeon, I give you an upvote. SPARQL is a more elegant tool from a more civilised time.


that's awesome -- y'all are like the tech version of the Mad Max War Boys. sacrificed yourselves betting on the wrong tech.

witness me!


Can you elaborate why SPARQL is the wrong tech?


As someone who used to write SPARQL queries for a living with some of the most established players in the Semantic Web game, the idea of SPARQL and GraphQL serving the same purpose is pure misconception (usually by folks who haven't yet taken the dive into GraphQL).

GraphQL allows the backend to say "here's the data I offer and how it's structured, pick which fields you want from that" and the frontend query just specifies the "what." It's like picking from a menu (although fields can have parameters), and the results you get back are structured objects with nesting.

On the other hand, the data offered by a SPARQL endpoint has no inherent structure, the query is what gives the data structure. You not only ask what you want (the projection) but how to resolve the fields using (often complex) relational logic. It's orders of magnitude more powerful, which is awesome, but also more work and more confusing. Its biggest downside is that, like SQL, the results are row-oriented. For anything other than completely simplistic queries, the resulting data often needs to go through a transform/reducer step instead of being used directly, because real-world needs aren't always row-oriented (especially on the frontend). If you want to request information about both entities and the "children" of those entities, the projection is going to be (1) incredibly messy and (2) full of duplicate data, or you're making multiple queries.

I wouldn't want my frontend communicating with a raw SPARQL endpoint for the same reason I wouldn't want to expose a raw SQL endpoint (and basically nobody does). GraphQL puts the frontend "on rails" so to speak and lets the backend worry about the "how." That can be a positive or a negative depending on what you want to do, but in the frontend world (where REST is the norm), folks consider that a positive and it's the direction they've generally chosen.


SPARQL results DO have an inherent structure. Even more, this is why projects like Eclipse Lyo can automatically convert SPARQL results directly to Java Objects. So no, SPARQL it is not intended to be used directly but as a product for a library to be converted into objects or rows or graphs or anything the client needs.

On the other hand, GraphQL pushes its complexity (to worry about the "how") into the server's implementation. The complexity is still there. And it's impossible to be automatically browseable.

Semantic Web is only an application of SPARQL, not the only one.


Very well articulated!


I never met a SPARQL endpoint I couldn't crash with a trivial query.


... ?


GraphQL isn't a query language, it's an API protocol language. Big difference.


Well it is a query language, QL stands for query language.


The name doesn't make it so. It defines a syntax and a single operator (nesting), but nothing else. You can't use it to "query" arbitrary data sources in the sense that other query languages such as SQL do, since there are no operators, functions, subqueries/arbitrary joins etc. It's an alternative to REST, not SQL.


I think you should read the definition right from the website: https://graphql.org/learn/


From the website: "GraphQL is a query language for your API"



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: