The awkward journey towards less back end
medium.com
medium.com
I think that the author is doing everyone a disservice by framing it like that. I don't even know where to begin to detail where he's wrong: Backend devs are the first people who want to write less backend (they're the ones writing all the libraries!), deepstream isn't a novel idea (it looks like it makes the 90% easy and the 10% horrible), pushing all the code to the client isn't a good idea (just imagine how long it would take to update every client when you discover a critical bug, rather than the three minutes you can update the server), etc etc.
It's a nice service that will allow people to prototype much faster and more easily, and I guess the controversial stance and title of the article worked very well for getting the clicks.
I read an aphorism of sorts a long time ago that basically stated that your software is _relatively_ unimportant, it's the data that's you should worry about. Think about that before trusting that random system X can handle your data for you.
A huge percentage of the code I write has nothing to do with the front-end. Am I going to hang my project's fate on a platform created solely with quick and cheap front-end development in mind? Probably not.
I do remember the bad old days when all you really had was a thick native client, a database, and scheduled tasks. So there is precedence, i'm just not sure it's good one?
:)
I like Node, I like Meteor, not ready yet, but close. I like the idea of sharing logic, data, and state that way. Not happy about the sideways protocol. Leaves Node available for the crap I don't want to run on the client.
Pretty sure the magical disappearing back-end (OP) idea is a dead end tho.
This is all great for reusability etc. but it does add complexity (including failure complexity) and overhead. As always, such decisions require deep understanding of the tradeoffs involved, and sober judgment of whether the effort is worth it. Only time will tell whether such understanding and judgment will be the norm or the exception. As a grumpy old programmer, I think you can guess where I'd place my bets. ;)
[0]: https://www.arangodb.com/why-arangodb/foxx/
(Disclosure: I work on ArangoDB Foxx)
Databases like Postgres can run languages like JavaScript or Python for their stored procedures. ArangoDB does nothing new in that regard.
Stored procedures are typically used for access control, data validation and code re-use. Foxx can of course be used for the same purposes.
However while no sane person would want to expose a Postgres database to an external client, Foxx can be used to create REST APIs.
There are proposals to add an HTTP API to Postgres so I would assume that there is a lot of demand for such use-cases.
So stored procedures are just the basis and extensions like the ones Postgres plans to build on top of them are comparable to the native Foxx framework ArangoDB has already been offering for years.
It's also possible to use user-defined functions in ArangoDB's query language, which are a more obvious equivalent of traditional stored procedures in SQL. Unlike these functions Foxx allows developers to build entire data-centric microservices. Additionally Foxx provides access to a wide range of JavaScript libraries via support for Node.js-style modules.
If you want arbitrary HTTP endpoints with logic you define yourself, bundled as isolated modules with an express-like router API, Foxx is currently the only way to do that within a database. It allows you to colocate your data-centric application logic with the data it operates on (or even remove the need for exposing sensitive data altogether by handling application-level auth/auth within the database).
The only equivalent I can think of personally are CouchApps in CouchDB but they are necessarily far more limited in scope (because CouchDB isn't built to support complex or ad hoc queries).
(don't get me wrong, anyone capable of writing a db from scratch is a genius, good job and good luck)
I'd say it's more along the lines of a Parse like service where:
- you own your data
- you choose your datastore
- you get an easy to develop against service for client interactions without sacrificing back-end flexibility (aka you can still run SQL queries for reporting)
That's not true at all. A good place to stop reading.
But we knew that's what the author meant. /s
As a generalist developer I have worked at all levels of the stack on front-end and back-end, depending on the project and never had a backend stack being "a long list of functions that mapped to HTTP requests".
Maybe in the SV world of SPA applications it is like that, but backend is so much richer than that, specially in distributed computing scenarios.