DEV Community

Sparsh Garg
Sparsh Garg

Posted on

From Building Features to Protecting Money: My Fintech Journey πŸ’Έ

I've worked across different industries, building APIs, fixing bugs, designing databases, and doing all the usual backend developer things.

Then I moved into fintech.

Turns out, writing code that handles money comes with a whole different level of "bhai, ek baar aur test kar le." πŸ’€

Fintech has been treating me well, though. It's teaching me to think beyond whether an API works and focus on whether it works correctly, securely, and reliably under pressure.

Here's what I've been learning along the way.

1. Transaction Flow: It's Never Just an API Call

A transaction might look simple from the outside, but there's a lot happening behind the scenes.

A simplified flow could look like this:

Client β†’ API β†’ Validation β†’ Transaction Service β†’ Database β†’ Message Queue β†’ Consumer Service β†’ Downstream System

A request comes in, gets authenticated and validated, and is processed according to the business rules. The database maintains the required state, while queues help move events or work to other services asynchronously.

But now you've got more questions to answer:

  • What happens if a message is delivered twice?
  • What if a consumer crashes halfway through processing?
  • What happens when the database commits, but publishing the event fails?
  • How do we retry safely without processing the same payment twice?
  • How do we track a transaction across multiple services?

Welcome to idempotency, transaction boundaries, message acknowledgements, retry policies, dead-letter queues, and reconciliation.

Suddenly, sending a message to a queue doesn't feel like the end of the job. πŸ˜‚

A successful API response doesn't automatically mean the entire business process is complete.

2. Queues: When Services Need to Talk Without Waiting Around

Queues are fascinating because they help decouple services and handle workloads asynchronously.

Instead of making every service wait for the next service to finish, a producer can publish a message for a consumer to process.

This can improve resilience and help absorb traffic spikes, but it also introduces new challenges: duplicate delivery, message ordering, consumer failures, backpressure, and eventual consistency.

You start realising that "the message was published" and "the business operation completed successfully" are two very different statements.

And if you're using retries, you need to make sure they don't turn a temporary failure into a duplicate transaction.

Queues make systems more flexible. They also give you a few more places to investigate when production gets interesting. πŸ’€

3. Scalability: More Traffic, More Interesting Problems

Adding more replicas is easy. Making sure the entire system scales properly is the real challenge.

Database bottlenecks, connection pools, concurrent updates, locking, and downstream dependencies can become problems long before your application runs out of CPU.

Suddenly, scalability isn't just about handling more requests. It's about maintaining correctness while handling more requests.

Apparently, Kubernetes can't fix everything. Who knew? πŸ˜‚

4. SQL Queries: SELECT * and Pray No More

Dense SQL queries, multiple joins, aggregations, indexing, execution plans, and database structure have become a whole different learning experience.

You start asking:

  • Is this query using the right indexes?
  • Are these joins necessary?
  • Can this query handle millions of records?
  • Is the schema designed for the actual access patterns?

And sometimes, you open a query written by someone else, judge it for five minutes, check Git blame, and realise it was you.

Character development. πŸ’€

5. Security and Reliability: Because It's People's Money

Authentication is just the beginning. Authorization, least-privilege access, sensitive data protection, audit trails, and secure secrets management all matter.

Then come the failures: requests time out, services go down, consumers crash, and external APIs behave unpredictably.

I'm learning to appreciate proper transaction handling, observability, distributed tracing, integration testing, and safe recovery mechanisms.

The question changes from "Does this endpoint work?" to "What happens when something goes wrong, and how do we recover safely?"

That's a much more interesting engineering problem.

The Biggest Lesson So Far

The biggest change isn't a particular framework, database, or technology. It's the way I approach problems.

I'm learning to think about transaction boundaries, data consistency, concurrency, queues, security, performance, and failure scenarios before they become production incidents.

Different industries have taught me different ways to build software. Fintech is teaching me to think much more carefully about the consequences when something goes wrong.

And honestly, I'm enjoying the learning curve.

Although, I now have a slightly unhealthy respect for database constraints, transaction rollbacks, message queues, and SQL queries that require scrolling horizontally.

Still learning. Still building. Just a little more paranoid about production now. πŸš€

Top comments (0)