involves understanding the critical impact each operation has on the business. “You've got to start with the customer experience and work back toward the technology - not the other way around.” – Steve Jobs “
The double data type in Java offers 15-17 digits of precision, which might not be sufficient for financial calculations that require exact precision. Even small rounding errors can result in significant inconsistencies. • The Importance of Using BigDecimal: the BigDecimal like types should be used for financial calculations. This class provides much higher precision and helps avoid rounding errors, ensuring that financial transactions are handled accurately and reliably.
glitch caused by a rounding error led to the company losing $440 million in just 45 minutes. 2. Bank of America (2012): A rounding error in a mortgage-backed securities pricing model caused the bank to overestimate the value of its assets by $1.5 billion. 3. The Flash Crash (2010): While the exact cause is still debated, rounding errors in high-frequency trading algorithms are believed to have contributed to the sudden and dramatic drop in stock prices. Scientific Research: 1. NASA’s Mars Climate Orbiter (1999): A unit conversion error, which involved rounding, caused the spacecraft to crash into the Martian surface. 2. Ariane 5 Rocket (1996): A rounding error in the inertial reference system led to the rocket's explosion.
crucial aspect of fintech applications, where financial data and processes must be handled with the utmost accuracy and reliability. To ensure that transactions are processed correctly and consistently, the ACID principles play a fundamental role. ◦ Atomicity: The entire transaction takes place at once or doesn't happen at all. ◦ Consistency: The database must be consistent before and after the transaction. ◦ Isolation: Multiple Transactions occur independently without interference. ◦ Durability: The changes of a successful transaction occurs even if the system failure occurs.
sets of records (usually the balances of two accounts) are in agreement bank and the fintech. • Data Consistency: Ensures that the financial data remains consistent across various systems, such as between internal ledgers and external bank statements or between different subsystems within a financial application. • Error Detection: Helps in identifying discrepancies that might arise due to data entry errors, unauthorized transactions, or system faults. Detecting and correcting these errors promptly is essential for accurate financial reporting and compliance.
where performing it multiple times has the same effect as performing it once. • No matter how many times an idempotent operation is repeated, the result will remain consistent without causing unintended side effects. • Idempotency Keys: Clients generate a unique key for each operation, which the server uses to ensure that repeated requests with the same key have no additional effect after the first successful execution. • Resource Versioning: Track the version of resources being modified so that repeated updates to the same version do not produce multiple side effects. • Database Constraints: Use database constraints (e.g., unique constraints on transaction IDs) to prevent duplicate entries or actions.
Issues Event routing fails Potantion Failures • Transient Errors characterized by their temporary nature that typically resolves spontaneously over time. • Non-Transient Errors Which demand immediate attention and human intervention for resolution.
error management strategy where a failed operation is attempted again for a certain number of times. It is effective for transient failures, where the issue might be temporary.
and Exponential Retry is a strategy where, upon encountering a failure, the system delays subsequent retry attempts with increasing intervals. This approach helps avoid overwhelming the system and external dependencies during transient failures. Exponential backoff introduces a growing delay factor, preventing repeated, rapid retries and promoting system stability.
Queue is a dedicated queue where messages that cannot be processed successfully are moved. Instead of discarding failed messages, they are redirected to the DLQ for further analysis, debugging, or manual intervention. DLQs are valuable for identifying and addressing the root causes of failures without losing critical information. ◆ Manual Intervention: In some cases, a human operator might review and manually process messages in the DLQ, taking corrective actions based on the information provided. ◆ Automated Retry: Messages in the DLQ can be automatically retried after addressing the underlying issue. This automated process allows for the reprocessing of failed messages without manual intervention. ◆ Analysis and Debugging: Messages in the DLQ often include additional context or error details. Analyzing these messages can help developers identify and rectify the root cause of failures.
pattern prevents a system from repeatedly trying an operation that is likely to fail. When the number of failures crosses a predefined threshold, the circuit breaker "opens," temporarily halting further attempts. This prevents unnecessary resource consumption and allows the system to recover before trying again. https://gokhana.medium.com/circuit-breaker-pattern-nedir-6d36f2fc35d0
timeouts for operations to prevent them from blocking indefinitely. If a timeout occurs, implement a fallback strategy or notify relevant components. ➔ Forward Error Handling: Delegate error handling to a different component that can better handle the error scenario, improving modularity and maintainability. ➔ Transactional Outbox: Use a transactional outbox pattern to store events in a reliable store within the same database transaction as the business logic, ensuring atomicity.
to observe system health. • Establish comprehensive logging practices for detailed error analysis. • Utilize real-time alerting systems for immediate notifications of critical events, ensuring timely responses. • Integrate monitoring tools for holistic visibility into system performance. • Document and share best practices for continuous improvement.
is essential for tracking all user actions, ensuring accountability • Ip, Port, User identity: Monitoring IP addresses, port usage, and user identity is critical for maintaining security, tracking access, and preventing unauthorized activities within the network. • KYC(Know your customer): helps verify customer identities, mitigating risks such as fraud and money laundering, and ensuring regulatory compliance. • Incident Reports: Identifying security breaches, understanding impact, and implementing measures to prevent future occurrences • Reporting • Documentation