Scrivio Interview library

File handling, streaming and real-time

36 questions in 12 subtopics.

Multipart uploads

CodingFoundations7 min read
Write a Spring MVC endpoint that accepts a file upload plus a JSON metadata part, and explain the default size limits in Spring Boot.
DesignIntermediate7 min read
Users need to upload video files of up to 5 GB. Design the upload flow for a Spring Boot service running behind a load balancer with 30-second request timeouts.
ScenarioAdvanced8 min read
A security review found that several services accept uploads, store them on local disk and serve them back with the original content type. What risks do you see and what platform-wide approach would you set?
DesignPrincipal8 min read
Your company stores several petabytes of user files uploaded over 12 years in one cloud provider's object storage, with application code calling the provider SDK directly. How would you assess and reduce the long-term vendor and cost risk?

Streaming responses

CodingFoundations7 min read
How do you stream a large CSV export from a Spring MVC endpoint without loading all rows into memory?
DebuggingIntermediate7 min read
A StreamingResponseBody export fails after 30 seconds with an AsyncRequestTimeoutException, even though the code is still writing. What is happening and how do you fix it?
DesignAdvanced7 min read
Several teams build large data exports (millions of rows) synchronously over HTTP and they keep timing out or overloading databases. Propose a standard approach.

Server-sent events

CodingFoundations7 min read
Show how to push progress updates to a browser with server-sent events in Spring MVC and in WebFlux.
ScenarioIntermediate7 min read
You run 6 instances of a service that pushes notifications over SSE. An event produced on instance A must reach a user connected to instance D. How do you design this?
DesignAdvanced6 min read
Your product needs real-time updates to web and mobile clients. Compare SSE, WebSocket, long polling and push notifications as a platform standard.

WebSocket and STOMP

ConceptFoundations6 min read
What does @EnableWebSocketMessageBroker configure, and how do @MessageMapping and SimpMessagingTemplate work together?
ScenarioIntermediate6 min read
A STOMP chat works on one instance, but after scaling to three instances users only see messages from people on the same instance. Explain and fix.
DesignAdvanced7 min read
Design the architecture for 500,000 concurrent WebSocket connections for live sports scores. What limits do you plan for in Spring and the infrastructure?
LeadershipPrincipal6 min read
Your product's real-time features were built over the years on three different technologies (STOMP over WebSocket, SSE and a third-party push service). How would you decide whether to consolidate, and what are the long-term risks of each option?

Spring for GraphQL

CodingFoundations6 min read
In Spring for GraphQL, how do you implement a query books and a field author on Book, and how do you avoid an N+1 problem for author?
ScenarioIntermediate7 min read
A public GraphQL endpoint built with Spring for GraphQL is being hit with deeply nested queries that take down the database. What protections do you add?
LeadershipAdvanced6 min read
Product teams want a GraphQL layer over 30 REST services. What do you consider before approving it as a company direction?
LeadershipPrincipal6 min read
Five years after adopting GraphQL as the API layer for all clients, your schema has 3,000 fields, many unused, and changes are slow. What does this teach about long-lived API technology choices, and what would you do now?

GRPC with Spring

ConceptFoundations7 min read
What are the main differences between gRPC and REST over JSON, and what are the four gRPC call types?
ScenarioIntermediate7 min read
You are adding gRPC to a Spring Boot service. What options exist for integration, and what operational issues do you plan for?
LeadershipPrincipal6 min read
Should a large organisation standardise on gRPC for internal service-to-service calls instead of REST? Discuss the long-term implications.

File, Excel and PDF downloads

CodingFoundations7 min read
Write a Spring MVC endpoint that returns a generated PDF report as a download named report-2026-11.pdf. Which headers matter, and how do you avoid holding a large file fully in memory?
DebuggingIntermediate8 min read
An Excel export built with Apache POI's XSSFWorkbook for 500,000 rows makes the service hit OutOfMemoryError. How do you fix it, and what other options exist?
DesignPrincipal7 min read
Every product team builds its own report exports (PDF, Excel, CSV) with different libraries, and some libraries have had licensing changes and security fixes. Would you build a shared document generation service, and how would you govern it?

RSocket

ConceptFoundations7 min read
What is RSocket, what are its four interaction models, and how does Spring support it?
DesignAdvanced6 min read
A team proposes RSocket for all streaming between 20 internal services, replacing Kafka topics and REST polling. How do you evaluate this?

RSS and Atom feeds

CodingFoundations7 min read
Expose an Atom feed of the 20 latest blog posts from a Spring Boot application. Which libraries or approaches would you use, and which HTTP features make feeds cheap for clients that poll?
ScenarioIntermediate7 min read
Your public feed endpoint receives 3,000 requests per second from feed readers polling every minute, and each request queries the database. How do you reduce the load?

SOAP web services

ConceptFoundations7 min read
How do you build a contract-first SOAP endpoint in Spring Boot with Spring Web Services? Mention the XSD, generated classes and the key annotations.
DebuggingIntermediate7 min read
After upgrading to Spring Boot 3, a SOAP client generated years ago fails to compile with 'package javax.xml.bind does not exist' and at runtime with ClassNotFoundException for com.sun.xml.ws. What changed and how do you migrate?
ScenarioAdvanced6 min read
Your company still exposes 60 SOAP services to banks and government partners, and new teams no longer know the stack. Should you modernise them, and how?

Legacy remoting: RMI and Hessian

ConceptFoundations6 min read
What were Java RMI and Hessian used for, why are they considered legacy, and what has Spring done with its remoting support?
ScenarioIntermediate7 min read
A Java 8 desktop client talks to a server through Spring HttpInvoker. The server must move to Spring Boot 3 on Java 21, where HttpInvoker no longer exists. Plan the migration.
LeadershipPrincipal6 min read
Java serialization based remoting (RMI, HttpInvoker, Hessian) caused several of the industry's worst Java vulnerabilities. What lessons does this give for choosing integration technologies, and how would you find and retire such endpoints across a large company?

Serving a frontend single-page app

CodingFoundations7 min read
A React app built into static files is served from a Spring Boot jar under src/main/resources/static. Deep links like /orders/42 return 404 when refreshed. Fix it without breaking /api routes.
DesignIntermediate6 min read
Should a single-page app be served from the Spring Boot backend jar or from a CDN with object storage? Discuss deployment, caching, security headers and CORS.