serving icon indicating copy to clipboard operation
serving copied to clipboard

Service (services.serving.knative.dev) is very confusing.

Open n3wscott opened this issue 8 years ago • 57 comments

/area API /kind dev /kind doc

tl;dr: Rename Service to Function.

Argument

Taking Core Kubernetes' Service resource, and comparing it to the Knative Service resource, I am very confused about the naming of this object. And some will say this is a bikeshed topic but disagree: If future users/customers are unable to quickly understand the abstractions being made inside of Knative, they will have a hard time getting value from the project.

Currently we would need to say the following: The Service manages a Route and the Configuration. A Configuration produces one or more Revisions. The Route exposes the Revision via a Service.

Proposal

Rename Service to Function.

Then we could say the following: The Function manages a Route and the Configuration. A Configuration produces one or more Revisions. The Route exposes the Revision via a Service.

At the end of the day, the user is wanting to use the project to host functions, and (a super cool feature of this project!!!) is that you can define your Function from external source and the machine serves that for you!!! NEAT! Likely even in the typical non-k8s way to talk about services, what is being represented by a Revision is not a full application (aka, not really a service). An application is likely assembled from many Functions and external services. (Compare that to: An application assembled from many services and external services.)

There is likely history here, please educate me.

n3wscott avatar Jun 28 '18 18:06 n3wscott

Without getting into what things should be named, I will admit that I was confused for several days about how a Knative Service differed from a Kubernetes Service. And why they were named the same.

bbrowning avatar Jun 28 '18 18:06 bbrowning

I know a lot of time has been invested in choosing the name of the knative service resource, but I think we should reconsider the choice:

  • It is rather confusing - even to the people developing this system - to have two resources with the same name
  • The CLI experience is degraded by having to qualify references to the service resource

Generally, if something is confusing to the development team, users are going to have an even harder time understanding. I think it would pay dividends to have an umbiguous name for the Service|Steve concept - more productive discussions and easier for users to understand.

Full disclosure: I've already built another k8s component (the 'service-catalog') that used Service in resource names, and whenever I talk about the technical details with anyone I have to devote time to disambiguating k8s service and 'service-catalog service'.

@n3wscott for the background on the name you can check out https://github.com/knative/serving/issues/412

pmorie avatar Jun 28 '18 19:06 pmorie

I think we've all enjoyed a good laugh during the working group calls when someone asks if they mean the "native service" or the "Knative service". It's confusing to people who are new to the project and for those who have been around for a while when communicating verbally.

I'm 👍 on change, but 👎 on Function since a Revision can represent a function, application or container. Naming is hard.

scothis avatar Jun 28 '18 19:06 scothis

Thanks for the #412 context @pmorie. I was looking for that! Component and Module have a lot of other mean. Node is confusing. ServerlessService is ... speaks for itself. I like Workload.

Other suggestions:

  • Seed (as in a single part of what makes current pods)
  • cube (or kube) as in a contained workload
  • Code (hinting at the source of the workload)
  • Workload

I honestly like Steve more than Service.

n3wscott avatar Jun 28 '18 20:06 n3wscott

Others:

  • Function
  • FunctionService
  • EventService
  • ContainerService

pmorie avatar Jun 29 '18 03:06 pmorie

One more: Kservice

n3wscott avatar Jul 02 '18 13:07 n3wscott

I think in general it's confusing when an "umbrella" resource ends up triggering generation of another resource with the same name. In this case we have:

(Knative)Service -> Route, (k8s)Service, Configuration

In my opinion, there is a similar dissonance in the Knative Configuration since that triggers creation of Revisions, and those in turn create Container resources that include the image as well as "configuration" such as EnvVars. The Knative Configuration resource seems like it should have a name that implies a larger scope of responsibility.

Of the alternate names mentioned thus far for the Knative Service, I think I'd prefer "Workload", but I was also thinking "Application" might work - although that is just one of the 3 types of workload (Function, App, Container) so has a similar issue to "Function". Although I tend to view a Function as just a specific type of Application that happens to use an Invoker base so that a developer can just provide the Function code, where the Invoker plays the "Application" role (Inversion of Control).

markfisher avatar Jul 03 '18 14:07 markfisher

I prefer the name Workload as the top-level entity because of it generic nature. It's just some stuff to do, independent of the implementation details. It's also what that view is called in the Google Cloud Console, which seems natural to me. All the top-level stuff.

All the other names I've seen so far insinuate behavior. I expect Service to be the K8s Service. Function and Application hint at code structure. ContainerService is redundant because this is Kubernetes and everything goes in a container. Kservice is cute but doesn't clarify the role and scope of the top-level resource. Seed can have too many different meanings, like PRNG seed. Code is close, but leaves out containers as a workload.

josephburnett avatar Jul 03 '18 15:07 josephburnett

Kubernetes is threatening to stake a claim on Application as well: https://github.com/kubernetes-sigs/application

grantr avatar Jul 03 '18 17:07 grantr

As mentioned above, please take the time to read issue #412 where this resource was introduced and and its name picked. In particular, look at the results of a previous user research study.

Naming is hard: it's not very useful to express opinions or tastes. What matters most is to agree on a methodology and a set of constraints, that we then use.

A few points I want to highlight:

  • Knative runs more than functions.
  • We should keep in mind our personas, in particular, we expect "Developers" to benefit from a serverless experience, and consequently to not have to interact with the underlying created Kubernetes resources.
  • We can expect the Knative project to provide a CLI experience different from "bare kubectl" at one point, or cloud providers to deliver a dedicated CLI experience. In these cases, the context is clear and these CLIs do not need to use a fully qualified name.

steren avatar Jul 08 '18 19:07 steren

The "set of constraints" should include not using names that conflict with common Kubernetes resources, especially if the latter resources are among those that are generated by the newly defined resource (as is the case with the Knative Service ultimately generating k8s Services via the Route). Even though Knative users will be operating at a higher level, the k8s Service in particular is still going to be among those that any user deploying workloads to Kubernetes continues to be aware of and interact with, because it is the core resource for defining addressable endpoints in Kubernetes. Users will interact with k8s Services when integrating with third-party applications or middleware installed via Helm as well as defining ExternalName-typed k8s Services for interacting with addressable endpoints outside of the cluster. Finally, the k8s Service plays an important role as the interaction point for Istio resource configuration, and that in turn is an important part of Knative. There is no chance that a user of Knative will not need to be aware of the k8s Service resource, and therefore any Knative user is going to face the confusion that this conflicting name creates.

markfisher avatar Jul 08 '18 22:07 markfisher

There is no chance that a user of Knative will not need to be aware of the k8s Service resource, and therefore any Knative user is going to face the confusion that this conflicting name creates.

I would like to push back against this given the personas link @steren added above.

If we create the end product properly, "developers" should not need to understand anything about k8s in order to use it: they simply provide a container image or source and have their function/app/container running. As Steren said, we don't expect them to use kubectl or ever see actual k8s resources. We have solid user research from #412 indicating that "service" is the right term for these folks.

"Operators" managing knative will 100% need to be familiar with k8s terminology, and will need to understand that k8s, Istio, knative, service-catalog, and likely many other product provide "services" as a high level construct. As @kelseyhightower told us, k8s namespacing exists to help solve these issues.

Assuming operational overhead is low (which, if it isn't, the product isn't likely to gain widespread adoption, because if everyone has to understand k8s anyways, what value are we adding?): the vast majority of folks interacting with knative will be developers with no knowledge of k8s. Given this, we'd like to optimize for minimizing developer confusion, as operators are already familiar with k8s concepts (or will have to become so) and will be able to quickly find issues like this one and like #412 describing why things are the way they are.

We spent months arguing about naming internally before results from the research above came back, and found having actual data on what our users thought helped immensely. Moving forward, if folks think they have a better name, I'd ask that they provide research indicating how users find the current name confusing, and how a proposed name is less confusing to that group of users.

I know many of the folks on this thread weren't involved in those discussions or in the research process, so I understand it may be hard to feel bought in to this decision. Ideally #412 provides good background and data to help you feel comfortable--otherwise, please let us know how we can follow up on our own research to solidify results (or, prove our previous research incorrect).


As a side note here, there are still open questions in my mind about if Istio is the right level of abstraction for developers, or if it's in the operator realm. For example: a common developer scenario involves setting up Auth token validation, and Istio RBAC is likely not what that group wants/expects. Something more akin to what's exposed in Ambassador in their AuthService or more ideally something like what Cloud Endpoints Open API spec auth offers is likely to solve their problems faster and with less overhead. I would expect that we'll see an an "abstracted Istio" akin to what's provided in knative at some point, providing this high level functionality.

asciimike avatar Jul 09 '18 01:07 asciimike

In light of the DevOps movement, it seems misguided to view the Developer and Operator roles as being as completely distinct as you've described. The personas may represent ideals, but in reality things will often be blurrier. One thing developers appreciate about the Kubernetes model is that resources are layered so that a higher level experience is available without turning the system into a black box. For example, a developer can push Deployments while still monitoring at the Pod level when necessary. Of course Knative will provide an even higher level experience, but I would find it quite unfortunate if the same model of layering were not viewed as a significant asset.

For the record I have read #412 and am not convinced. As for the user research, I don't think a poll of 47 users where roughly 25% agreed to a name is such "solid" evidence that this should not remain open for debate. You have a larger community now, and many of us are registering concerns about the confusion this name causes as we imagine the community continuing to grow.

I understand the role of namespaces for Kubernetes resources, but I'd be interested to hear @kelseyhightower's opinion on the particular points being raised here. Having a "Service" whose Controller ends up generating another "Service" seems wrong regardless of those 2 types being in different namespaces.

markfisher avatar Jul 09 '18 01:07 markfisher

Thanks @steren for the background and research data. It appears incongruous to me that we have named our organization Knative (Kubernetes native) but are naming its resources as if the user doesn't know anything about Kubernetes.

Perhaps in our naming of Knative resources we should consider primarily the Operator, who understands K8s and expects Knative to be coherent with existing concepts.

Regarding the Developer, perhaps we should assume that the overall product will be repackaged in such a way that they don't have to think about K8s resources. Along with tooling to provide them with a better user experience than kubectl. At that point, the product provider can rename the system concepts to suit their needs, Service being the most intuitive name for the top-level resource.

josephburnett avatar Jul 09 '18 14:07 josephburnett

Regarding the Developer, perhaps we should assume that the overall product will be repackaged in such a way that they don't have to think about K8s resources.

I want to comment on this last point: I consider consistency between API, CLI and UI important. Also, consistency between the Knative API and all "packaged Knative" matters: tooling (e.g. a CI/CD tool) should work seamlessly across all of these because they share the same API, and these tools will need to pick a name. Developers who are familiar with a resource model in one provider should not have to learn new names when switching or using tools.

The Developer persona should not be removed from this discussion, on the opposite, I claim this is the persona we have to pay most attention to because they represent the end user of this product. Notably, Knative Contributors are most likely not in the target audience because they understand too well the insides of Knative or the Operator role. This is why doing research with each Persona matter.

steren avatar Jul 09 '18 15:07 steren

Last week I conducted research with 47 developers to assess names for Steve. https://github.com/knative/serving/issues/412#issuecomment-377058905

@tliberman, was this research done for the Developer persona specifically? What about the Operator persona?

My theory is that the Operator would find Service a confusing name for the top-level Knative resource. This would show up in MaxDiff, no?

Knative Contributors are most likely not in the target audience

Agree.

josephburnett avatar Jul 09 '18 15:07 josephburnett

cc @sebgoa

mattmoor avatar Jul 09 '18 15:07 mattmoor

I know naming is hard but the current situation with Service is as mentioned couple times a difficult CLI experience:

kubectl get services.serving.knative.dev
NAME                CREATED AT
helloworld-python   14m

In the user survey it is mentioned that the Service will be in a namespace (https://github.com/knative/serving/issues/412#issuecomment-377073705 , comment that I don't understand). But here being a new API group kubectl UX is painful.

To avoid emotions, maybe we can re-run a wider study with the group working on Slack.

sebgoa avatar Jul 09 '18 15:07 sebgoa

@sebgoa namespacing means what you're showing above: having to type the fully qualified name services.serving.knative.dev instead of just services. Agreed it creates a less than ideal kubectl experience. As has been mentioned above, we don't believe that kubectl will be the primary developer interface for knative; instead, we'll have a more imperative, task oriented CLI that that offers commands like knative services list (which may just call kubectl get services.serving.knative.dev under the hood, but is easier for non-k8s devs to understand). FWIW, I believe @mattmoor mentioned that we could provide "short names" to make the operator experience mentioned above less painful. Maybe this is where kservice or similar could come in.

asciimike avatar Jul 09 '18 17:07 asciimike

@josephburnett if we survey the slack group (who I assume is primarily composed mainly of knative contributors), we'll likely get results very similar to what we've seen on this thread and internally at Google.

That said, I agree that it's likely that operators or other k8s-first developers will find the multiple Services confusing. I think this is a necessary tradeoff.

If we build this product primarily for k8s developers (or "people like us"), we won't expand the market, and I worry that we won't see significant adoption. The vast majority of the worlds developers don't know k8s, and adding autoscaling or source-to-container builds to k8s won't automatically make everyone want to use k8s directly. I think we need to provide a higher level abstraction that breaks some from k8s in order to meet developers where they are.

The fact that knative is built on k8s provides necessary escape hatches for developers who grow beyond what is provided and need custom functionality or different scale/performance/cost characteristics. We know that a small percentage of high value customers will need to do this, but we also know that a large percentage of customers who want to become high value customers are attracted to this, even though the vast majority of customers will never grow to the size where they actually need it.


I think it's also a "bug" (in expectations, not technically) in our docs we tell developers to "install knative on their k8s cluster" since this is really an operator action, until we have hosted knative implementations that developers can simply start using without any knowledge of k8s. IMO we should really be striving for the developer experience being "try a tutorial on this tiny hosted version we have, or go to your favorite cloud provider and deploy immediately" while the operator version should have "install on k8s so your devs can have the above experience."

asciimike avatar Jul 09 '18 17:07 asciimike