Java interview summary

Java interview summary

Foreword

Today received a Java back-end development engineer interview, how to catch in the past will not say, and wanted to share today's interview experience, the way to sum up yourself, give yourself brain relax. First of all, the interview began to self-introduction, today's interviewer said he worked at Microsoft, so I feel that is very experienced, they give me into the theme directly, the general stands to reason that the interviewer asked me some very, such as: Spring IOC's life cycle, SpringMVC of running processes or principle, or is based on my resume with me to talk about, but he ignored them directly to me.

text

Question one

The first question first, straight to the point, you know micro service? So talk about your views on the micro-services?

Of course, this problem is very common

answer:

Micro carrier service is evolved from single application, over the SOA, the SOA comparison will be more fine particle size, each service between the service is relatively independent of each other, each service has its own separate logic, service and service of between uses RPC remote call, micro services architecture is relatively more compact, lightweight, more suitable for agile development.

Question two

He had a question from my previous question answers

Talk about your understanding of the architecture of the site

I remember I had classify said that the problem better, I'd probably say.

Traditional architecture

Traditional items generally SSH, SSM, the system architecture is divided into three layers, namely, the business logic, persistence layers, WEB layer.

Distributed Architecture

According to business needs split into N sub-system, a plurality of subsystems cooperate to complete the communication between the communication technology using a remote RPC subsystem business process.

SOA architecture

SOA is relatively conventional single frame, the coupling degree is relatively high, the system does not facilitate the development team, common business logic will be extracted, encapsulated into a separate service, into the presentation layer, the business logic layer

Business system is decomposed into several components, so each component independently provide discrete, self-government, the ability to reuse the service

To implement business processes through a combination of upper and orchestration services

Micro Services Architecture

Micro-service refers to the development of a single, small, but business services, each service has its own processing and light communication mechanism, can be deployed on a single server, so that professional people to do professional things.

Of course, I then did not answer so fine, just roughly say.

Question three

Traditional architecture program not before? Why must the micro-service program? Like probably mean

This I can talk to him and asked him about the shortcomings of traditional architecture, as well as the benefits of micro-services architecture;

Traditional architecture is a single point of application is SSH architecture or SSM architecture, business is not split, they are written with a project which is generally suitable for individual or small team development. This architecture model, the coupling system is relatively high, once there is a module resulting in service is not available, it may affect the entire project. There is only suitable for visits of 0-100, for high concurrency problem, the user experience is not good.

Micro Services

1. Micro service framework of evolution based on SOA, the SOA advantages inherited removed SOA architecture ESB service message bus in the micro-architecture, using http + json (restful) for transmission.

2. Micro Services Architecture SOA architecture will be more than fine granularity, professional people to do professional things (focus), the purpose of improving the efficiency of each service independently of each other between services, micro-service architecture, each service must independent deployment, micro-service architecture more compact and lightweight.

May occur shared 3.SOA database storage architecture, micro-services database services are stressed every single individual, to ensure that each service independently of each other between services.

4. The project reflects the characteristics of micro Services Architecture SOA architecture is more suitable than the Internet company agile, fast iterative version, because the particle size is very fine.

Question four

Based on the above problems, the company's system needs to take into account what circumstances?

This question is open. Free to say

Five questions

Upgrade each node server distributed micro-services architecture design, the process should be or how it should pay attention to what? This issue, I felt my mind was blank hear, slow for a minute and remember that time, I have not encountered this problem, anyway, I remember the answer of a mess, there is no point on.

After Ali consult an architect to help me answer a bit, he might give me some ideas, version control, switch control, gray scale control. Haha, but also gave me information provided.

I would like to know if, in the comments below, I share the great God who information.

Question six

He asked a question scene, users log in, the account password is entered incorrectly 10 times, lock the user account for 1 hour.

answer:

First, the design of the system using SSO single sign-on, user login requests through nginx reverse proxy server, and then by zuul gateway local load balancing, handling all requests, I said first general process log, then just say after the body of the problem, the number of times an incorrect password is recorded by the user Redis, determined 10 times, the setting of the user data has expired, and processing for the message queue listener setting state of the user. Something like this answer.

The interviewer said I said a bit redundant, roughly front section on the line, he said, can probably pass it! This answer.

Question seven

Tell me what you think of redis, and when used redis

Redis is an open source C language development of high-performance key-value pair ( Key-value ) database (nosql), application caching. It needs to adapt to different scenarios stored by providing a plurality of key data types.

redis application scenarios

Cache.

Distributed cluster architecture session separation.

Task queue. (Spike, buy, 12306, etc.)

Application list. (SortedSet)

Website statistics.

Data processing expired. (Expire)

Probably do this, I'm doing a more detailed answer did not make the time.

Question eight

Actually you said redis, then he asked a lot of questions about redis. This no impression, not elaborate, make up your own brain.

And there are a few questions somewhat forgotten

to sum up

Originally java internship job interview when the interviewer replied with a total feeling of being followed with teachers and students to talk, only to find himself with a partial, stripping out of his own job interview. Only to find that he's not to say I hope you will be able to answer all the questions, he explored the various aspects of your bottom line, determine whether you can answer, in fact I feel should be the framework for some of the problems, network, JVM, etc. So, no matter what the interviewer asks you questions, own honest here, say know know, know a little, then too Freeze said, technology can not learn, do not pretend to understand. Interview so many times, back face questions much, much more to do projects.

Reproduced in: https: //juejin.im/post/5d07b383f265da1ba647ed4a

Guess you like

Origin blog.csdn.net/weixin_33851604/article/details/93169552