How does a microservices is essential in application development - microservices

referred to some posts and videos for Microservices that how it works and what is the benefit of it but none of the examples or videos satisfy my confusion. can anyone help and can share some live examples which can be related to the App development methodology.

It isn´t essential but it is necessary according to the problem you are trying to solve. The fact that microservices becomes a popular way to build application does not mean it solve all the problems.
There are cases where you should rethink the use of microservice and to build a monolith application can be good enough for your scenarios or you will end with a distrbuted big ball of mud.
The Law of the instrument says something like:
If the only tool you have is a hammer, everything looks like a nail.
So, we can not make the assumption that microservice is essential for all scenarios in application development.

Related

Is there enough to working with Spring Boot if I known to perform CRUD Operation?

I am a completely fresher for Spring Boot. I had learn to perform Basic CRUD operations using REST API. That basic knowledge is enough to working with Spring Boot Project. Can I able to work with that?
No one is technically perfect!
Every day we are exploring new things and implement new solutions as per the new business requirements. The developer should possess a good set of problem-solving skills. That’s because it’s common for developers to come across multiple programming problems while building just about any solution.
If your lead assigned a task to you explore quarkus and implement a simple CRUD operation using go language what you will do?
"I don't know golang", Is this your answer?
Qualities of a good junior software programmer
Learn new things daily which must be useful to the growth of the company, your team and you.
Problem Solving and Logical Thinking
Written and Verbal Communication
Teamwork
Interpersonal skills
Time management
How do I search for answers from StackOverflow like a PRO? This is a very important skill set, Really, I am not joking.
Health - Health(Physical/Mental) is an important asset, don't take official things personally. Manage stress etc...
Coming to technical side
It would be good if you know at least one programming language, in your case java is fine. But if you have the listed skill sets you can learn anything very easily.
Regarding Spring boot
Do you want to become an expert in the Spring framework? Work with one big project, whatever domain.
Refer - https://www.baeldung.com/
Once you become pro - Refer - https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/
As a starter this is fine, but if your application is going to face real customers/users and want to evolve your application over time, then you would need to consider concepts like below
Login/logout security with Spring Security (if stateless then JWT is a good choice)
Evolving code and database with versions of your software (can use Liquibase to evolve and maintain DB changes ).
Handling exceptions as Aspects from Spring.
Having coded business errors so your team can resolve them and classify them accordingly.

Micro Layers: Do not add functionality on top but simplify overall Dependencies

I was going through design principles but could not understand this principle(avoid Micro layers), what would the significance be. I tried to google it but could not find any examples or explanation for this design principle. Could it possible for someone to explain this with example,what advantages it has in which scenarios? Does layering not localizes changes and reduces ripple effect of changes in software?
You’ve misinterpreted the way the principle is written. The author wasn’t trying to say “avoid micro services”. They were trying to say “When dealing with a micro service, don’t keep adding features or functionality to it. Instead, add an additional micro service to deliver the new functionality.”
The intent is to help you keep each micro service focused on a single task. This simplifies any system that depends on your service. And, it means you can more easily update your service — possibly by quickly rewriting it if you come up with a better performing design, for example. It’s hard to say “we’re going to rewrite our server” if that’s a six month task. It’s much easier when it’s only a one- or two-sprint task.
This thread needs a reboot coz of 2 reasons.
The Clean Code book that I have doesn't have a mention of Micro Layers. So not sure where the now "omni"-downloaded Clean Code cheat sheet got this from.
It would help if someone can guide me to where in the Clean Code book I can read on this one.
Am not fully satisfied that we re discussing Micro Layers in the scope of Micro Services. Bringing in an arch pattern Micro Services is not helping discuss a topic in a book that was written at a base level of Code and OOAD and a bit of design.
Instead for practical illustration purpose a code level example of the above statement is needed.

Looking for help on how to manage microservices in Golang

Currently, I deal with microservices on a daily basis at my 9-5. Most everything that I touch is written in PHP, and as only a software engineer, SysOps manages everything that has to do with apps running, etc. I have a little familiarity in how the infrastructure and build pipeline is setup, but I still am not a SysOps or DevOps guy.
With that said, I love Golang and for a side project, I am creating a fairly large web application with a lot of moving parts. Writing and designing the code is easy as I have learned a lot from my day job, but deploying and managing Golang web apps (as they are executables) is quite different than updating files for apache to serve.
I have researched a lot on how I would build and deploy my microservice apps, but I keep on thinking of more problems that will need to be solved along the way. I have tinkered with the idea of using Docker for all of this, but I would rather not have the added complexity of learning that and managing storage for all of the images as that could be large.
Is there a best practice or a good way to manage Golang applications after they have been deployed? I would need a way to keep track of all the microservice processes to be able to see if they are still up and to be able to stop them when a new build is going to be deployed.
As for the setup, just assume that all the microservices will be run on the server, not in a container or in a VM. They will all need to be managed, but also able to act upon independently. Jenkins will be used for building and deploying. I will be using Consul for service discovery and possibly configuration, and most likely health checks on the services. I'm thinking of having each microservice register itself to consul when started and deregister when stopping.
Again, I am looking for a solution that is hopefully not just "Docker". I also had thoughts into creating a deploy service that manages the services (add and remove), as well as registering them in Consul. So if I cannot find a better solution, I might go that path. Any help is appreciated.
** Sorry if my question was confusing, but since a couple people answered on the wrong topic at hand, I will try to clarify. I don't need any help making the microservices, or even know anything about them. I brought that point up as to why I need to ask my question. Basically what I need is just the ability to manage the running go processes of all my microservices so I can do deployments and be able to stop and start processes to update the code. It is easier when you have to worry about one app, but when you can have up to 10-15 difference microservices they become harder to keep track of. After my own research, it seems that Supervisord is what I am looking for, but I'm not sure. That is the direction I am going in with this question. Thanks.
Golang is great to use for microservices, but I would say there is not so big difference of managing golang or other languages microservices.
What I would say is golang specific:
you don't need to install anything on servers since golang is compiled to single library
you can take advantage of std lib golang rpc package and gob binary decoding, instead of usin 3rd party solution (gorpc, protocol buffer etc)
Other than that you need to use your own judgement. There is plenty of ways of doing one things in microservices world; one day you will implement solution A but when after 3 month you will see that its better to do B, do that.
In internet, there is so much reading about microservices. I will recommend you 2 good resurces: https://books.google.co.uk/books/about/Building_Microservices.html?id=RDl4BgAAQBAJ&source=kp_cover&redir_esc=y&hl=en
And article: http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
Remember, microservices are not a golden bullet, they often can help making application easier to maintain and grow, but from the other side require lot of additional work, consequence in specifying API contracts and strong devops culture.

Websockets: scaling the codebase

I have been given the task to see if it's feasible to convert an Ajax-based application to Websockets. Fundamentally, I'm clear on how to go about doing this. My question, is regarding best practices regarding scaling the codebase.
The application in question has about 80 different Ajax requests. Some of these are clearly user account related, some are related to the operation of the actual application and yet others are of a global nature (statistics, etc) and finally we have a chat service.
I'm wondering if there are any best practices on how to implement something like this. It's entirely possible to do all of this through the same WS channel, but I'm considering an approach where each functional group connects to a different WS channel/topic. I think this might help keep the codebase clean and separate the different functional areas, but on the other hand I have no idea about the performance implications of this.
I've looked around for tutorials on this subject but it seems that all Websocket tutorials are of a rather basic nature and don't focus on the issues of large scale websocket development from a point of keeping the codebase clean vs performance issues.
Thanks for any insights.

Scalable web project architecture

Where do you get info about 'how to build scalable, high perfomance web app'? I mean architecture, best practice ets. regardless of platform and language: .net, php, java ...
Did you get your own 'epic fails' in your project and then refactor your system in a few nights or get info from internet?
Is there any communities where I could share my own expirience and get some response?
Yeah, I know that every project is individual.
You can read the High Scalability blog. If you have questions about architechture and scalability, you can always use StackOverflow unless the question is subjective.
It is not easy to answer this question. Language and Platform takes a secondary place when thinking about scalability.
"Scalability is actually a property of a system, not an individual layer of that system, infrastructure. Even with the best, sexiest, most automatic scaling layer, you can easily write code that just doesn't scale. - glyph"
How ever, you can immerse into a very good collection of resources on this issue at
http://www.royans.net/arch/library/
Just focusing on the web part of scalable web architecture, you might want to take a look at these 7 reasons why you should be using XMPP instead of AJAX especially if your web app needs to scale with lots of real-time social features.

Resources