Golang RABBITMQ Practice (verbose)

Source: Internet
Author: User
Tags rabbitmq
This is a creation in Article, where the information may have evolved or changed.

1: Introduction to the background

I am a. NET front-line development, leaving the Royal Park in June this year to go to Mordor, after entering the Mo Jiang Internet online education company. Now just positive, in this short three months of time, Mo Jiang to me is the career road subversive change.

. NET Technology fans = Nodejs/java/golang

Before that, I thought I would go down on the. NET platform, because I like the C # language so much, I think it's a beautiful introduction, VS IDE is known as the cosmic artifact, coding so happy,but when our weekly technical discussion meeting, I really realized that I was a frog in the pond.

2:c# and other languages I've come into contact with

The World War on C # and Java has never stopped, and I often think about 6 years ago when I was in college, when some unscrupulous training institutions went to our department to recruit, a lot of demeaning C # time, I was arguing. However, time is changing, with my March months of contact with other languages, but also in the reflection, c#/.net really so good?

The following only represents personal views, if there is no welcome to spray.

C # Advantages: God-General IDE, a lot of syntax sugar, strong type language support VAR declaration, good error output and debug, natural Windows platform support, compatible third-party or Microsoft framework, code hints, jumps, readable ...

Disadvantage: Too few open-source frameworks, cross-platform effort, syntax redundancy, dependency on the. NET Framework, and execution efficiency is worrying

3: Talking about Java

The Java language itself and the C # language 80% type, it is easy to learn, can really write Java code, it will feel completely from heaven fell into hell.

IDE is hard to use, whether it's eclipse or IntelliJ idea, it's too painful.

Code hints function can be used, but not powerful, debugging functions generally, write properties are not used, there is no C # syntax sugar, dependent on the JVM

These are not enough to make people feel like walking in hell, the hardest thing is .... Use frames. Because is self-study, no one teaches, video, paste, blog Follow others do still do not make sense, frame too much, compatibility is not good. Once suspected of doubting his life.

But although the Java framework I will not configure, but I will not deny that Java is so cool, but I am stupid, will not use, such as the Sea of open-source projects, so that any one. NET programmer stunned.

4: Try again Nodejs

Nodejs is also in our architecture meeting only to know (the previous knowledge is good shallow ... , do not see, do not know, a look startled, did not expect the JavaScript language can also be done back-end, but also can achieve such a high concurrency. OK then learn ~

Nodejs Learning Simple (web developers will put the ~), configuration simple (NPM), rely on less, the framework is very many, writing Web server simple, efficient execution, high concurrency processing is good ...

The most intuitive, engage a web site, seconds Brush has wood, according to F5 do not put brush there is wood. All right, forgive me. I have not seen the life, and the net comparison, feel weak explosion has wood, do not need to go through the ASP. ASP. NET page lifecycle, no MVC control process required ... Do not need, all write their own, how to write how to write

Asynchronous callback, single-threaded processing, very novel. The disadvantage is also obvious, synchronous execution difficulty, code trouble-checking, debugging unfriendly, single-threaded, do CPU operation may cause asynchronous cannot callback ...

5:go Go

Learning Golang language is so painful, class C syntax, incomplete object-oriented, every time to check the error mechanism, pointers (high-level language has not been used), environment configuration dead trouble, beginners difficult to understand grammar ...

I've been complaining that writing a half-hour Golang is almost as tiring as writing a morning's C #.

However, it can not dispel my passion, because its advantages are too obvious, than C syntax simple but comparable to C performance, to remove the object-oriented complex syntax and restrictions, using pointers can be used according to their own needs to manipulate memory or reference, graceful process, do not need to lock ...

6: More verbose

Write so much, perhaps there are many places is wrong is one-sided, I will gradually improve their

  

7; Why is RABBITMQ

Recently prepared to develop a message-based project, is expected to be a one-day message volume reached millions, near real-time arrival rate, finally determined to use RABBITMQ to do message relay, to ensure that the API to SQL Layer data concurrency control and anti-loss. Originally said to use Windows Server to do, but Windows Server has a flaw can not handle, it will be suspended animation, and it is difficult to monitor, so I would like to be able to use Golang to write services. Results The technical review down, because there is a greater risk, temporarily not adopted, you can do a secondary process to run. I also hope that the existing projects in my hand can use go to deal with, such as Apppush

These projects are all using the RABBITMQ to do the message distribution, the previous distribution client was written in C #, the person has left, so I decided to use go to write a

8: Time

Because I have not used RABBITMQ, I do not know what will be the result, how much energy to spend. Because the non-work content, also does not occupy the work time, so the completion time is also uncertain. Blog Park I should be a week back to update one or two progress, only as a record of this trip

9: Target

I hope I finished the project, can provide a complete set of stable RABBITMQ scheduling system Golang Drive

begin!~~~~~

 

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.