--
You received this message because you are subscribed to the Google Groups "Knative Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knative-dev...@googlegroups.com.
To post to this group, send email to knati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-dev/CABY0rKMKAaSK7VG5TmBbppEw%2BE_NhftaLYh1ZG0Regwa91UEWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi James,interesting demo, thanks for bringing it up! Disclaimer: I know the akka framework and built stuff with it over at OpenWhisk.A few questions (enumerating them to ease referring later):
1. As you say, state is brought to serverless architectures via database accesses today. Scaling these backend services according to the incoming load is indeed an issue, but not necessarily related to serverless itself. It is very much an issue in FaaS-platforms that only allow a single request at a time. The created database-connections are sometimes in an unexpected volume. Crossing that out though, I don't quite see why the scalability aspects of databases should be fundamentally different from serverless applications though.
2. If we assume that to be a problem, how does your proposed solution help to fix that? Event-sourcing and CRDT are neat concepts to distributed-state-sharing but ultimately they are backed by databases as well.
The akka-cluster can alleviate that in a way by caching some of it, but ultimately these databases might become slow and get scaled as well. Does that not impact end-user latency and thus transitively concurrency?
3. Knative Serving scales based on request-concurrency, not based on request-latency. Transitively, increased latency can cause increased concurrency as requests can pile up more. The database in turn needs to have its own autoscaling rules to handle the load. Is that different in your model?
4. You propose a very specific gRPC protocol to achieve what you're showing. Is this necessarily relying on akka and the sidecar you're introducing or could event-sourcing also be implemented into the user-function (via good libraries to hide the nasty details).
Sorry for the long mail and many questions. I hope I haven't completely missed something that makes them all obsolete.
Cheers,Markus
Am Donnerstag, 9. Mai 2019 03:53:50 UTC+2 schrieb James Roper:Hi,This is my first post to this group so allow me to introduce myself. I'm James Roper, I'm Architect of OSS at Lightbend, the company behind, Akka, Play and Scala.At Lightbend we've been experimenting with something that we call stateful serverless. This is an idea for how we can bring state to serverless functions, allowing for a much broader range of use cases than is currently allowed, without subverting the serverless architecture (eg, if a function goes directly to a database, then autoscaling decisions can no longer be meaningfully made by the serverless framework because there's no way to know if its the function, or the database that is the cause of latency).Our approach has been somewhat validated in the past few days, when Microsoft announced a very similar feature for Azure, called Stateful Entities:So we think it's time that Knative seriously considers this approach to providing stateful functions. To this end, we've created a screencast that describes our approach, and demonstrates writing a stateful function in JavaScript, from nothing to deployed and running in Kubernetes in 15 minutes (with liberal time taken along the way to describe exactly what the code and descriptors are doing):Our next step is to actually integrate this proof of concept into Knative, but we need guidance as to the right approach to do that. Any feedback or thoughts would be welcomed.Regards,
--
You received this message because you are subscribed to the Google Groups "Knative Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knative-dev...@googlegroups.com.
To post to this group, send email to knati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-dev/dc08c997-a330-4e91-8506-95ae32dafe19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi James very interested pattern using Akka sidecardI'm guessing a start would be looking into annotation on the serving API to enable/disable the side card injection/hook
Hi Carlos,
To unsubscribe from this group and stop receiving emails from it, send an email to knati...@googlegroups.com.
To post to this group, send email to knati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-dev/CABY0rKMKAaSK7VG5TmBbppEw%2BE_NhftaLYh1ZG0Regwa91UEWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi James,thank you for the detailed answers. That clears a lot of things up! Having the whole persistence being done by "the system" is indeed a very nice approach.In terms of integrating with the system: You can exchange the sidecar image for created revisions as of today. There is a configMap property to define which image to load as what we call "queue-proxy". That's the sidecar we're launching today. That is, however, a global switch today so you can't do that per revision.
To your mesh problems: You can selectively disable the mesh just for the pods of a given revision by adding the sidecar injection annotation to it and set it to false.
What I'm a little unclear about is how tight the integration with Knative itself needs to be here. Do you essentially "only" need to selectively exchange the sidecar for a revision and provide some general information to that sidecar (where to get data from etc.) or is there tighter integration you need? I could see us making Knative Serving pluggable on such a level.
To unsubscribe from this group and stop receiving emails from it, send an email to knative-dev...@googlegroups.com.
To post to this group, send email to knati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knative-dev/682a2a4c-8053-4ae5-8373-a448424fb1ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.