Live data from Hacker News

Serverless Architectures

martinfowler.com

51–60 of 215 posts

Re: Serverless Architectures

#51

If successful this could lead reduction in developers needed in companies that use say AWS lambda.

> If successful this could lead reduction in developers needed in companies that use say AWS lambda. How so ? to me it makes development even more complicated, cheaper relative to hosting fees maybe, but simpler ? I don't think so. What if I want to use language XYZ not supported by lambda ?

> What if I want to use language XYZ not supported by lambda ?

Such problems can apply to any ready made solution. In general, a vendor product may or may not suffice custom needs and a user is free to build one from scratch. Abstraction of major pain points that fits a wide variety of user needs, if handled properly, can pave the way for a competitive solution.

Re: Serverless Architectures

#52
For my first serverless project, I built a service that manages an advertising account, by analysing ads and optimising the spend spread for a configured goal. I was surprised to find that one of the most difficult aspects, was in throttling outgoing API requests. Basically, I needed to avoid abusing a 3rd party service by hammering it with parallel or rapid fire requests.

I discovered all kinds of weird solutions:

- Push a "please wait" message onto an SQS queue, and set a Cloud watch alarm to fire when the queue length was >= 1 for at least one second. Have a variety of lambdas respond to the alert by checking if the have any work to do, and then racing to pop the queue and do one operation. I think I needed SNS in there too, for some reason. Fanout?

- Build a town clock on an EC2 and have it post "admit one" tokens to SNS. Nice and simple, but I was evaluating serverless, and adding a server felt like defeat. Might as well just run the whole thing on that EC2.

- Have on lambda pop request descriptions from a queue, and sleep for one second after sending each one. The request responses would have been pushed onto another queue. All of the other lambdas could just handle the events they cared about as quickly as data became available. Sleeping in a lambda just felt wrong, but for one second, it probably would have been fine.

In the end, I was still experimenting and exploring when my estimate loomed near, so I just wrapped up all of the application code and piped it all together with delays in loops that made API requests. Deployed it to Heroku in a hurry with minimal fuss.

What I learned:

- There are bad use cases for serverless, and I had started on one (SLS doesn't wait on no one)

- Serverless does encourage a clean architecture, from a code perspective: I was able to quickly transform it into a completely different type of application.

- AWS's services have lots of little surprises in their feature set: SQS doesn't fire any kind of event. SNS can't schedule events in the future (maybe I should have expected that one). Cloud watch events can only trigger a single lambda.

- There is a need for a town clock / scheduler as a service in AWS'. How many people have built that themselves?

Re: Serverless Architectures

#53

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

I agree. Someone is still hosting the servers and services. It is just someone else. It is also just a re-spin of the term Application Service Provider. That term never gained popularity.

There are some discussions of API's. Whether or not a service has an API is orthogonal to something being a hosted service.

Re: Serverless Architectures

#54

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

No, the idea is simple - the servers are invisible to the user, he doesn't know what or how many are in use. Since the servers are completely abstracted away, they could have just as well not be - hence serverless. An analogy escapes me but I sure there are some.

So it is about how the user perceives the application?! If so, why is it called "an architecture"?

Or do you mean that the user don't have to care on how to configure the application? Then "Zero-configuration" is a better name.

Or do you mean that the application hides that it use services on the net? Then it is even worse.

Re: Serverless Architectures

#55

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

In this context "server" doesn't mean "entity listening on some network endpoint, providing some service to network-connected clients" (which is I think the definition you're assuming). Instead "server" here means "Unix Machine".

Thus "serverless" means software and humans writing and deploying said software that do not need to know anything about /etc/ and installing packages and disk partitioning and swapping and whether Python 2 or Python 3 gets installed by default this week and ...

IMHO a good thing, mostly.

Re: Serverless Architectures

#56

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

I agree. It is preempting definition use from a true serverless architecture: a swarm of symmetrical client/servers that implement an application and distributively store application state.

Re: Serverless Architectures

#57

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

No, the idea is simple - the servers are invisible to the user, he doesn't know what or how many are in use. Since the servers are completely abstracted away, they could have just as well not be - hence serverless. An analogy escapes me but I sure there are some.

I also dislike the term serverless. It's confusing, doesn't relay the information it should. I can't suggest a good replacement, but it's painfully obvious that even here, most people commenting don't actually know what serverless means and what its implications are.

Serverless really is an auto-scalable distributed infrastructure, perfect for small CPU-intensive tasks in an app which doesn't know how many CPUs it'll need at any one time.

Re: Serverless Architectures

#59

What a ridiculous and strange definition this is. Its an architecture that relies on multiple, supposedly distributed services, all of which are hosted on servers... Why not just call it "Multiserver" instead. If they mean "containerless servers" or "microservices", then why don't they say so? If they mean "distributed servers" why not call it that. If they mean that the client relies on multiple services (each hoste…

In this context "server" doesn't mean "entity listening on some network endpoint, providing some service to network-connected clients" (which is I think the definition you're assuming). Instead "server" here means "Unix Machine". Thus "serverless" means software and humans writing and deploying said software that do not need to know anything about /etc/ and installing packages and disk partitioning and swapping and w…

So my car is engineless if I never look under the hood?
Post reply on HN