How to scale up your application? — Be Selfish

Dummies Tech Blogger
2 min readJan 10, 2021

Yes, that’s correct. Be Very selfish.

Don’t do anything else. Implement only your business-logic. And do that in the best possible way. Be Selfish. Only concentrate at the job on hand.

Let others do the house-keeping.

Let others implement what you require as services which you can access from anywhere. Get all the help that you require. Don’t do any of the following in your code:

  1. Authentication and Authorization: Ensure that all requests come to you authenticated. No, you will not do any thing to authenticate or Authorize users.
  2. Caching: Don’t do any caching yourself. Utilize a centralized caching mechanism.
  3. Session Data: No, you do not maintain session or session data. Offload this to another service which will be responsible for providing your service the required data. Also, that service should be validating.
  4. Load Balancing: I have seen applications trying to do this, though rare. I am sure, you do not try this.
  5. Service Resolution/Routing: Many applications do it. They maintain a map of service to end-points and have a built-in logic to call them. Absolutely not required. Let it be done by the ESB or any framework that you are using. You just “ask” it.
  6. Dependency Injection: Many applications try this. Absolutely not required. There are frameworks which does them effortlessly.

On your selfish part you should:

  1. Selfishly ensure the above.
  2. Ensure that your application is stateless.
  3. Ensure that you have libraries required to access to all these services.
  4. Ensure that your service is discoverable.
  5. Ensure that your service can be brought up effortlessly by any service deployment framework.
  6. Ensure your service is ‘stateless’ and can be instantiated independently. You will have all the libraries that are required (if required) bundled. All initialization or configuration data can be obtained from other services.
  7. Last but not the least, you have to implement your business logic in the best possible way, without any compromise in the logic and NFRs like memory, speed etc. And devout all your attention to it!!

So, be selfish. Do not try to implement that is not in the business logic. Selfishly push the job to others (services). Selfishly concentrate on your own services. Remember, if everybody does their job selfishly, then everybody will give the best possible output. Yes, there will be conflicts, but then when they come, they will be resolved in the best possible way.

--

--

Dummies Tech Blogger

Software Professional, Software Technology enthusiast, More of me later....