MicroServices under Golang-Part 10th-Summary

Source: Internet
Author: User
Tags docker compose
All the way, what a wonderful journey! It took several months to complete the articles. The first article, published at the end of 2017, is now half past 2018, and I'm just writing the last article in the series. It took me a lot of time and energy to write this series of articles. This is a daunting task for me, first of all because I have a general understanding of the various parts of the knowledge, in fact, part of the original purpose of writing these articles is to improve my understanding of the relevant knowledge, but also want to get feedback from the community, there is no better than the community recognition of the better things. In the process of writing, I learned a lot, and a lot of cool and intelligent people have discussed, they gave me a lot of help. Second, this series of articles covers a wide range of stages and how they are deployed, using many different technologies, such as databases, taking providers, best practices, and so on, which is the hardest part of my work. But in addition to these, I also learned a lot more than imagined things, I am very happy that many people send me e-mail, these months I have received more than 50, some asked me when the next post, some thanks to me, some encouraged me, which is really helpful to me to complete this series of articles. So I would like to thank the people who emailed me, at the same time I am also very sorry that some of the mail I reply is not too timely. I would like to thank Asim, who often takes the time to answer some of my simple questions about MicroServices, in return, I have given this series of articles to the official organization of MicroServices, which they put in the Examples/tutorials directory, hoping to help people with new contact with MicroServices. I would like to thank Ke Ding, who translated this series of articles into Chinese, whether you know or not, the size of the Go community in China is very large and growing, so I am very grateful for his contribution. If you are reading this article in a non-native language and want to translate it into your native language, email me and I will post the translated article link in the original text. I received an email saying that I wanted to translate these articles into Russian, but unfortunately I couldn't find the email, so if you are reading this article, please send me an e-mail, translated into Russian is a cool thing. # # The things I learned and the inadequacies I not only learned a lot of technical knowledge in the article, but also learned some techniques of writing articles. The biggest thing I've learned is: keep it simple and don't involve too much in an article. This has many advantages for both the reader and the author. During the writing of these articles, there were many times when I felt I was dealing with too many things at the same time. I created several microservices, and when I accidentally made a few mistakes in a microservices, I had to change the code of several other micro services. This is a very tedious thing for me, and it may be the same for the reader. The biggest problem I've ever had is that I couldn't find it.To a suitable method of putting a few microservices into a project. The community gave me some good advice, but I thought it would take a lot of time to realize these ideas, so in half I had to split the project into several sub-projects, and I felt that the decision made me lose a lot of readers, which I found unsatisfactory in writing this series of articles. This is obviously ignoring the reader's feelings, and on some levels, I would like to explain again: if I rewrite it, I either take the microservices of the first article as a separate project, or find a suitable way to put all microservices into one project. I also lost the code branch of the previous sections, which means that the previous code cannot be checked out at this time to see the code evolution process. I found that when I use Go's Vendor mechanism, I don't know when it will produce many branches, which makes maintenance very difficult. But the loss of these valuable branches still bothers me. Another problem is that, as I understand it, I have to go back and, based on my new understanding, modify the previous code, sometimes as if it were a completely new article. Fortunately, people in the community have pointed out some of the issues in the article, so if you find some inconsistencies, let me know. The last question is: I feel that some articles are not written in depth. Short, covering only the most basic content. This is because of the technology involved too much, if every technology is written very thin, I am afraid to never finish this series of articles. But if you want to know more about any technology, please email me or follow me on [Patreon] (https://www.patreon.com/ewanvalentine), if there is a lot of people who need it, I will write an in-depth explanation of the article. # # # How did they do it? Through Google's analysis, these articles have more than 50,000 reading volume, I feel very happy about this data. You may have noticed that there are some ads in the article, but they do not generate much revenue and are not enough to pay me for forgetting to turn off the cluster running on Google Cloud. But this is not a problem, I do not write these articles for money, these advertising revenue is just a good reward. You may also have noticed my Patreon at the beginning and end of each article, I have recently been sponsored by a person, and I am very grateful to him. If you think these articles are valuable to you, and hope that you can provide some sponsorship, this will allow me to spend more time to write these articles. # # The last thoughts on microservices although I have found that microservices have many benefits, I am cautious about just because it is a good idea to use it in a holistic manner. For everything, it takes time and space. This application, which we finally completed, was made from an uncut primitive application, polished by the techniques and patterns described in this series of articles, and finally turned into a few useful microservices. I write thisPart of the reason for this series of articles is to share what I learned in the process of splitting a large application into a few microservices, and to get a deeper understanding of microservices through community feedback, and also to verify the correctness of my approach. Have we optimized the microservices too much? Very likely, our original application worked very well, the program code after a lot of modifications, which contains a lot of code that will never be used again, or the company's previous iteration of the product, due to compatibility issues remain. I want to say: Now this program is very miscellaneous, more difficult to maintain. Our example of micro-service is just a pilot product and we are considering implementing some business cases, but we are not really sure whether to extend this sample product. I feel like I've added more and more things to our application, but only a handful of them have been applied, making the application very difficult to maintain. Perhaps the use of micro-services is not very mature, but I feel that micro-service technology can let us build a better prototype, to test some features, if not appropriate, can be discarded, it is flexible. So while it may take a lot of effort to adopt this new model, it can give us the flexibility to try new ideas, write code that is clearer and easier to maintain. I even found that we were better at writing tests than anything else would be simpler in a project. It may be a little early to use microservices as a simple sample program, but I'm glad that we finally did it this way. Many people will tell you that if you are about to start developing a project, you should try not to use microservices, because adding features to MicroServices can take a lot of time. But I think it's only part of the story, it's best to make things right at the beginning, so you have a good foundation for building, and I don't think it's too hard to add functionality to microservices. Rather, it would take a lot of time to create a micro-service from scratch. If the argument is here, I agree with this point of view. But I think tools and concepts are becoming simpler and easier to understand, and creating and maintaining microservices doesn't take much time and effort. Currently, most cloud service providers integrate Kubernetes, where the information is all there, and do not encounter too many problems when applying the methods in this article series. AWS even provides tools like pargate to help us handle most of the hard work. Don't hesitate, if you have multiple features in your program, be sure to consider whether you can use microservices. Don't be intimidated by the fact that many people say no, it's not hard to use microservices right now. But then again, if you are more satisfied with the existing procedures, do not have to adopt a new method of feeling a great pressure. The basic principle is: if you can still use, do not modify it! # # What's next? First of all, I want to tidy up the feedback information that has not been processed, to improve some of the previous articles, I will not forget this thing because I have finished writing, I will often look back to see them,If I have a more in-depth understanding of which part of the technology, I will update the relevant article. Having finished these articles, I felt very good, so I wanted to take this effort and start writing a new series of articles right away. I've been thinking about what I should be writing for months, and I decided to write about serverless. Of course, with Golang. But this time on the AWS Lambda platform, I will also focus on creating a complete product, not just some code examples. I'll use AWS serverless technology to create an example program that's not too practical but has a lot of features, but I'm also thinking about moving these articles from my personal blog to some more professional Go learning sites. But it may be a bit difficult to implement because it may need its own brand and market, but that's just what I'm thinking about. In short, you are always welcome to feedback on these ideas. Once again thank you for your support and feedback: # # Final Article List-[Getting started, Grpc] (https://ewanvalentine.io/microservices-in-golang-part-1) [The GCTT "(https://studygolang.com/articles/12060)-[Docker and Micro] (https://ewanvalentine.io/ MICROSERVICES-IN-GOLANG-PART-2) [GCTT] (https://studygolang.com/articles/12094)-[Docker Compose and Datastores ] (https://ewanvalentine.io/microservices-in-golang-part-3) [in GCTT] (https://studygolang.com/articles/12452)- [Authentication and JWT] (https://ewanvalentine.io/microservices-in-golang-part-4) [GCTT in translation] (https://studygolang.com/articles/12485)-[Event brokering] (https://ewanvalentine.io/ MICROSERVICES-IN-GOLANG-PART-5) [in GCTT] (Https://studygolang.com/articles/12488)-[WEB clients] (https://ewanvalentine.io/microservices-in-golang-part-6) [translation in GCTT] (https:// studygolang.com/articles/12798)-[TerraForm] (https://ewanvalentine.io/microservices-in-golang-part-7) [translation of GCTT] ] (https://studygolang.com/articles/12799)-[Kubernetes] (https://ewanvalentine.io/microservices-in-golang-part-8 ) [GCTT] (https://studygolang.com/articles/12836)-[Circleci] (https://ewanvalentine.io/ MICROSERVICES-IN-GOLANG-PART-9) [GCTT] (https://studygolang.com/articles/13515) If you find this article valuable, and you are using Ad-blocker (who can blame you). Please give me some sponsorship for the time and effort I spend, thank you very much! [Https://monzo.me/ewanvalentine] (Https://monzo.me/ewanvalentine) or, in [Patreon] (https://www.patreon.com/ewanvalentine), sponsor me so I could write more articles like this.

via:https://ewanvalentine.io/microservices-in-golang-part-10/

Author: Ewan Valentine Translator: Jettyhan proofreading: polaris1119

This article by GCTT original compilation, go language Chinese network honor launches

This article was originally translated by GCTT and the Go Language Chinese network. Also want to join the ranks of translators, for open source to do some of their own contribution? Welcome to join Gctt!
Translation work and translations are published only for the purpose of learning and communication, translation work in accordance with the provisions of the CC-BY-NC-SA agreement, if our work has violated your interests, please contact us promptly.
Welcome to the CC-BY-NC-SA agreement, please mark and keep the original/translation link and author/translator information in the text.
The article only represents the author's knowledge and views, if there are different points of view, please line up downstairs to spit groove

315 Reads
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.