4 ms·
Serverless just means that we don't run the server ourselves, and that we often get a direct connection between the client and a database like FireStore, withou
by vfc1 8y ago
Serverless just means that we don't run the server ourselves, and that we often get a direct connection between the client and a database like FireStore, without anything in the middle.
Many tasks can be done with reduced security privileges directly from the client, by setting up some declarative security via something like Firebase Security Rules.
We don't even need a server for handling File Upload, that is handled by something like Firebase Storage. Of course that there is a server somewhere, its just that don't develop it ourselves but we instead use it as a service.
For tasks that require increased security privileges, or for things like video or image processing we can still spin up a node server if needed using something like Firebase Cloud Functions.
The end result is that we only end up writing minimal server code, and almost all of our code is client code. This does not mean that there is no server though, so the term is a bit misleading but it still captures well the fact that we only have to write a reduced amount of server code.
- brianwawok 8y ago> Serverless just means that we don't run the server ourselves, and that we often get a direct connection between the client and a database like FireStore, without anything in the middle. Umm.. there IS a server in the middle. With some form of docker image with some code on it. Same as if 10 years ago you spun up a EC2 instances, or 1 year ago spun up a docker image on one of the many providers that supports such things.
- stefantheard 8y agoHow do you go directly from client to database with nothing in the middle while being unable to trust the client?
- ryanmarsh 8y agoPolicies are put in place in one fashion or another. You’d do this differently in DynamoDB or Firebase but basically you set up a rule like, users can only update records with a key matching their user ID. So that logic does end up somewhere. Instead of in a Lambda or Cloud Function the logic is “embedded” in the database. IMHO this is an anti pattern but what do I know?
- stefantheard 8y agoah I see, yikes. I agree with you. this is optimizing for some non existent problem (or at least a non obvious problem)
- movedx 8y agoJust because you've never had to overcome or experience the problem, it doesn't mean it doesn't exist. If you've ever had to develop an MVP from the ground up and build a business around it, services like this are critical to your acceleration, time to market, and budget.
- stefantheard 8y agothat's why I said "or non obvious" I'm not totally sold on this saving time but I guess it could be argued depending on the expertise of the developer
- movedx 8y ago> depending on the expertise of the developer The more experienced the developer, the faster they are. The faster the technology enables you to be, the faster you'll produce something. Both go hand in hand. An experienced developer would absolutely love Serverless for most problems they face. Having the option of doing as little Ops as possible and just solving problems in software is the very definition of a software developer (which certainly might be changing over time) :)
- stefantheard 8y agoI still don't see where the savings of time come in. What you lose in "ops" you gain in configuration and assuming you don't have eidetic memory that has a time cost.
- movedx 8y ago