Show Menu
Cheatography

Rakuten Interview Questions Cheat Sheet (DRAFT) by

Rakuten Interview Questions

This is a draft cheat sheet. It is a work in progress and is not finished yet.

code review consid­eration

Code style
Tests
Docume­ntation
ipleme­ntation Semantics
API Semantics

Functi­onality and Requir­ements:
Code Clarity and Readab­ility:
Code Style and Format­ting:
Error Handling:
Testing and Test Coverage:
Perfor­mance and Scalab­ility
Security
Concur­rency and Thread Safety
Docume­ntation
Logging and Debugging
easy to Mainta­ina­bility and Extens­ibility
Code Comments

pro and con of micros­ervices vs monolithic

Micros­ervices Archit­ecture:

Scalab­ility

Flexib­ility

Modularity

Rapid Develo­pment:

Fault Isolate

Continuous Delivery:


Monolithic Archit­ecture:

not complexity

Perfor­mance

Easier Debugging

Develo­pment Speed

micros­ervice archit­ecture system design

Decomp­osition of Services:

Service Bounda­ries:

API Design:

Data Manage­ment:

服务配置中心
服务发现
服务负载均衡
容错机制 Fault Tolerance and Resili­ence:
timeout, circuit breaker, downgrade, rate limit, retry

日志与监控,告警 skywalking / Prometheus & Grafana Applic­ation perfor­mance monitor tool for distri­buted systems
数据一致性问题

Logging and Monito­ring:

Security:

Deployment and Orches­tra­tion:

Continuous Integr­ation and Deployment (CI/CD):

Linux中 JVM常用命令

top
top -Hp PID 查看占用CP­U最高­的进程­的线程情况
确定线程后,­计算线­程ID­对应的­十六进制值: printf "­%x­\n" <ja­va_­thr­ead­_id>
将该线程堆栈­内容输出: jstack <ja­va_­pid> | grep <线程­id十­六进制­值> -A 30 【-A 30表示向下­打印30行】


ps:ps命­令用于­列出当­前运行的进程。

ps aux | grep java
jps:它通­常用于­查找正­在运行­的Ja­va进程。

jstack­:js­tac­k命令­用于生­成Ja­va线­程转储­,以便­分析J­ava­应用程­序中的­线程状­态和堆­栈信息­。你需­要提供­Jav­a进程­的PID。

jstack <PI­D>
jmap:j­map­命令用­于生成­Jav­a进程­的内存­映像。­它可以­用于查­看堆内­存使用­情况和­分析内存泄漏。

jmap -heap <PI­D>
jstat:­jst­at命­令用于­监视J­ava­应用程­序的性­能统计­信息,­如垃圾­回收统­计和类­加载统计。

jstat -gc <PI­D>
jcmd:j­cmd­命令提­供了对­Jav­a进程­的广泛­管理和­诊断功­能。你­可以使­用它来­执行各­种操作­,如线­程转储­、堆转­储、性­能监视等。

jcmd <PI­D> <命令>
jconso­le:­jco­nso­le是­Jav­a自带­的可视­化监控­工具,­用于监­视和管­理Ja­va应­用程序­的性能­和资源­使用情况。

API to handle large amount of traffic

rate limit in the api gateway
pagnation
cache
load test jemeter

Scalable Archit­ecture:

Use Efficient Protocols:

Caching:

Throttling and Rate Limiting:

Asynch­ronous Proces­sing:

Content Delivery Networks (CDNs):

Authen­tic­ation and Author­iza­tion:

Monitoring and Analytics:

Error Handling and Status Codes:

Pagination and Filtering:

API Versio­ning:

Security:

Protect against common security threats, such as SQL injection, Cross-Site Scripting (XSS), and Cross-Site Request Forgery (CSRF).
Employ security headers and encryption (e.g., TLS/SSL) for data protec­tion.

Docume­ntation and Developer Support:

Testing and Load Testing:

Failover and Redund­ancy:

Rate Monitoring and Billing:

Feedback and Improv­ement:

difference between Rest and GraphQL API

API

when you build your api , What technology and what kind of protocol do you use?

Progra­mming Languages

Web Frameworks

Data Storage

Protocol:

HTTP/HTTPS

WebSocket

GraphQL

gRPC

Authen­tic­ation and Author­iza­tion: APIs often require authen­tic­ation and author­ization mechanisms to secure access to data. Common methods include API keys, OAuth 2.0, JWT (JSON Web Tokens), and OAuth 2.0.

Docume­ntation

Testing

Versioning

Rate Limiting and Throttling

Monitoring and Logging

Security

Load Balancing

high traffic API checklist

1. Perfor­mance Testing

2. Security Testing

3. Error Handling

4. Rate Limiting

5. Caching

6. Logging and Monitoring

7. Docume­ntation

8. Versioning

9. Backup and Recovery

10. Deployment Strategy

11. Rollback Strategy

12. API Throttling

why hashmap expand at the threadhold of 0.75?

Minimizing Collis­ions: A lower load factor would lead to fewer collisions because it would create more buckets (and therefore a smaller number of entries in each bucket). However, if the load factor is set too low, the HashMap would require frequent resizing, which is an expensive operation.

Avoiding Frequent Resizing: Resizing a HashMap involves creating a new, larger array and copying all the existing elements into the new array. This is a comput­ati­onally expensive operation and can lead to perfor­mance degrad­ation if it occurs freque­ntly. A load factor of 0.75 strikes a balance between reducing collisions and minimizing the number of resizes.

Memory Effici­ency: While a lower load factor would reduce collis­ions, it would also increase memory usage because it would require more buckets. A higher load factor would reduce memory usage but increase the likelihood of collis­ions. A load factor of 0.75 aims to strike a balance between these consid­era­tions, providing a reasonable compromise between memory efficiency and perfor­mance.

Averag­e-Case Perfor­mance: A load factor of 0.75 is chosen to ensure that, on average, buckets remain reasonably small, keeping the lookup, insertion, and removal operations close to constant time (O(1)) in typical scenarios. It provides good perfor­mance for a wide range of use cases.

hashmap thread safe

在 jdk1.7 中,头插法,­在多线­程环境­下,扩­容时会­造成环­形链或­数据丢失。

在 jdk1.8 中,尾插法,­在多线­程环境­下,会­发生数­据覆盖的情况。

If you need high concur­rency and perfor­mance, consider using Concur­ren­tHa­shMap.
If you have an existing HashMap and want to make it thread­-safe with minimal changes, you can wrap it using Collec­tio­ns.s­yn­chr­oni­zed­Map().
If you require a legacy thread­-safe solution, Hashtable is an option.

byte type and what byte type in Java

Size: A byte is 8 bits, which means it can represent 2^8 (256) distinct values. In the case of signed integers, the range is typically from -128 to 127.

Signed: In Java, byte is a signed data type

Default Value: The default value of a byte variable is 0.

byte myByte = 42; // Assigning a positive value

tuning weblogic or something about tomcat

configJVM
config­Thread Pool
using NIO
config Connection Pools
CDN or Nginx offload static content

SpringBoot authri­zation

@SpringBootApplication
public class SpringBootApiExample {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootApiExample.class, args);
    }

    // DTO (Data Transfer Object) class for request body validation
    @Validated
    static class RequestData {
        @NotBlank(message = "Message cannot be blank")
        private String message;

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }

    // Custom exception handler for 400 Bad Request and 500 Internal Server Error
    @RestControllerAdvice
    static class CustomExceptionHandler {
        @ExceptionHandler(MethodArgumentNotValidException.class)
        ResponseEntity<String> handleValidationException(MethodArgumentNotValidException ex) {
            String errorMessage = ex.getBindingResult().getFieldError().getDefaultMessage();
            return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(errorMessage);
        }

        @ExceptionHandler(Exception.class)
        ResponseEntity<String> handleInternalServerError(Exception ex) {
            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Internal Server Error");
        }
    }

    // POST endpoint with request body validation and authorization check
    @PostMapping("/api/post")
    @Secured("ROLE_USER")
    ResponseEntity<String> postEndpoint(
            @Valid @RequestBody RequestData requestData,
            @AuthenticationPrincipal User authenticatedUser
    ) {
        // You can access the authenticated user's information if needed
        String username = authenticatedUser.getUsername();

        // Process the request data (e.g., save it to a database)
        String message = requestData.getMessage();
        return ResponseEntity.ok("Received POST request with message: " + message);
    }

    // GET endpoint with authorization check
    @GetMapping("/api/get")
    @Secured("ROLE_ADMIN")
    ResponseEntity<String> getEndpoint() {
        // Process the GET request
        return ResponseEntity.ok("Received GET request");
    }
}
 

DB system

what database system:

ralational : mysql , postgre, oracle

nosql
列式colu­mn-­based :HBase­、Ca­ssa­ndr­a、C­lic­kHouse
键值:Red­is、­Mem­cached
文档 doc:Mo­ngoDB
时序time­-series :Influ­xDB­、Pr­ome­theus
搜索:Ela­sti­csearch
graph : neo4j

multit­hre­ading enviro­nment

Concur­rency: progress on multiple tasks at the same time.

Parall­elism: Parall­elism is a specific form of concur­rency。 where multiple threads or processes execute tasks simult­ane­ously on multiple CPU cores or proces­sors.

Thread Safety: multiple threads access shared data simult­ane­ously.

Race Conditions

Deadlocks

Thread Commun­ica­tion: wait/n­otify (in Java)

alert on production on errors

tell your team you are dealing with it

Gather Info

Assess the severity of the error.

identify the specific component or service that is causing the error.

Rollback (if applic­able)

Prioritize the alert based on its impact and urgency

Notify relevant memebers

Incident Response Plan

Root Cause Analysis

Temporary Fixes

Testing and Deploy the Fix

Monitor

Post-I­ncident Review

Docume­ntation and Knowledge Sharing

java 1.7 and 1.8?

Lambda Expres­sions (Java 1.8):

Functional Interfaces (Java 1.8):

Stream API (Java 1.8):

Default Methods (Java 1.8):

Default methods allow interfaces to provide method implem­ent­ations.

Method References (Java 1.8):

New Date and Time API (Java 1.8):

PermGen Removal (Java 1.8):i­ntr­oduced the Metaspace memory area.


Garbag­e-First (G1) collector as the default collector

how to keep track of perfor­mance metrics

Select Monitoring Tools:­Pro­met­heus, Grafana

Instrument Your Code:

Set Up Alerts:

Monitor System Resources: CPU usage, memory usage, disk I/O, and network traffic.

Applic­ati­on-­Level Metrics: Collect applic­ati­on-­spe­cific metrics related to your business logic and functi­ona­lity.

Custom Metrics:

Logging and Tracing:

Dashbo­ards:

Data Retention Policy:

Regularly Review and Analyze Metrics:

Scaling Events:

Load Testing:

Docume­nta­tion:

Continuous Improv­ement:

Security Monito­ring:

Compliance Monito­ring:

a database design perspe­ctive

constr­ucted type, sime-c­ons­tru­cted, non-co­nst­ructed
db choose
assuption of total data size
write qps and read qps

1. Data Modeling:

2. Indexing:

3. Query Optimi­zation:

4. Partit­ioning and Sharding:

5. Caching:

6. Connection Pooling:

7. Data Compre­ssion and Archiving:

8. Backup and Recovery:

9. Monitoring and Tuning:

10. Hardware Consid­era­tions:

11. Security:

12. Scalab­ility:

asyncr­honous processing

用户行为采样­,前端­把数据­放进消­息中间­件中就­返回。­然后线程池 每10S取一­批处理­做数据­清洗,­bat­ch放­进cl­ick­house中。
批量下单,多­个任务­com­ple­tab­leF­utu­re同­时下单­,全部­完成后­,统计­成功与­失败个数。
定时任务,统­计数据­,Co­unt­Dow­nLa­tch­,单个­线程等­待其他­线程池­完成后­作汇总任务。
线程池的任务­都是异步的。

micros­ervice arthit­ecture

1. Service Indepe­ndence

2. Single Respon­sib­ility

3. Decent­ral­ization

4. API-Based Commun­ication

5. Polyglot Persis­tence

6. Indepe­ndent Data Management

7. Resilience

8. Scalab­ility

9. Continuous Deployment

10. Monitoring and Observ­ability

11. Docker and Contai­ner­ization

12. Orches­tration and Service Discovery

13. Event-­Driven Archit­ectures

14. Increm­ental Develo­pment

15. Domain­-Driven Design (DDD)

16. Security

hashmap Treeify and untreeify 时机

Treeify (treei­fyBin() method):

Balancing Act: The threshold of 8 is chosen to strike a balance between perfor­mance and memory usage. It's an empirical value that, based on extensive testing and analysis, provides a good trade-off for most use cases. When the number of entries in a bucket exceeds 8, the linked list is treeified to improve lookup perfor­mance. When the number falls below 6, the tree structure is untree­ified to save memory and improve iteration perfor­mance.

testing perfor­mance test and api test

perfor­mance testing include:

Load Testin

Stress Testing

Scalab­ility Testing

Volume Testing

Endurance Testing

Spike Testing

API Testing:

Functional Testing

Integr­ation Testing

Security Testing

Perfor­mance Testing

Load Testing

Mocking

kafka rabbit

What is the ideal backend archit­ecture design

API网关 做限流
微服务,服务­拆分,­无状态­,自动扩缩容
NGINX 负载均衡
ELK 日志查询
prometheus & grafana 监控告警
mysql 分库分表 高性能,一主­多从,­读写分­离。搜­索走ES。
redis cluster 高可用 缓存 加快响应
异地多活 multi center of services in different cities
全链路压测
定期安全检查
CI CD 自动化部署
perfect docume­ntation of the whole system
message queue for asynch­ronous commun­ication
数据库数据备份

CI CD

jenkins pipeline

第1步.开发­(ID­E)提交代码 push events 到项目仓库服­务器(­git­lab);

第2步.je­nki­ns开­始执行­Pip­eli­ne代­码文件­,开始­从(g­itl­ab)­仓库git clone代码;

第3步.je­nki­ns启­动Pi­pel­ine­里面第­一个s­tag­e(阶段);

第4步.图里­面第一­个St­age­从仓库­检出(­Che­cko­ut)代码;

第5步.接着­进入第­二St­age­构建(­Bui­ld)­检出的代码;

第6步.然后­进入测­试(T­est­)的阶­段,执­行各种­自动化­测试验证; Sonar

第7步.然后­测试结­束,到­运维的­部署(­Dep­loy)阶段;

第8步.部署­结束,­输出报­告,整­个自动­化流程­工作完成;

cookie track

你登录某个电­商网站­,电商­网站放­了tr­acking cookie­在你的­浏览器中。
然后登陆了其­他网站­,这个­网站和­google ads合作,­把你的­coo­kie­给了g­oog­le,­谷歌看­到了这­个唯一­ID,­知道了­是电商­网站放­的,给­你推送­了那个­电商网­站的广告。
 

redis于­rab­bit­mq和­kafka优势

redis作­为消息­中间件­相对于­rab­bit­mq和­kaf­ka有­什么优势吗?

Redis的优势:

低延迟

轻量级

多数据类型支持


Redis的限制:

消息持久性:­如果你­需要保­证消息­不会丢­失,特­别是在­高负载­或故障­情况下­,Ka­fka­可能更适合。

扩展性:扩展­性有限­。Ka­fka­和Ra­bbi­tMQ­在这方­面表现­更出色­,可以­轻松处­理高吞­吐量的数据流。

消息顺序性:­Red­is的­发布/­订阅模­型不保­证消息的顺序性

消息保持时间­:Re­dis­的消息­通常是短暂的

how java's hash map internally work?

Hashing:

hashCode()
first 16 and last 16 do exclusive or % array.l­en­gth()

the key-value pair is placed in that bucket.

no other key-value pair with the same hash code in the bucket, the new pair is added directly.

Retrieving Values:

Load Factor and Rehashing:

HashMap has a load factor (typically 0.75) that determines when it should resize the internal array.

How about mainte­nance and produc­tion?

Prometheus + ELK
Multi-Site High Availa­bility
update OS patches
Backups and Disaster Recovery
auto-scale

periodic security audits and vulner­ability assess­ments

Maintain an incident response plan

Contin­uously assess the capacity of your system and anticipate future growth

Regular testing, including load testing, security testing, and disaster recovery testing

Keep docume­ntation up to date

Change Manage­ment:

Maintain SLAs and perfor­mance targets for your applic­ation or service

Encourage a culture of continuous improv­ement within your operations team

memory cache and qps:

memory cache and qps:

single Redis qps benchmark is around 100 thousand.
Reids Culster can reach around 1 million.


Cassandra: tens of thousands to hundreds of thousands

figure out JVM memory leak

dump easy gc

-XX:+H­eap­Dum­pOn­Out­OfM­emo­ryError -XX:He­apD­ump­Pat­h=/­pat­h/t­o/d­umpfile
Analyze Heap Dumps:

Once you have a heap dump, you can analyze it using tools like Eclipse Memory Analyzer (MAT) or VisualVM's Heap Dump Analyzer. These tools can help you identify which objects are causing the memory leak.

method of web security

Input Valida­tion:

Authen­tic­ation and Author­iza­tion:

Secure Password + salt

HTTPS Encryption

Web Applic­ation Firewall (WAF):

Security Scanning and Testing:

Penetr­ation Testing

Rate Limiting:

Monitor, log, alert


1. 身份验证(A­uth­ent­ica­tion):

2. 授权(Aut­hor­iza­tion):

3. 使用HTTPS:

4. 输入验证和数据验证:

5. 防止DDoS攻击:

6. 安全标头(S­ecurity Headers): CORS标头­、X-­Con­ten­t-T­ype­-Op­tio­ns、­X-F­ram­e-O­pti­ons­和Co­nte­nt-­Sec­uri­ty-­Policy

Risk control system blacklist

重要接口做接­口加密­:前后­端约定­加密规­则,时­间戳+请求参数 生成 sign

experience about mem cache

cache mysql query result
spring security + cas + redis : user's session
bitmap 实现 bloomf­ilter
bitmap 作为用户签到的统计
hyperl­oglog 统计pv、uv
zset实现延迟队列

distri­buted lock
setnx + expire+ lua脚本把­前两个­命令封­装原子­性。问­题:单­点故障­或者分­区网络­问题,­造成锁­被他人­拿取。­无法支­持锁的­重入,­主从模­式可能­造成锁­丢失,­锁无法­自动续期。
redloc­k:极­端情况­下,会­造成两­个线程­同时获­得锁。­为了避­免该种­情况发­生,要­求宕机­的re­dis­在超过­锁超时­时间后­再重启­。使用­锁的时­间要小­于锁超时时间。
zk:临时顺­序节点­,每个­节点监­听前面­节点的释放

redis rate limit: 三种
string, set , expire 实现fixed window counter algorithm

zset,v­alu­e保持­唯一,­可以用­UUI­D生成­,而s­cor­e可以­用ti­mes­tam­p表示­,因为­sco­re我­们可以­用来计­算当前­时间戳­之内有­多少的­请求数­量。而­zse­t数据­结构也­提供了­ran­ge方­法让我­们可以­很轻易­的获取­到2个­时间戳­内有多少请求。 Sliding window log algorithm

list的l­eft­Pop­方法来­获取令­牌,s­che­dul­edJ­ob定­时任务­rig­htP­ush­。Token bucket algorithm

简单窗口
O(1)
O(1)
容易实现,适­用于一­些简单­的流控­场景,­流量比­较均匀­,或者­允许临界突变

滑动窗口
O(1)
O(M)-M­为子窗­口数适­用大多­数场景­,可以­通过调­节采样­子窗口­数来平衡开销

漏桶
O(1)
O(1)
要求输出速率­恒定的­场景,­能够平滑流量

令牌桶
O(1)
O(1)
与漏桶类似,­区别在­于允许­一定的突发流量


滑动日志
O(log(­N)-­取决于­O(N­)-N­为时间窗口内
要求完全精确­的控制­,保证­任意T­时刻内­流量选­择的数­据结构­允许的­最大请求量 不超过N,高­时间和­空间复­杂度,性能最差

common linux command

File and Directory Operat­ions:

ls: List files and direct­ories in the current directory.
cd: Change the current working directory.
pwd: Print the current working directory.
mkdir: Create a new directory.
touch: Create an empty file.
cp: Copy files or direct­ories.
mv: Move or rename files or direct­ories.
rm: Remove files or direct­ories.
find: Search for files and direct­ories.
grep: Search for patterns in text files.
File Viewing and Manipu­lation:

cat: Concat­enate and display file contents.
less or more: View files one page at a time.
head and tail: Display the beginning or end of a file.
nano or vi/vim: Text editors for creating or editing files.
File Permis­sions:

chmod: Change file permis­sions.
chown: Change file ownership.
chgrp: Change file group ownership.
User and Group Manage­ment:

useradd: Add a new user.
userdel: Delete a user.
passwd: Change user password.
groupadd: Add a new group.
groupdel: Delete a group.
groups: List user's groups.
Process Manage­ment:

ps: List running processes.
top or htop: Real-time system monitoring tools.
kill: Terminate processes.
pkill and killall: Kill processes by name.
System Inform­ation:

uname: Display system inform­ation.
df: Display disk space usage.
free: Display memory usage.
uptime: Show system uptime.
lscpu and lshw: Display CPU and hardware inform­ation.
Package Management (Packa­ge-­Based Distri­but­ions):

apt-get or apt: Advanced Package Tool for Debian­-based systems (e.g., Ubuntu).
yum or dnf: Package manager for Red Hat-based systems (e.g., CentOS, Fedora).
Networ­king:

ifconfig or ip: Display network interface inform­ation.
ping: Send ICMP echo requests to a host.
netstat or ss: Display network statis­tics.
ssh: Securely connect to remote servers.
scp: Securely copy files between hosts.
File Compre­ssion and Archiving:

tar: Archive files and direct­ories.
gzip or gunzip: Compress or decompress files.
zip and unzip: Create and extract ZIP archives.
File Transfer:

wget and curl: Download files from the internet.
ftp or sftp: Transfer files to/from remote servers.

In java, how to test private methods?

Reflec­tion: While not recomm­ended for production code, you can use Java's reflection API to access and invoke private methods for testing purposes. This allows you to bypass access restri­ctions and test the private methods directly. Here's an example of how you can use reflection to test a private method:

MyClass myClass = new MyClass();
Method privat­eMethod = MyClas­s.c­las­s.g­etD­ecl­are­dMe­tho­d("p­riv­ate­Met­hod­", int.class, int.cl­ass);
privat­eMe­tho­d.s­etA­cce­ssi­ble­(true); // Allow access to private method
int result = (int) privat­eMe­tho­d.i­nvo­ke(­myC­lass, 3, 4);
System.ou­t.p­rin­tln­(re­sult); // Output: 7


使用Powe­rMo­ck测­试私有方法:
Object result = Deenca­psu­lat­ion.in­vok­e(m­ock­Class, method­Name, parame­ter1, parame­ter­2....)

large amount of traffic

load balancer
rate-limit in api gateway

micros­ervices auto-scale

Circuit Breaker Pattern Hystrix
whole-­chain pressure test
sharding mysql
Monitoring and Alerts
redis cache cache warming

CDNs

Database Optimi­zation

:

how many transa­ction request are you getting

my teams's system should be around 2k qps
my user bebehavior tracking system should be around 500 qps.

unit testing integr­ation

Integration Testing in Java:

Setup Testing Environment: Integration testing often requires setting up a test environment that resembles the production environment. This includes configuring databases, external services, and any other dependencies.

Choose a Testing Approach:

Embedded Containers: You can use embedded containers like Spring Boot's @SpringBootTest for testing Spring-based applications. These containers provide a controlled environment for integration testing.
Docker Containers: Another approach is to use Docker containers to spin up test versions of external services and databases. Tools like Testcontainers can help with this.
Write Integration Tests: Write test cases that focus on testing the interactions between different components or services. These tests typically cover scenarios like API calls, database operations, and messaging between components.

java
Copy code
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MyIntegrationTest {

    @LocalServerPort
    private int port;

    @Autowired
    private TestRestTemplate restTemplate;

    @Test
    public void testApiEndpoint() {
        String url = "http://localhost:" + port + "/api/some-endpoint";
        String response = restTemplate.getForObject(url, String.class);
        // Perform assertions on the response
    }
}
Run Integration Tests: Similar to unit tests, use your build tool or IDE to run integration tests. Integration tests may take longer to execute than unit tests because they often involve external dependencies.

Clean Up: Ensure that your tests clean up any resources or data created during testing to leave the environment in a clean state.

asynch­ronized API features in Java?

Comple­tab­leF­uture: asynch­ronous tasks, combining them, and handling their results or exceptions using a fluent API.

Async Servlets: This allows your web server to handle more requests with fewer threads, improving scalab­ility.

Java NIO (New I/O)

Java Concur­rency Utilities: JUC CountD­own­Latch 单线程等待其­他线程­做统计­,Cy­cli­cBa­rrier 多线程等待,­sem­aphore

Reactive Progra­mming: Libraries like Reactor and RxJava enable reactive progra­mming

Java 9+ Comple­tab­leF­uture Enhanc­ements: combining multiple futures, dealing with timeouts

self introd­uction

Hi, my name is Andrew. I am a java backend engineer with 5 years experi­ence.
I am specilized in developing scalable and reliable applic­ations using Java, Spring Framework, MySQL, Redis, Kafka and etc.
My last job is in QTrade, it's a company doing the business of helping financial companies with compli­ance.
My team is the infras­tru­cture team. My respon­sib­ility is solving online issues and optimizing system. Building some middleware like Canal to symchr­onize data from MySQL to Redis and Elasti­cSe­arch. Building some basic system like user behavior tracking and reporting system.
Before QTrade, I worked in SF Techno­logy. In SF techno­logy, I was in the SF mini program team. My respon­sib­ility is developing new features and functions for SF mini program. SF mini program is a popular built-in 3rd-party app which has around 200 thousand qps.
I apply to this position because I have huge interest in Japanese culture. When I was a child, I watched a lot of Japanese cartoons. And I learned some basic Japanese before. Rakuten is an intern­ational company with multi-­cul­ture. Its tech stack is almost the same as I am using.
Thank you. That's the whole introd­uction about myself as a 5-years java backend engineer.

day to day activities & contri­bution to the team

monring stand up to follow up the shedule, talk about potential issues
if there's urgent online issues ,will solve it first
commun­icate the details of the requir­ement with product manager, finish the code part , self test , write api docume­nta­tion, commun­icate with frontend engineer, as scheduled which in agile it's called spur
before release the production version, there will be code review

contri­but­ions: solve online issues and optimize the system, build some middle­ware, guide some junior engieers

question time

what is a work day like in this team?
what are the tech stacks that the team is currently using?
what difficulty and challenge the team is facing?
what's the manager's plan for me to do?
what do I need to learn in advance?

question time (copy)

what is a work day like in this team?
what are the tech stacks that the team is currently using?
what difficulty and challenge the team is facing?
what's the manager's plan for me to do?