当前位置:网站首页>Android high frequency network interview topic must know and be able to compare Android development environment
Android high frequency network interview topic must know and be able to compare Android development environment
2022-07-02 01:27:00 【m0_ sixty-six million two hundred and sixty-four thousand seven】
1、 Support http2, All requests to a machine share the same socket
2、 Built in connection pool , Support connection reuse , Reduce the delay
3、 Support transparent gzip Compress the response body
GZIP It is a technology for website compression and acceleration , It can speed up the opening of our website after opening , The principle is compressed by the server , The principle of fast decompression of client browser , It can greatly reduce the traffic of the website
open GZIP What are the benefits ?Gzip After opening, the data output to the user's browser will be compressed , This will reduce the amount of data transmitted over the network , Improve the speed of the browser startup page .
4、 Avoid duplicate requests by caching
Mandatory cache
The first time the client requests data , The server returns the expiration time of the cache ( Through fields Expires And Cache-Control identification ), Subsequently, if the cache does not expire, you can directly use the cache , There is no need to request the server ; Otherwise, request data from the server .
Compare cache
When comparing caches , Every request needs to interact with the server , The server determines whether the cache can be used .
5、 Automatically retry other requests of the host when the request fails ip, Automatic redirection
6、 Easy to use API
2、 seen OkHttp Source code of , Just briefly

First of all , Through a builder pattern (Request.Builder) Build all the request, And then distribute it to Dispatcher( The dispenser );
second ,Dispatcher And then request Distribute to HttpEngine( Real working class ) in ,HttpEngine First, let's see if this request has cache( cache ), If you have a cache , Just get the information from the cache , And back to response; If there is no cache ,HttpEngine Just put request Distribute to ConnectionPool( Connection pool ) in ;
Third , stay ConnectionPool( Connection pool ) in , adopt Connection Send a request , First choose Route( route ) and Platfrom( platform ), Then arrive at Server(Socket), Get Data, Then return response.
3、OkHttp Use
1、 establish OkHttpClient object :OkHttpClient client = new OkHttpClient();
2、 Create a network request :Request request = new Request.Builder() .url(“http://sethfeng.github.io/index.html”) .build();
3、 obtain Call object :Call call = client.newCall(request); // What is actually created is a RealCall object ,RealCall One of them is right client References to objects
4、 Send a request , Get the returned data
Send synchronization request :Response response = call.excute();
Send asynchronous request :
call.enqueue(new Callback() {
@Override
public void onFailure(Request request, IOException e) {
…
}
@Override
public void onResponse(Response response) throws IOException {
…
}
});
4、volley
Last
Actually Android There are so many knowledge points in development , There are still so many things to ask about in the interview . So there's no other trick to an interview , It depends on how well you are prepared for these knowledge points .so, When you go out for an interview, you should first see which stage you have reviewed .
The following figure shows my accumulated experience over the years tencent 、 headlines 、 Ali 、 Meituan 、 Byte skipping and so on 2019-2021 High frequency interview questions in , Bloggers also organized these technical points into videos and PDF( In fact, it took a lot more energy than expected ), Contains the context of knowledge + A lot of details
above 【 Interview questions for senior engineers in large factories over the years 】、【Android Advanced teaching video 】、【Android Learn advanced knowledge points PDF】 They are free to share with you . If necessary , Click on **【Android Architecture video +BATJ Interview topics PDF+ Learning notes 】** Free access to .
E4%BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)** Free access to .
Sorting is not easy to , Please pay attention and forward it to me , thank you ! I wish everyone can get their favorite job .
边栏推荐
- Look at the industrial Internet from a new perspective and seek the correct ways and methods of industrial Internet
- 【图像增强】基于Frangi滤波器实现血管图像增强附matlab代码
- Global and Chinese markets for distributed generation and energy storage in telecommunications networks 2022-2028: Research Report on technology, participants, trends, market size and share
- 6-2 vulnerability exploitation - inevitable problems of FTP
- [Obsidian] wechat is sent to Obsidian using remotely save S3 compatibility
- I Brief introduction of radio energy transmission technology
- Learning note 3 -- Key Technologies of high-precision map (Part 1)
- error: . repo/manifests/: contains uncommitted changes
- Entrepreneurship is a little risky. Read the data and do a business analysis
- 8.8.4-PointersOnC-20220215
猜你喜欢

卷積神經網絡(包含代碼與相應圖解)

Learning note 24 - multi sensor post fusion technology

GL Studio 5 安装与体验

Unity AssetBundle subcontracting

【图像增强】基于Frangi滤波器实现血管图像增强附matlab代码

Learn C language from scratch day 025 (maze)
![[IVX junior engineer training course 10 papers to get certificates] 0708 news page production](/img/ad/a1cb672d2913b6befd6d8779c993ec.jpg)
[IVX junior engineer training course 10 papers to get certificates] 0708 news page production

教你白嫖Amazon rds一年并搭建MySQL云数据库(只需10分钟,真香)

The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!

Based on Simulink and FlightGear, the dynamic control of multi rotor UAV in equilibrium is modeled and simulated
随机推荐
II Basic structure of radio energy transmission system
Learning note 3 -- Key Technologies of high-precision map (Part 1)
Load and domcontentloaded in JS
Global and Chinese market of safety detection systems 2022-2028: Research Report on technology, participants, trends, market size and share
遊戲思考15:全區全服和分區分服的思考
Introduction to ffmpeg Lib
[WesternCTF2018]shrine writeup
MySQL winter vacation self-study 2022 12 (4)
uTools
Global and Chinese markets of digital crosspoint switches and mux/demux 2022-2028: Research Report on technology, participants, trends, market size and share
机器学习基本概念
Global and Chinese markets of edge AI software 2022-2028: Research Report on technology, participants, trends, market size and share
No converter found for return value of type: class
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
Learning notes 25 - multi sensor front fusion technology
学习笔记3--高精度地图关键技术(上)
It's already 30. Can you learn programming from scratch?
首场“移动云杯”空宣会,期待与开发者一起共创算网新世界!
Keepalived introduction and installation
What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it
