News for hackers. Stuff that matters.
Re:Scala vs. Node.js as a RESTful back end server (2015) by lkrubner on Saturday April 23, 2016 @01:36PM (#11556490)
I can remember when Git began to replace Subversion, but a lot of companies resisted the trend, because Git was so radically different. Subversion was comfortable: everything was centralized, and the revision numbers went up in an orderly fashion: 1, 2, 3, 4, 5, 6... You always knew where you were in history, with Subversion. It was clear that Git was better in some fundamental way, and yet it took effort to understand it, conceptually, at first.

I feel like the same thing is happening now with GraphQL versus REST. On some level it seems like GraphQL is altogether better than REST, but we don't see a mad rush to adopt GraphQL, because it represents a big shift in thinking, and those of us who just spent the last 10 years creating RESTful interfaces, we are a bit slow to throw out all of our work and start over with GraphQL. Also, the frontend needs to change as much as the backend, so it requires a full re-write of everything.

All the same, a title like "Scale vs. Node.js as a RESTful back end server" does strike me as an anachronism in 2016. Who cares? I doubt I will ever again build a RESTful interface. Rather, on the project I'm working on right now, we are getting rid of the RESTful interface and we are looking at our GraphQL options:

https://github.com/chentsulin/awesome-graphql

Is Scala or Node.js the best option for building a GraphQL server? That would be an interesting article.

Re:Scala vs. Node.js as a RESTful back end server (2015) by kazagistar on Saturday April 23, 2016 @01:48PM (#11556541)
I have a question I have been trying to figure out for a while. All the examples of clients that use GraphQL seem to be javascript; is there any support for writing, for example, a Java client to talk to a GraphQL backend? This would really help make it easier to port infrastructure over piece by piece.
Re:Scala vs. Node.js as a RESTful back end server (2015) by e1g on Sunday April 24, 2016 @04:31AM (#11558994)
GraphQL defines the query language, but uses simple HTTP as the transport. It's not like like redis or mysql - those use custom protocols and so require special clients to use them. GraphQL backends are like Elasticsearch backends - you access them by hitting the exposed HTTP endpoint with your query in plain text. You could do this with any HTTP client library in any language, or even with curl.
Re:Scala vs. Node.js as a RESTful back end server (2015) by kazagistar on Sunday April 24, 2016 @02:36PM (#11560768)
Thats true, but in a typed, structured language, you generally build some kind of data structure to deserialize responses into. With REST endpoints, each response can be translated to a specific predefined object in a client library. GraphQL seems to, by design, ignore this kind of usage in favor of the "heterogenus untyped dictionary responses"... do I really have to write custom data types for every single different query?
Re:Scala vs. Node.js as a RESTful back end server (2015) by e1g on Sunday April 24, 2016 @09:00PM (#11562037)
I think get this now - with SOAP/RPC/REST we can establish the interaction contract by explicitly defining inputs and outputs. With that contract, we can draw clearly defined system boundaries, give better assurances to the developer that they are doing the right thing, and improve testing.

You're right - in the scale of app-level problems, GraphQL is just a low-level protocol. It requires language-specific libs to address these higher-level problems (provide interfaces, structs, query typing, etc). As a very basic example, programatically building a GraphQL query is unnecessary complex outside of JS because many languages don't yet have a QueryBuilder for the GraphQL syntax. There are some community efforts, but as of yet no heavy corporate players to drive GraphQL-specific dev (e.g. like Pivotal/Sensio/Sencha did for their respective fields).

Re:Scala vs. Node.js as a RESTful back end server (2015) by hackerboos on Saturday April 23, 2016 @02:01PM (#11556603)
Re:Scala vs. Node.js as a RESTful back end server (2015) by kazagistar on Saturday April 23, 2016 @04:42PM (#11557341)
I found that link before, but aren't those all backends?
Re:Scala vs. Node.js as a RESTful back end server (2015) by lkrubner on Sunday April 24, 2016 @08:45PM (#11561989)
You can write the server in any language, and you can also write the client in any language. As a point of comparison, consider SQL databases such as MySQL or Oracle or MongoDB. There are clients written in dozens of different languages.
Re:Scala vs. Node.js as a RESTful back end server (2015) by daxfohl on Saturday April 23, 2016 @02:38PM (#11556768)
How would it be different? This article could be retitled "Is Scala or Node the best option for building a backend server", without any other changes, and it would cover both use cases (plus plain old html server etc).
Re:Scala vs. Node.js as a RESTful back end server (2015) by pjmlp on Saturday April 23, 2016 @03:31PM (#11557042)
I use Subversion daily. I am yet to experience an enterprise customer that has jumped into Git.
Re:Scala vs. Node.js as a RESTful back end server (2015) by yareally on Saturday April 23, 2016 @04:11PM (#11557210)
> I am yet to experience an enterprise customer that has jumped into Git.

My company recently did (1000+ employees), though from what I've seen, many of my coworkers familiar with only svn are still using git like svn. We also have a lot of legacy code still within svn (various reasons outside of my team's control), so the transition is pretty messy IMHO.

Re:Scala vs. Node.js as a RESTful back end server (2015) by xirdstl on Saturday April 23, 2016 @02:15PM (#11556648)
It is wise for most companies not to rush to the bleeding edge as technology changes.