Ali middleware research and development experience

This article was first published on wechat public account: Programmer jianghu

R&d Engr (Java)








I participated in the interview of alibaba middleware department in advance. I went through four interviews and got the oral offer. This is my face book, here to share with you.


A:


1 self-introduction

2. What is done in the project? What are the difficulties?

Java thread pool 3. Java thread pool

4 Redis

5 How to implement the global ID of the distributed system? Zookeeper: Machine number + timestamp.

6 distributed lock solution, redis or ZooKeeper is better, if cluster deployment, high concurrency situation which performance is better.

Kafka knows what message queues are.

Do you want to do business or research?

Linux access is in RWX format. Use a class to support the increase, deletion, change and review of access, and pay attention to the data format and method efficiency, specification. I was given over an hour to write the problem.

It takes nearly 30 minutes.


2:

1. Describe the project you did and the difficulties involved.

What is the function of reflection?

Data warehouse, multithreading and concurrency tools, etc.

4 private cloud, Docker and K8S, etc.

Know which middleware, dubbo, RocketMQ, MyCAT, etc.

6 How to implement RPC in Dubbo.

7 What should I do to implement RPC myself

Dubbo’s service registration and discovery.

I heard that I was not a class, so I asked some sorting algorithms

It takes nearly 30 minutes.


Three sides:

The three interviews were not an interview, but a written, three-hour test on the basics of Java core. But it doesn’t seem to penetrate the problem, so I won’t say. It’s all very difficult.

Java concurrency, collection classes, thread pools, communication between multiple threads, etc.


HR:

HR little sister is very gentle and happy to talk about life and dreams. For 30 minutes.


Ant Financial r&d experience

This article was first published on wechat public account: Programmer jianghu


Ant Financial Middleware


The ant wealth


R&d engineer





Ali middleware in front of the advance batch, but did not go process. During the same period, I also had two rounds of interviews with ant middleware. I was told that I could not meet without going through the process, so I did not finish the interview.


Later, I followed the process of Ant Financial fortune group. I just met WITH HR a few days ago.


Just today to share the following classics, we can exchange more communication ha.


1: Ant middleware (interviewed three times, twice on one side, once on two sides)


2: Ant Wealth (1+2+ Cross +HR)


Ant Financial Middleware unit 1

A:

To introduce myself

What do you know about multithreading in Java, and the growth and rejection policies of thread pools?

Talk about the process of thread increment and the execution of rejection policy.

We looked at fixThreadPool growth strategies, and then several rejection strategies.

How to use a threadpool for high concurrency, which to use, how long it takes for a thread to terminate, and whether it finishes before the next thread terminates (I was thinking cacheThreadPool, but I was thinking wrong).

5 means a lot of concurrency, so I said you can consider whether the concurrency is greater than the queue length plus the maximum number of threads, and if not use a FixThreadPool.

Concurrency juC: What is thread-safe list? I said a copyonwritelist, but I couldn’t say a second one. Embarrassed, then vector, not juC.

It seems that there is no other list in the package.

Also asked about changes to concurrenthashmap1.8.

7HTTP protocol understand, and what is the difference between TCP.

The difference between 8http1.0 and 2.0.

Answer TCP connection multiplexing, add SSL, and compress request headers.

Which of these updates makes sense and why? I’m talking about compressing the request header to optimize the performance of the HTTP service.

9Java network programming, such as NIO and Socket.

Tell me the difference between BIO and NIO.

I talked about blocking in BIO, I talked about I/O multiplexing in NIO, I talked about the flow of using selector, SeletedKey, Channel, and so on, and I talked about the benefits of single-threaded connections, multi-threaded I/O requests.

Say something about NIO’s library or framework

Talked about Netty, wrote server side and client side demo, did not practice in production.

1 ChannelHandler Is responsible for the I/O response when the request is ready.

2 Bytebuf supports zero copy, merging actual buffs with logical buffs.

The eventloop thread group is responsible for implementing the thread pool. The task queue contains IO request tasks, which are similar to thread pool scheduling.

4 Acceptor Acceptor threads receive TCP requests and register tasks to queues.

11 inverted index understand? I said no.

In fact, it is the basic index of the search engine. According to the mapping relationship between keywords and documents, the index can be built. Chinese keywords can be divided into Chinese words.

Then the interviewer said about the database, said the way of SQL optimization

I’m talking about MySQL, first talk about SQL using index optimization, and then based on the index to say several optimization solutions.

12 When does an index fail to become a full table scan

It covers prefix matching, jump indexes, aggregate functions, nulls, and <> for federated indexes.

Distributed PaxOS and Raft algorithms

Yes, but I can’t explain it clearly.

(a) PaxOS: A proposal with a number of proposals (each with an ID +value) accepts the proposals with the most recent ID and returns the reserved proposals. When more than half of accetors return a proposal, the propeser is asked to change the value to the maximum value in its history. The propeser considers the proposal acceptable and broadcasts it to each acceptor. The acceptor finds the proposal consistent with its own. So accept the offer and learner synchronizes the offer.

Raft: Each node has an interval for selecting the master. After each interval, the host sends a heartbeat packet to the master. When the heartbeat fails, the host selects the master again.

What does the middleware know? Ali’s Dubbo, RocketMQ transaction messages, asked TCC and replied that they did not understand this before.

Mycat implements table and library, message queue Kafka and RabbitMQ.

What books do you read and how do you study? He also told me that there were three Chinese departments with many alumni.

16Spring and Springmvc. Talked about Spring IOC and AOP, the basic framework of Springmvc, request process.


Ant Financial Middleware Unit 2

A:

1 self-introduction

2. Explain the difference between ArrayList and LinkedList, the expansion method of ArrayList and the expansion time.

3 Implementation of hashMap.

What about NIO? Talk about the difference between BIO and AIO. Blocking, non-blocking, asynchronous. The concrete.

5 You say you know distributed services, then how do you understand distributed services?

6 You said that you know the basic principles of Tomcat, which part you know, basic architecture, Connector and Container

How do you use concurrency in your projects

8 Docker tells the virtual machine.

What do you want to ask


The second side of Ant Financial middleware

1 project

Talk about Spring source code, its architecture, flow.

What should a Spring bean do if it wants to modify one of its member variables during instantiation? No constructor, and AOP is not implementable.

4. Do you understand the Tomcat class loader? Answer: No, only understand the Java class loader.

5. Define how to implement class loaders, which methods follow the parent delegate model, which methods do not follow the parent delegate model, how to load classes if not (implement findClass methods, usually use defineclass to load external classes), and how to avoid the parent delegate model. (Override loadClass method)

6 Bloom filter understand, talk about IP address filtering bloom filter implementation.

7. I heard that you have used Docker in your project. Let’s talk about the implementation principle of Docker.

8. Biggest challenges in the project.

9 The most learned things from the project

Do you have any questions



Ant Wealth Division

A:

100-million-level IP address filtering

2 Sorting algorithm and application scenarios

What is the use of database transactions

4 Database pessimistic and optimistic locks

5 What is the use of data index and how to achieve it

6 Matching rules of joint indexes

7 What can I do if the database level becomes 100 million? Library and table, sharding rule hash and remainder. Implemented using myCAT middleware.

8 What is the difference between redis and mysql

Spring uses four design patterns: singleton, factory, proxy, observer, and template.

10 Web request process, about the browser to HTTP server process, and then about the MVC request processing process.

11. Your career plans

12.


2:

There was no second interview. It was like skipping a round and going straight to the technical director.


Three sides:

Multithreading in the project, why CHM is used, and what else can avoid concurrency problems.

2. What are you reading, what are you blogging, I say distributed, what are you following, big back end, Hadoop ecosystem.

3 Dubbo understand

4. Basic architecture of Dubbo, some components

5 How do service producers and consumers make RPC calls

How to register service to discover ZK implementation

7 dubbo load balancing how to do, talk about the specific code implementation.

How to do dubbo service fault tolerance, how to know that the server is down, zK heartbeat mechanism to maintain server connection

All right, that’s all I need to ask.


Crossover:

The e technical director of the next department, asked an algorithm. No more questions. I’m drunk, too…

The e topic is linked list sort, pulled 4, 5 schemes, into an array, direct sort, split and then sort, sequential join and so on. And then I said I can’t optimize anymore. He said there were no more questions… A little surprised.


HR:

1. Hobbies

A three-year to five-year career plan

Target company and city

4. Internship experience and harvest

The biggest difficulty in the internship

6. Why did you change companies and reject the offer of rookie internship

7. Your weaknesses and strengths

Name three things you think you are better than others

Why do you want to work in our department

10 Barabala





More highlights


Tencent research and development

Ali middleware research and development experience

Baidu r & D surface classics



Attached at the end of the essay link: https://juejin.cn/post/6844903673756123143