by advisedwang · 4y ago · 0 comments
* If you split functionality out of one service, you end up with the old service's name implying it does both. E.g. you end up with a "auth" service that only handles cookie auth but not API keys.
* If you expand the functionality of a service, you end up with a service's name not really clueing you in to what it does. E.g. "metadata" service that actually now includes smaller objects inlined into the database.
* When you make a rewrite of a service, until the old one is fully retired you have two confusing names, and I hope you don't pick "new_auth" or something as that will be even more confusing after the first is turned down.
Also codenames make searching for a particular component really easy. If you have to search for "auth" you will get all kinds of irrelevant results. If you search for "kazoo", you'll probably only get docs related to kazoo!
If you change what a class does you need to change the name, if you change what a method does you need to change the name, same for services. If it's too hard to change service names, that's your problem.
> When you make a rewrite...
Internal changes in a service must be transparent to consumers. If consumers are aware that you are doing internal work then you are doing something wrong.
Codenames is the equivalent to call your variable John.
It's easier to change your service name that a class name or method in a popular library used by millions of developers, and it is done because it's the only thing that makes sense.
Can you imagine that your framework class to store data was named "Mercury" and the one to manage HTTP connections "Saturn"? Nobody would use such a thing.
Good descriptive names help to use software properly. If you cannot change a service name because it's too costly, review your development process.
One is a breaking change, one is an official fork.
I have seen classes with tens of thousands of lines, it was not good. Too big services are equally error prone and hard to work with.
Imagine that you have a singleton object floating around your system, every single function written anywhere in the system must interact with that object heavily, and as a consequence everyone is familiar with what the object does and where it's defined.
What problems do you think might arise if that object were named "John"?
It would be the same for the computer running the code, the problem is for the developers trying to understand how to use it, how to expand it, etc.
Everything you list is potentially a problem, but not a problem that got worse when we named the system John.
My experience is when we use "trivial" names folks just use abbreviations or other methods to disambiguate them anyway. For example, look at all the AWS services. Does anyone ever say "Elastic Compute Cloud" service? Come to think of it, that does seem like a fair compromise to have some formal-ish name for the service and just use a codename when referring to it.
"Codenames" are used for products for which the "name" is recognized as significant to the product. Thus, choosing the name is a project of its own -- and might take quite a bit of time -- while you might want to start work on the product before you finish picking the name. (Indeed, the work might inform the name!) But you have to be able to refer to the product, so you just give it some other name. When it's ready, you give it the "name".
That's not what's happening here; what we have here is a big complicated system with a name. We don't expect to replace the name, but we do need to have it so that we can talk about the system.
1. 10 services named after Darkwing Duck characters
2. 8 services with descriptive names, and 2 with slightly wrong names
I think most people would prefer 2