Finetuned-AI-Model / ai_interview_preparation.json
krishnashahu214's picture
Upload 10 files
3c892f2 verified
Raw
History Blame Contribute Delete
2.32 kB
[
{
"instruction": "Why does Juspay heavily emphasize Functional Programming (FP) over Object-Oriented Programming (OOP) in banking systems?",
"output": "Juspay handles massive financial transactions concurrently. FP avoids shared mutable states, reducing concurrency bugs like data races. Functions are pure, meaning given the same input, they always produce the same output, which makes tracking money flows mathematically predictable and deterministic."
},
{
"instruction": "Explain the difference between concurrent and parallel execution in the context of handling multiple payment requests.",
"output": "Concurrency is about dealing with lots of things at once (structuring your payment gateway to accept 1,000 incoming requests simultaneously). Parallelism is about doing lots of things at once (executing 4 distinct validation steps on 4 separate CPU cores at the exact same millisecond)."
},
{
"instruction": "What is a deadlock, and how can it occur when updating two separate merchant bank accounts?",
"output": "A deadlock happens when two threads are blocked forever, each waiting for the other to release a lock. For example, if Thread 1 locks Account A and waits for Account B, while Thread 2 locks Account B and waits for Account A, neither can proceed. It is prevented by enforcing a strict lock acquisition order."
},
{
"instruction": "What is an Idempotency Key in API design, and why is it crucial for Juspay's payment integrations?",
"output": "An idempotency key is a unique identifier sent by the client to prevent double-charging a customer. If a network timeout occurs mid-payment, the client retries the request with the same key. The server recognizes the key, sees it was already processed, and safely returns the existing success status without charging the user twice."
},
{
"instruction": "Explain the concept of Pure Functions and immutability in Functional Programming.",
"output": "A pure function has no side effects and its return value depends solely on its arguments. Immutability means once data is created (like a transaction record object), it cannot be modified. Instead of altering the object, a new updated state copy is generated, ensuring thread-safe operations across payment processors."
}
]