1718 Summary and Plan

2018 has come quietly. Looking back on the past year, I have gained a lot and am grateful. In the coming year, my heart is full of expectations, and great changes will take place in both work and life. On the evening of the first day of the new year, I recorded my thoughts and thoughts and shared them with everyone, so as to motivate myself to work harder in 18 years.

17 years summary

I am currently working at Xiaomi and engaged in development work in the "Xiaomi Network Intelligent Customer Service Project". The project mainly includes three major parts: online customer service, intelligent robot, and intelligent data analysis, as well as hotline, email, work order and other modules.

In March 2016, I joined the team, and there were only 4 people at the time, each of whom was responsible for multiple sub-projects. After understanding, there are many functions that the project wants to do at the beginning, the design is relatively large, many people have invested in it, and many sub-services have been formed. So before the first half of 2017, I have been maintaining the project, solving some online problems, and realizing some small business needs. In addition, Xiaomi's management at that time was relatively flat, project management and team management were not very standardized, and they were relatively loose, and their technical and team collaboration capabilities were less improved.

In the second half of 2017, Xiaomi's development growth rate was obvious, and its domestic and foreign performance has been greatly improved. Management has also begun to pay attention to it, and many project managers have been recruited. With product function planning for the "Xiaomi Network Intelligent Customer Service Project", the development team has gradually expanded and gradually improved.

There is another point that has a great influence on me. The development leader of our team joined in the middle of 2017 and has more than 10 years of development and management experience. From him, I have learned a lot in task planning, execution, and teamwork.

The following summarizes the past year in terms of main work, online problem handling, planning execution ability, and family.

The main work

I am mainly responsible for online customer service, the main technical points used:

  • NIO
  • Multithreading
  • WebSocket Protocol
  • session state management
  • CAS single sign-on
  • Shiro permission control

Main frameworks and components used:

  • SSM
  • Redis
  • RabbitMQ
  • ZooKeeper
  • Thrift
message platform

The most important point of online customer service is to ensure that users and customer service can communicate online, similar to IM. The existing system lacks message confirmation and retransmission mechanisms, and does not support multi-terminal message synchronization. In 2017, under the guidance of the technical director, the "online real-time chat" module was reconstructed, abstracted, and turned into a general "message platform" 』:

  • The long connection access layer still uses the websocket channel implemented by netty, which is more general than before, and it is also very convenient to extend other protocols. In addition, it can support multi-instance deployment and restart at any time;
  • The message storage layer, for convenience, uses MySQL+Redis for storage, which ensures the order of the messages and realizes the message confirmation and retransmission mechanism;

It is a little regrettable that in the second half of 2017, the planning needs are more and more urgent, and the number of people is relatively small, so it has not been able to be officially launched. It must be promoted in 2018.

Maven relies on unified management & tool class encapsulation

As mentioned earlier, the project has many sub-services, and the maven configuration of each service is very similar. It is not very convenient to modify all services for update and maintenance. After research and thinking, it was decided to manage public dependencies, version declarations, build processes, and maven plug-ins in a unified manner, and abstract a parent pom.

Maven itself supports parent pom. Each sub-project only needs to declare that it inherits the parent pom, and then it can directly declare the required dependencies, and there is no need to declare the version and build process.

In addition, some tool classes of other groups in the company are also declared in the parent pom. Some tool classes specific to the customer service project are moved to the project where the parent pom is located and declared in the parent pom.

Domestic and overseas code branches merged

Due to historical reasons, the domestic and overseas code branches are different branches. The overseas functions are relatively less than those in China, and the overseas has not been updated for nearly a year. At one point, the business presented an overseas requirement, which had already been fulfilled in the domestic branch. After confirmation, some functions overseas are available in China, and the interaction and operation are the same, but some basic storage components are different. The final decision was to merge domestic and overseas branches to facilitate future functional expansion and save development time and maintenance costs.

The upgrade process took 2 overnights (not continuous). The process will not be described in detail here, but briefly summarized:

  • Before major changes are launched, a rollback plan must be prepared. If the upgrade fails, it can be rolled back in time without affecting the existing business;
  • Conditions permitting, it is best to have a pre-launch environment, and try to simulate the online as much as possible, because the overseas network structure is more complex, although the test environment is normal, various problems may occur after the launch;
  • When going online, relevant people must be present, and if there is a problem, they will coordinate and deal with it in a timely manner;
Advancing collaborative development practices

I believe that most teams are using git for code version control, but to really use git well, to develop a project collaboratively with multiple people, a set of workflow specifications needs to be specified.

I learned from the popular git flow specifications on the Internet to form relevant specifications, explained the use of various scenarios, and made a sharing. Now it is in trial operation in the project, and it will be promoted next year.

Further reading:

online problem solving

Problem handling is also a very important ability, and it can better reveal a person's ability. When encountering a problem, don't reject it first. It is an opportunity to improve your ability. After the problem is solved, you should make a summary and review, and next time you encounter a similar problem Can be quickly located and processed.

I have encountered many problems in 2017. Here are two summary of the problems (summarized at that time).

Test environment - customer service cannot be accessed
  • Problem Description
    • When the browser accesses the customer service end of the test environment, it directly prompts a 502 error and the background service is unavailable;
  • Troubleshooting process
    • Check resin server log and program log, no abnormality is found;
    • Check the cpu indicators, no exceptions are found;
    • Check the jvm memory usage and garbage collection, and no exceptions are found;
    • Looking at the jvm stack, it is found that there are many threads waiting for database resources at the same place, and the database resources may have been exhausted;
    • Focus on the "thread waiting code", open the database connection pool log, and try to reproduce locally;
    • Colleagues reproduced locally and found that when calling some methods of snaker (an open source workflow framework), a lot of connections were occupied, and they were not released after use;
    • By reviewing the code, my colleague found that after adding the Spring transaction manager to the Service class, the problem was solved;
    • By looking at the snake source code, when the snake processes the workflow, it aims to return the connection for the last operation. If transaction management is not turned on, it will acquire multiple connections, but only release the last connection, resulting in connection leakage;
  • Summarize
    • When troubleshooting problems, you should not be too anxious, clarify your ideas, and conduct inspections step by step;
    • Cherish the opportunity to troubleshoot and learn a lot from it;
Overseas formal environment - ip whitelist problem
  • problem handling process
    • 2018/02/04, I found that there were often prompts [IP is forbidden to access]. At that time, I thought that my network might be unstable and I didn't care;
    • 2018/02/05, the business began to report the problem of [IP access is prohibited] in multiple customer service, and my colleagues and I began to intervene in the investigation;
    • Tried restarting the service to solve this problem, but it didn't work;
    • Temporarily turn off the ip whitelist function so that the business can be used normally;
    • On the morning of 2018/02/06, I tried to turn on the ip whitelist function, but [the problem of ip forbidden access] still appeared; but I found that the ip of the visitor (my intranet machine) printed by the server was different from my real one; (curl cip.cc)
    • Tell the operation and maintenance of the found situation, and the operation and maintenance begins to investigate;
    • On the afternoon of 2018/02/06, around 4:30, the operation and maintenance located the problem: the information department forwarded the public network IP of a certain domain name to the private line exit, saying that it was to solve the problem of slow international links from domestic to Singapore;
    • Around 5:30, I added the corresponding network segment to the ip whitelist and enabled the ip whitelist function;
    • Follow-up observation, problem solving;
  • Summarize
    • Do not let go of an abnormal phenomenon, and do not reject or be afraid to deal with these problems;
      • Clear: online problem handling ability is a very important ability;
      • Analyze the possible causes of the problem as a whole;
    • If the online has been running normally, and suddenly a function is unavailable, it is necessary to consider some external factors, especially the network;
planning execution capability

From the team leader, the biggest benefit is the ability to plan and execute, which allows me to work in an orderly manner, from beginning to end, more fulfilling and more effective.

Let's share our team and my planning execution process below

  • Monthly summary and planning at the beginning of each month;
  • Fill out the weekly report every Thursday afternoon. I will summarize in detail the completion of last week's plan and next week's plan; (especially important, I will fill it out very carefully)
  • Weekly meetings are held every Friday;
  • Every Friday, I will synchronize the main work for the next week to the Outlook calendar, and subdivide the tasks of each day;
  • collaborative process
    • After receiving the demand, the product is first analyzed, and the product documentation and preliminary prototype design are given;
    • Develop to read and understand product documentation and record questions;
    • Participate in the requirements confirmer together with the product and development, discuss some details and questions, and determine the final requirements and prototypes;
  • other
    • Team tasks are managed by teambition, and all tasks of the team can be viewed;
    • Key tasks will be communicated before get off work every day to ensure that the tasks are carried out as planned;

I have followed the above process strictly and have benefited a lot.

family

For reasons of space, I won't say much, and summarize two points:

  • My wife worked hard and was pregnant with a baby. I couldn't take good care of you. Thank you for your tolerance;
  • Thank you mother-in-law for quitting her job to take care of your daughter, it's hard work;

18 year plan

technical learning

I will learn the following related technologies in depth:

  • instant messaging
  • NIO
  • message system
  • Distributed cache
  • spring boot
  • data analysis
management ability

In 2018, I will lead a group, spend more energy on management, read relevant data, learn more from excellent people around me, and strengthen collaboration and communication between groups and departments.

family

My baby is due in March and I will spend a little more time learning how to communicate with her. My wife will work harder, and I will tolerate her more and accompany her.

love story

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325486384&siteId=291194637