News for hackers. Stuff that matters.
Re:Justin.tv's Live Video Broadcasting Architecture (2010) by PullJosh on Wednesday July 03, 2019 @08:31PM (#20350449)
> everything is now Go microservices back

Excuse the simple question: When I hear "microservices", I think serverless backend. Is that right, or are they different? If they're the same, how do you stream video with serverless? (Seems like streaming, websockets, etc... shouldn't be possible in a serverless environment...)

Re:Justin.tv's Live Video Broadcasting Architecture (2010) by 013a on Wednesday July 03, 2019 @09:06PM (#20350625)
"Microservice" describes the size and scope of each deployment artifact. It answers the question "is the whole system just one big ball, is it broken up, how broken up is it?" It doesn't describe how it is deployed.

"Serverless" describes how a deployment artifact is deployed and runs. Generally it refers to a class of technologies in multiple domains whereby intricate knowledge of the underlying host is abstracted behind a cleaner API, with things like scaling, security, patching, etc handled by an infrastructure provider. While the term rose in prominence alongside "functions as a service", which is certainly a technology that generally qualifies as serverless, there are many serverless products out there: AWS Fargate for running containers, DynamoDB for a database, S3 for object storage, all of these are "serverless". A good signal is: if I can SSH into it, its not serverless.

A microservice can certainly be deployed serverless (ECS/Fargate or Google Cloud Run comes to mind). A microservice can even refer to one or more logically related functions-as-a-service; the term more-so speaks to how the engineering teams organize their business domain into the code and how the APIs speak to each other, rather than the exact underlying technologies.

Re:Justin.tv's Live Video Broadcasting Architecture (2010) by NetOpWibby on Wednesday July 10, 2019 @11:11AM (#20402704)
I finally understand the difference. Thank you.
Re:Justin.tv's Live Video Broadcasting Architecture (2010) by UweSchmidt on Thursday July 04, 2019 @12:06PM (#20355675)
Great explanation!
Re:Justin.tv's Live Video Broadcasting Architecture (2010) by leonidasv on Wednesday July 03, 2019 @08:45PM (#20350517)
Microservices are about splitting code into different servers instead of a monolithic codebase. You end up with different servers (probably virtualized) for each domain of the application.

Like, instead of having the video decoding and the analytics code in the same monolith attached to same DB, you deploy a different server for each one, generally with a new DB for each. When the services need to talk to each other, they do it via network (REST, gRPC, etc.).

Re:Justin.tv's Live Video Broadcasting Architecture (2010) by glacials on Wednesday July 03, 2019 @08:35PM (#20350473)
They're different. Microservices are still stateful applications that run 24/7. They are just really small in scope.

e.g. the Friends feature on Twitch is one microservice, running in its own autoscaling group, with internal APIs used by other microservices like Whispers.

Re:Justin.tv's Live Video Broadcasting Architecture (2010) by discordance on Wednesday July 03, 2019 @08:51PM (#20350540)
My team follows microservice patterns, and have deployed services that utilise websockets over both serverless (Azure Functions and Lambda) as well as regular hosted services (on k8s, EC2 and Azure App service etc). Nothing stopping you there. On the streaming video side we did an app that used Azure Media services + Azure functions.. works well enough.

Not necessarily a good idea, but one 'feature' of microservices is the ability to pick different stacks, languages and delivery methods on an individual service level.

Re:Justin.tv's Live Video Broadcasting Architecture (2010) by stale2002 on Wednesday July 03, 2019 @09:34PM (#20350760)
I work at twitch. Let me put it this way. My team that I am on (VOD) has ~8 backend engineers and we are in charge of something like ~2 dozen services.

We literally have services that are run entirely using AWS Lambda functions only.

This is a pretty big difference from teams I've worked on in the past, that have 8 engineers all working on a singular service.

"Microservices" is more of a philosophy than anything.