In banking payment systems, event-driven architectures using message brokers like Kafka enable decoupled, scalable processing of international transactions. The system validates payment payloads, publishes events to Kafka topics for asynchronous processing, and routes transactions through compliance systems like Finle for AML checks. This approach provides resilience, allows retry mechanisms for failed transactions, and supports horizontal scaling to handle high-volume payment processing across multiple countries and partner banks.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
12 Years Experienced Java Developer Mock Interview | Senior Java Interview Questions
Added:Welcome back to my channel and today we are going to take a technical interview of Somia who has more than 12 years of experience right in software development and uh I Somi I have seen your resume you have mainly worked on uh banking fintech and billing enterprise applications so the technology stack you mentioned in your resume was Java Spring Boot microservices then fast API then uh NodeJS some front-end technologies also.
So yeah, we will take the interview on that technology. So uh we'll discuss more of your recent interviews and uh evaluate your knowledge based on the uh Java Spring Boot Microservices Kafka I mean backend technologies. So is that fine for you?
>> Yes, that's fine. Absolutely perfect.
>> Yeah. So welcome back Somia. So I hope you are doing well. So shall we start?
>> Yes, we'll start. So Somia could you please introduce yourself briefly and explain your uh current role and uh total experience and main project in which you have worked on recently.
>> Okay. Sure. So I am having total about uh 12 year experience as working in the IT industry and I started my career working with the front- end technologies. So where I was working more into the front end architecture, front end web designing, website develop and also apps uh covering HTML, CSS, JavaScript, Angular and React. Uh to be more specific uh in terms of experience it is more of Angular and less of React.
But yes later on I did uh move also to work with React technologies. Okay. Now after uh completing four to four and a half years I just last 8 years is I am just concentrating uh on a combination of front end as well as back end. So I started my backend experience journey with uh working with Java core Java and uh Spring Boot and uh after that I also worked with NodeJS also even though that is a very different stack but because I had worked on front- end JavaScript so I got a opportunity and I got responsibilities to work on NodeJS project as well. Now this is my primary skill set. The other details which I mentioned in my resume and which I have highlighted is uh more into my secondary and uh low skill set which I'm not very much highlighting because I do work on it but very very very less and uh the knowhow on that area is also a little less compared to my primary skill set which is uh Python and Golang.
>> Okay.
>> Okay. Uh and I have primarily worked uh with banking and uh fintech. So that is majorly highlighted in my profile. Other than that there are two more domains I worked on. One is your IoT domain and one is your um uh edtech domain but that is again very less. Uh majorly it is into banking, finance and fintech. Yeah.
Currently uh I had worked on one major application which enable me to transfer money from uh from a Gulf based organization Gulf based bank to other parts of the world but preferably they are India, Pakistan, Bangladesh and such country keeping UAE as the center. So that is a foreign project and that is one of my very recent project. uh it is implemented in spring boot microservices and Kafka technology and it requires a lot of detailed understanding of the messaging system how we will work on it.
Uh that has been one of the largest projects in very recent times and if I just go back about 2 years back I have worked on a billing system actually billing lines because Visa card is used against multiple billings. So they have some internal applications. Previously I had also worked with uh some uh Denmark based uh banks uh again for the capital markets. Now that is more into uh uh functional but in terms of technology I had worked in that uh more on the UI side angular and react.
>> Okay.
>> Yeah. So that is a little bit and I also have led led teams actually. Uh and uh so currently if you see my role in my current experience is more into uh basically team management more into stakeholder management more into um stabilizing the project more into scrums but yes I do have to be linked to the technology also.
>> Correct. So let us talk about your uh recent project which is uh payment project crossber payment project in u gulf. So could you please uh explain the business requirement of this project and your role in it? Okay. The business requirement in this project was to basically transfer funds from Gulf to other parts of the world but using Emirates NBD bank because that is the bank actually for which this application is developed. But these kind of transfer applications are there throughout. uh but why they came up with this requirement was basically if you need to transfer money from any foreign country to India. What was happening is it required a huge amount of transfer fees and uh there was a concept called swift system which is used uh there uh they have to pay a lot of fees if you want to transfer a good amount of money or even small money. So the bank came up with a thought that if we uh we got some branches in India. So if we tie up with some banks in India so then what we can do is we can enable this transfer and uh through an account and the basically that account is called a wasro account.
So any bank or any person want to uh the money first thing is a person cannot directly transfer money through this. It is meant for a corporate. So this is like basically a corporate bank say like say uh like any other Gulf bank like a Saudi A bank or something.
>> So transfer >> these are wire transfers.
>> Okay.
>> Wire transfers but uh say for example a Gulf another Saudi bank want to transfer money to India but they are not able to do it directly or they can do it directly but that is uh incurring huge transfer fees like swift charges. So then they thought let us go to this bank and we'll create an account. The person who wants to transfer through us can transfer the complete process of the money transfer will be routed through this Emirates bank Emirates NBD bank and then it will land into the Indian bank or the Pakistan bank or the Bangladesh bank and there there are some certain areas for which they had enabled. I think they had enabled this for Egypt, Pakistan and Sri Lanka initially to start off with. So I was a part of this main requirement gathering and then I was also a part of the solution designing. What we done is if I come to the main application if I describe we are collecting uh payload payload of information. So payload means we are collecting the actual amount or metadata which is needed for forming the transfer request. So what exactly it is? It is basically uh name of the person who is make initiating the transfer what is the transfer amount and uh how the charges will be bone whether it will be uh boned by the person or it will be shared between the bank and the person. So that is a kind of a bifurcation and that was already there but here this is something which is additional like I mean the charges are a small amount of charges not very big as compared to the original swift transfer charges but the bifurcation is whether it will be shared or whether it will be bone by the beneficiary the person transferring now uh then there are three parts to the request one is how much the sender who is sending the money what is uh he's coming from which place uh what is his bank account name? What is the transfer amount? Then there is a receiver because the receiver is going to receive the money. So the receiver details again the receiver bank account the receiver uh this thing uh name uh the city in which the receiver is located. Then comes the order. Order is the order which is placed with the Emirates NBD bank by the sender. So this is a very important detailed payload of information that information is captured and it is validated. It is validated and it is pushed into a local database. That database is one micros service. Any error in either one of those steps like mentioning the receiver bank, the sender bank, the amount you entered a negative amount or a uh entered a very large amount which is not possible. There is a cap on the amount. So these are validated and put into a database.
Moment it is put. Yeah. So I want to understand like where the payment requests first come like also you mentioned validation were performed like which validations and also I want to that are are these banks which are different for for example banks in India or in Bangladesh are these banks consuming your API you are developing an API and then these banks are consuming your API is it like that?
>> Yes exactly you got it right. Say say for example this is as we are mentioning this is Emirates NBD bank and another bank this is not in Emirates this is in Saudi uh which is say for example Saudi A bank or bank of Qatar separate countries they are consuming this API of Emirates and BD bank Emirates and BD bank is opening up an API or a web hook URL which they are sharing with this other banks. Now other banks when they want to use this they need to come to an understanding that they need to send data in this format they need to send a request in this format because other banks are requesting the service to the Emirates MBD bank that is why for money transfer because they don't have that system or they don't want to go for the costly system. So uh this is one point.
Second is basically as you are asking that um uh banks in Bangladesh, banks in uh Pakistan they are also consuming if they want to send money to another other countries and they don't want to go for the costly system they will come to Emirates NBD bank they will create an account a special type of account called account and that was account is nothing but the account through which the money transfer will be routed. Now this wasra account is special to Emirates NBD bank.
>> Okay, >> it is the account maintained by Emirates NBD bank. Now when I say validation, it is the other bank which is sending the information in the payload that is getting validated as a first step. Now I'll come to a very important part just stop me in case you have some question because this is very critical. So now when I am validated the process of the payload is validated. Now everything is correct. The payment needs to be generated. It is not going to be generated at one go because this is a banking process and it is a international money transfer. There will be many more checks and many more process in between. So the first step is there is a application called TCS banks payment hub where this request of this payload is going. Payment hub is validating that internally. Uh yeah payment hub is a well definfined system actually already in place. It is uh we are hitting the payment hub API passing this payload. It is getting validated by the payment hub system. If it is correct, it is making an entry into a Kafka topic >> which is like a uh Emirates ENBD payment IND. Example, the money is being transferred to India.
>> Got it.
>> So, NBD payment hyphen IND. It is making entry in the Kafka topic. It is taking chunks of data from the uh request the request payload and put create creating a Kafka topic and putting it there. And it is also pushing uh the ch and also the service is pushing the changes to a local database. This is step one. In the database if you go at that point of time you will see request initiated and request in process. That is all. It doesn't mean that the payment is done.
It is just a request is initiated. After this there is uh we have the Kafka topic where which is holding this information.
We go to an another micros service. The control flows to another micros service.
Step two. So before before going to the step two like two three questions I have in my mind first when this Kafka topic was used suppose you produces something on this Kafka topic so when it was used and also I have noticed that you mentioned fast API as well along with the spring boot in this project. So uh I I have this question like why these two because I believe that fast API is something which is similar to spring boot is used to create rest APIs and using python okay it's a framework and I believe so uh why these two things were used to create the same APIs type of APIs >> okay correct a good point so fast API was not used for creating this what we created was in spring boot there was already an existing application ation which was running in fast API that was the old application but some architects and many people felt that we should not do this kind of heavy uh operations in fast API also the code was a bit mismanaged uh also uh because it looked like a very open-ended API with less bit of security and the less structure of the code is not good so there is a migration which happened actually so the legacy system is in fast API and before fast API it was in NodeJS so there was a lot of playing around with this actually there's a lot of history to it but uh I am when I got uh this project and when I started working on this I saw the code bases in NodeJS because NodeJS is again very commonly used in the Gulf countries and also they prefer using fast API because verbose is very easy but it depends what you're making this kind of application is absolute thing to go with fast API or NodeJS they have their own strengths this requires as a separate thing. So yes, that's a point. Um uh very good good point actually. Okay. Uh I'll speak about the part two. So part two of it is very important because here what is happening is you have the payload which is your payment request which is generated. What this is doing is actually it is going and doing uh it is um putting some extra information to the payment. It is appending some extra metadata to the payment. Basically when you transfer money between different country you need to provide a lot of extra information so that when it reaches the destination bank they they can understand more details and they can feed it into the system and their systems will basically get populated with that information. multiple things like I mean other than the payload more description about the fields it extracts the information and it does does that over there appends that information pushes that to a topic another topic which is specific to the second microser which is called a payment processor and then once it does that the payment processor hits the um API uh that API is nothing but basically the destination bank API uh but that doesn't go directly. It goes through a system called fininn.
>> Okay.
>> As banking banking systems have this finle system in between which is maintaining customer data KYC data and it has both the source and destination bank account. So it has to go through fininn that is a compliance actually. So that's why it goes through fininn. Now what happens is if it fails in finle yeah sure >> two things two things first you mentioned payment hub then now fin. So I want to understand like how this request or how this payment request uh reach to payment hub or finle at what point it reaches there like suppose payment comes first then validation happens then uh if the correct entity is selected like based on based on based on the country of the payment then at what point it reaches to payment hub or finle uh leave the Kafka aside because Kafka is also there uh you are pushing uh onto that topic. as well. But I want to understand these two points payment hub and finical at what point it reaches there.
>> Okay. So what happens as I mentioned when we go back to the first initial service where we are validating our payment uh information. So at that point of time a call is made to the payment hub which is a separate URL. A call is made to the payment hub because payment hub validates the actual information.
Actual information in the sense like uh service validates it but payment hub is a banking system. It's got several other uh metrics to validate the payment information. So it validates that. So yes, obviously I'm not a part of payment hub team, but what I got to know is payment hub is a very core banking system developed by uh TCS banks where you can actually go and see your request landed and somebody sitting in payment hub can also cancel that request if they feel that there is an AML happening anti-money laundering or maybe you're going somebody's trying to transfer massive amount of money which is not accepted by the destination country. So there is a manual intervention then there is a system based check also happening. Uh not thorough idea about that internally but this is happening that is why payment hub is coming into the picture and payment URL is there which is getting hit from the first micros service. Unless that happens the topic will not populate and you cannot go ahead unless the database is populated with process initiated or the topic is populated with process initiated you will not go ahead into second step. it will fail there only the user will get the user bank will get information about that in thing >> okay like so yeah fair enough so suppose from your end like you are handling payment for multiple countries UAE India then Bangladesh uh Nepal maybe so how did you decide like which entity should process a particular payment based on your application like uh how you decide for which country it will be processed >> okay yeah very good question like basically this service was launched for four countries I think UA India, UAE Bangladesh, UA Pakistan, UA Sri Lanka and I think UAE uh Singapore initially.
So each of these has their own setups own URLs.
>> Okay. Sorry. Are these having entire uh uh everything separated?
>> No, no, no, no. Database is common. The database is there like the first micros service has its own database. It is very common. So in the sense like if it is going from UAE to India, it will go to the same database. If it is going from UAE to Pakistan, it will again go through the same database but the URL will be different. The topic will be different. Payment hub will validate it in a different way because Pakistan has certain restrictions and uh if you're trying to send money to Bangladesh, they might have certain restrictions. So that kind of information our application will not have. It's like a meta core banking system which is giving us that information. And if it is going from UI to Singapore, it is again having a separate um separate URL in the sense it is having a separate uh resource, separate team, separate support team, separate backup. So when if there is an error in transferring money between UAE and Pakistan or UA and India, it will be routed to two separate set of teams.
>> Okay. Because >> so what I understood like based on the uh entity or destination country uh based on the payment type as well you are deciding that and okay >> so that kind of meta information is there in the payload that payload is actually going to your uh payment hub payment hub is actually screening through that payload.
>> Okay.
>> So these kind of additional checks were not there in the legacy systems. It was very loose-ended and it was not happening properly. So there was a reason to actually come out of that and move into this. The reason to take spring boot for this and bring in Kafka.
Earlier it was not even Kafka. The old legacy system was direct autonomous calls uh I mean direct calls between one service and the other tightly coupled.
The reason to bring in Kafka was basically this is a very important system. If you find an error because see what I told you right now is 50%. Now suddenly some error happens in the transfer it'll become a headache to figure out from where it uh and even if you go searching databases and seeing logs it's still tough because you have high pressures like basically money is moving big money yeah >> okay so as I understood the routing logic of your application based on the country uh one question I have in my mind that suppose a new banking entity or new bank or new country or new bank from the same country need to be added to this platform. So how would you add it? So are you going to uh change your routing logic or you have something in place where you change dynamically and it will be automatically adjust the new uh entry. So basically what we do is there is a API gateway already which I didn't speak to you about.
>> Mhm. So that API gateway is where the entry of the new bank is made. Here in this case the API gateway was three scale. So they go and make the entry of the new bank say for example Alraji bank or uh maybe say like bank of Kuwait example they want to transfer money. So bank of Kuwait will approach uh this Emirates NBD bank and then they will tell we want to transfer money. So Emirates NBD bank will tell then you have to create a Wastro account. So then the Kuwait bank will come and create a wasra account and then a separate when they create a wasra account then there is a separate process where the URL and everything will be configured then it will be handed over to the new bank and the same URL details will be configured in 3cale now 3cale is the old gateway maybe the new gateway because why because it's it being a bank they they did not adopt they did not opt going for AWS or Azure they are not safe so they have their own data centers. So there 3scale is hosted. So 3cale is uh having multiple copies. They have their own virtual machines. It's a private cloud.
So that's where they are going. But yeah, then it's many more uh paper process also is there. Some uh is there and onboarding structure is there where the bank is onboarded and then they come to the stage where they can actually start testing the API.
>> Okay.
>> So there is a process of testing as well. uh a bank doesn't send money just like they test for 6 months period that's a very very thing by by 6 months they get to know and we also test so the thing is this is massive like um as I mentioned so if you uh want uh I can tell you step two and step three like I was mentioning step two step three is it goes through final system >> then uh um final system is where uh the destination bank information is also there as well as the source bank it's validate lots of things. Uh they do a lot of AML checks. I am not sure about that much anti-money laundering. They do check that. It's like if you do frequent transactions of larger amounts or the account is idle and suddenly a massive amount is going it'll be manually intervented. It will be stopped and then there'll be a question. So it can also be stopped in step one. But if step one we're not stopping the last step can stop it.
>> Okay. So >> and I suppose you are using some transaction or something there in place uh to recover the transaction if something goes fails in between.
>> So here we are not using the spring boot transactional.
>> Okay.
>> I I had multiple thoughts why we didn't use this. Uh architects felt they should not use this. Uh according to me it is a well-managed if you use transactional property. Uh but here we are not using because they wanted it to be completely event driven. They want the control over it.
>> Okay. But that would be challenging because it's a distributed transaction, distributed system and it's a payment service. So that would be challenging managing everything event driven, right?
>> Yeah, it is a problem. It is a problem.
I'll tell you where the problem is now.
I'll come to that. like um when a payment is failing uh say for example in the finical side what is happening um it comes to the L1 support we'll just check the logs but it comes to L3 support mainly then they will search through the logs and we'll see it has failed either insufficient funds or maybe AML issue or maybe some network timeout and if there is a network timeout there is a retry mechanism which we built where it will try hitting the API about 10 times every half an hour.
>> Mhm.
>> After that if it fails it'll mark it as failed. Okay. So now there are problems here. Sometimes the scheduleuler is not starting correctly or maybe it is starting then we have to add item potency to the scheduulers because it is uh put across multiple machines but it should run only once. It should not run multiple times. It should create an entry in the shedlock table uh where the scheduleuler is marking the shedlock table to intimate to the other scheduulers that don't uh run your schedule process because I am running the schedule process now I am locking this table for at the most 15 minutes 20 minutes I will try okay so there is a problem some scheduleuler will go down then uh >> uh one thing I have in my mind in general like suppose uh you you mentioned scheduulers uh you must be developed scheduulers or your team maybe develop uh many schedule jobs. So how you are testing these jobs?
>> So uh testing scheduleuler is very tough to be very frank. I'll tell you like basically what we done is I have a scheduleuler. So I want to run the scheduleuler. I want to boot the scheduleuler. So what I'm doing is I am basically setting that time instance in the local to every every minute and then I'm waiting. Then it is launching and then I am seeing a series of transactions but it is a kind of a unit test. It is not a realtime transactions over here. This is this is I agree to this very this according to me we have developed this uh but I don't have a very good say in this because I have not uh formed on a scheduleuler for this.
It's a very faulty design. It can give problems and uh there are problems. uh see out of 100 cases maybe you'll get problems in 10 cases but those 10 cases will put some bigger problems scheduulers not running or not booting uh or scheduleuler took some time to start up or there's some delay in the transaction process uh these kind of and it's not easy to test.
>> Uh so suppose one payment request in general suppose one payment request need to call uh three different services and all three calls are independent. So if you had to implement this in Java, how would you call them in parallel?
>> Okay, there are three separate calls.
>> Yeah.
>> And they need to run together. You're saying >> three se one payment request going uh need to call three different services and all three calls are independent.
>> Okay. One payment request need to call three different service. Okay. Uh so what we can do over here is we cannot go for a blocking structure. Correct. uh so we can go for an asynchronous uh approach over here. Um Java does give an asynchronous approach through this completable futures. We can think of that as a first thought. I'm just thinking and uh >> that is correct thought actually.
>> Uh three separate completable futures will be there. They will make calls to those three separate sets of services.
They will run together. Now the thing is maybe call two will come first, call three will come second, call one will come in that order based on based on the event loop whatever is the structure here. Then we finally get the collated value and uh then we go ahead or uh maybe we can get the first value and we start processing as the second one comes in we start processing with that and third one comes in we start processing we don't wait for all three to come because one consideration need to be taken here I think is if one fails or something if some how we are going to deal with that >> okay and suppose one of those three service became slow and start taking uh 10 seconds So how would you stop it from slowing down the complete payment service or complete service?
>> Okay, so what happens is if a service is slow then obviously uh we should have some kind of approach where we load balance this out because we cannot go in for single systems. So we should have multiple copies. Uh that is one approach where we scale up actually horizontal scale of the services in multiple machines. Second is uh also I think uh if a service is not reachable beyond a certain point we should have the circuit breaker fall fall back method. Uh yeah, >> I'm fine with the using the circuit breaker here. But if don't you think if we horizontal scale it horizontally and the reason of slowing down is something which is uh which is which is which is not solved yet then those uh multiple copies will also be slowed down and still it will eventually slows down your entire system. No matter what how many copies you generate if there is a actual existing problem in the particular application instance or those instances or those u uh deployed code then it eventually it will slow down.
>> Yeah. Now you mentioned one point like deployed code.
>> Yeah.
>> So see one two things are there. One is deployed code which is creating the slowness. Second is networking. But when it comes to the network part, I told about the uh scaling horizontal scaling.
Also one point I want to mention uh I never tried this but um maybe I'm thinking like whatever is happening your application is running in an availability zone. So if it is trying to move to an another availability zone which is slightly better the way your uh infra infra is designed. So that is also one approach to in case the current network is slow for some reason. Now even before this we need to check our own application is memory building up where how is the heap getting organized heap memory in the Java. If we are uh some part some objects are not getting clear or memory is building up more and more or some part of the service is taking more time to compile or it is trying to hit some database and database is not hitting or um is uh some loop somewhere in the process starting up which is creating more time in execution or do we need to think of a redesign all this is during the process of development we need to test this before we actually saying that infry is a problem we should test this because see um there is something in spring boot known as actuator also there is an option where we your um heap the health of your heap multiple options are there I think visual VM is one of the uh editors which we can spin up during our development when we try we should try to hit our API um multiple times uh this is actually one of the things which we also did in our testing where there's a separate team staging environment where they actually uh hit multiple transactions and they check how your application is behaving, is it crashing?
Uh what is the spike of your application? These kind of testing we do do before it it goes to the production.
But yes, um even with that also there are errors. I agree there are so these are some of the suggested areas which I say like checking the heap, checking if there is any memory leaks. um we will not know that we'll never get to know as and when the transactions are happening more like or maybe on a festival day or maybe on a day when they running a certain campaign.
>> Yeah.
>> So that those kind of things that is why when this is a clear case a good scenario where these partner banks are testing. Now initially when this application started they have this four or five partner banks later there were 25 30 partner banks. So but they're hitting a common service. So uh are you also saving the status of your payment in your application?
>> Okay. Now that is the thing if it's India we are not supposed to save because India Indian government has put a rule that whatever is the saving that should be saved in Indian databases in the Indian and it should be within the Indian subcontinent. So there is a separate API call which is constructed and built separate service which will push the complete status uh of that complete metadata of information into the Indian database. Only information available would be the payment was completed which Emirates NBD uh Dubai and other uh places will receive. They will not get to know other concrete information. It cannot be stolen. It uh I think some other rules are there. Is it for India or for any other country?
Like suppose uh your suppose uh the finical service successfully process the payment. Okay. But your service crashes before saving the successful status. So what will happen in that case when the service start again? How will you know whether the payment was completed or not?
>> Okay. So uh when the finical service is sending out an information uh it first uh yeah it hits the destination and then um as you said it crashed.
>> Yeah.
>> So there is a scheduleuler over there um which picks up and uh but that scheduleuler is scheduled uh built for finle that is we don't build it uh because uh the service has gone to finle. Now it is the complete control is with the finle system. any error happens there finle is going to revert back. So yes, fininnacle system picks up their scheduleuler and that scheduleuler hits makes a try again. It checks whether uh payment was made or maybe uh some status information was not saved and then in that case it just tries to edit but not generate the payment but resend the status information. So a very clear yeah >> are you using anything for audit records something like uh hibernate envir or there are other technologies which I don't remember right now but uh something which is for audit records so uh here we are using your normal graphana for logging and for audit records uh I have personally not used it they are using some elastic search uh through that we are able to see the list the audit trial the complete payment and flow that we are able to see over there.
Uh in addition to this, I am not sure if they are using Splunk. They might use Splunk or other tools. My experience with this project was still uh your uh graphana and little bit of that uh what I mentioned about elastic search but I personally have not gone and checked elastic search but graphana I have checked because we do a lot of monitoring >> and there are uh there are separate uh teams set up with the big screens and all monitoring this. Yeah, because this is a bank but the only part is I would say it is way be uh beside AWS and Azure.
>> Uh that team is a technical team what they do uh they do actually like reading the logs uh reading the application status. Uh what do they do?
>> They monitor the transactions.
>> Okay, >> because they have to monitor if there is a spike or certain problem then uh they are the L1 support team. they have to handle that basically and uh in case it is it is something which cannot be handled by them then it comes down to the development team definitely um >> so so for every transaction of uh from one country to another country there is there is one payment some payment associated with it right you mentioned earlier [clears throat] >> yes >> so suppose the client sent the same payment request twice because it did not receive the first response So how would you stop the customer for being uh for being charged twice?
>> Okay. Uh this is very important. Why?
Because uh what happens the payment is sent and uh customer didn't get a good response. It didn't understand. So customer made a try again. Uh but it depends on where the payment is. If the payment is at the initial phase then it will not go. But assuming it is already reached the final phase but did not get a response then it will be verified in the finicle. what is the current status of the similar payment every payment is associated with a payment ID. So that is not changing in that session.
>> Mhm.
>> So if the customer logs out basically it's a new session altogether but every payment request that was generated it is verified against a payment ID and if their payment ID matches that means a request like that was already generated and the status of that is still not updated. It will it will not take that ahead. It depends again uh there is another point to that if a customer can obviously make one payment of 1,000 rupees and did not get response. The customer can make another payment of 5,000 rupees. Second one is a separate request and it has got a separate request ID. He has canled the session.
He has logged out and started again. So it will come with a separate payment ID altogether.
>> Okay.
>> In the same session if he tries doing duplicate payments basically same thing he has hit without editing. He has not changed anything. He's just changed.
Then it will go as a separate request only. But in case he has made some change to any part of the payment request, it will go out as a separate payment request even if the amount is the same. Even if he has not received the first uh and all of this is getting finally routed through finle. So final is a very well-developed system and they are also running multiple copies of that. Uh but yeah, it has its own scheduulers. It has its own set of system which is set up. uh uh but none of these are through any public cloud like AWS or you don't have very strong availability you don't have tremendous disaster recovery systems here but it's good I it's very good uh as a individual bank they have their own systems but it's nothing to match like scale of AWS or Azure or GCP you don't have serverless you don't have many things you don't have you >> so uh I missed the one thing I'm not sure but I I if I may asked you about use of Kafka like what is the exact use of Kafka of publishing those event? Are these for notification, sending emails or what what was the use of those uh Kafka events?
>> Okay, great. Uh so here the main purpose of why to come up with a Kafka event is basically the initial service which is building the and validating the payment that service is putting the initial payment request the in a Kafka topic. So tomorrow uh the same Kafka topic is getting saved. saved me in the sense it clears up. Kafka clears up but they're saving it also I mean saving in the database now so from there we are able to understand this is the topic name topic details so we can go and backtrack that is one reason uh backtrack and understand basically for analytical purpose they're doing it if you see if you ask a tremendous logical purpose I don't see why they are storing it there >> yeah yeah that that question I was thinking the same thing like >> they are basically in the second step is basically taking that information and it is picking it from the topic the payment processor The payment processor is actually processing the payment the second micros service. So that is taking this topic information from the first micros service but it doesn't want to do a tightly coupled thing. So it is picking it up as a consumer from the Kafka topic and then it is enriching that information actually. Uh I don't have a drawing of this actually. I this is this is no this requires a drawing because uh this is massive now. Yeah.
>> So, uh bits and pieces here and there, here and there, but it's a very complicated system, I would say. Uh it's not a very easy system. Uh doing the similar approach with AWS or Azure is much better I feel because uh the chances of you landing into error is very very high even if you use the maximum spring boot and everything and uh every other approach. uh you can ask me like what else is your idea on this because this is one of the very tough systems uh we faced I mean not only me the team and the bank and yeah >> uh let us discuss the legacy application so were you part of that migration or you were like joined after that >> I was part of the new system development migration I never part of the legacy systems uh but yeah what I can understand from the legacy system is very open-ended written and um not very well architected and Python is a very rich language but ideally it is good for um very small to medium complex uh web applications uh maybe something like a tool maybe something like an analysis tool or maybe something like showing a rows of information or maybe something like fetching uh you can keep it something like a back end for front- end server very good not not like a main server for this it is good for a data analysis.
>> Yeah. And for the for the application banking applications like these complicated applications and uh things which need more more of a expertise Java is better. Java is better and uh also there was a legacy system which they had written in NodeJS because NodeJS is very good for this express APIs. it it doesn't take a long time to spin up that and connects well to the database uh fast with less boilerplate code and less bit of learning time and Gulf area is the area where they using majority of this NodeJS actually majority companies prefer using NodeJS uh due to the server costs and the cost of Java but they keep shifting on and on this is one I noticed it's a very bad thing actually you should go for a high-end language like Java because it has got these threading powers. Node again is very good again for um non-banking I would say or again for toolings or maybe back end for front end a lot of these things many other things e-commerce so uh the database which we used over here is MongoDB >> MongoDB okay >> yeah because that is unstructured because of the nature of the payload every bank is having a separate payload structure now >> some banks will come up with their own ideas we'll add more information to the payload so in that case the service needs to adapt But that is one thing um they try to avoid because so that we can keep the service a little bit uh more structured and avoid boilerplate. What is the configuration? Uh there's a configuration which was done before handing it over to the service and the service would read that configuration and then uh validate the payload. So that configuration is bank wise but even there there is a certain format uh which basically an onboarding team comes up and architects.
>> Okay. So uh in your like recent project or recent projects tell me about one uh difficult technical decision that you have personally made like what was the problem what options did you consider and why did you select the final best uh solution.
>> Okay. Um so this is actually a little older but not that old also like just 2 years back uh we had to upload two lakh records uh through an excel and that need to happen in few seconds uh there is massive billing data in the excel certain fields should be extracted the billing ID uh which is one of the columns actually I'll give you a bit more information of the requirement um there is a billing line information like basically say for example um visa card has been used by some corporate uh say by say by uh McDonald's and uh not McDonald's. McDonald's is not using them. Another business line has used it uh and they had used it in some construction heavy uh purchasing construction heavy materials. Now that is like um they have done some four or five transactions in one day and in a month they have done around about say like um two lakh transactions. a massive construction company in buying raw materials and getting some purchasing some heavy material equipment and everything. So, Visa card now wants to understand basically what are the things they how they have used it, what are the billing lines and how effective their card processes. So, they collected that information in a Excel sheet. The business people and business team has collected that they have their own data analysis team but now they want to run this through a separate internal application which would help in reporting which is actually a part of the data analysis team. So lot of this information is captured is coming from the data analysis team as excel sheets or CSV files very massive in size. So now there is a front end part to it and back end part to it. What is basically done is uh we read that uh CSV file or Excel file uh in an angular UI and we load it we load that data in a table.
User browses through the table. So this is like a data analysis team who's using this application. They are just browsing and they understand each of these things. Um they figure out that maybe some part of the Excel some data is not correct. They go back to the Excel edit it and re-upload the Excel again. So when I'm saying upload they add that Excel and that Excel is first validated in the local in the local system in the client browser they validate each of these billing line ids whether any fields are incorrect and there are three separate set sets of flags which were added like input uh uh input update and delete. So um I'll tell you the solution and then I'll tell you the actual system which we came up with and why we came up with this actually. So uh in input, update and delete and then they do a lot of analysis but this analysis is manual before giving it to the system. So now once everything is good they click on the upload button submit and internal validation passes they submit. When it goes to the server the server should actually it goes to the database and it checks whether those billing lines actually exist. Like if they don't exist they're inserted. um if they exist and if there is an update to be done they updated if there is a deletion marked against them they deleted but then what happens is basically it is done against a very heavy MongoDB which is already in place and which is holding a massive array of the data so that also needs to be loaded and validated. So that is a very complex process. But now with this spring boot operation, we had done this using threads. Actually the insert, update and delete ran in three separate threads. Individual threads, they are not dependent on each other. And uh if there is a condition to that if the amount of data is massive then only get it into a thread. If it is not then do a normal for for loop process.
>> So the these insert operations are also not dependent on each other. These insert operations are basically billing ids like basically some uh 10digit ID for a billing line. So uh the checks are initially done in the local to identify if there is a duplicate billing line. If there is no duplicate and they're individual and they don't exist in the database then you need to insert them.
But uh thread cops is going to upload it in in one go. So yeah this this this was a very complicated project. It required a lot of testing. The only thing is uh if if there is you have given input of uh three lakh records but actually uh only two lakh records are showing updated or inserted. What about the rest? So that kind of testing uh there was an automation testing also but yes we went in for the MongoDB it had a sharded clusters we were able to update fast we had a good environ again this is private cloud this is not uh AWS so uh performance was good only but uh but yeah we uh this was very complicated because um initially when we had the records we didn't have an idea of how to split input uh input update and delete uh how to take it ahead and uploading so many records at a go it can break. We tried some parallel streams. We tried some threads. Uh threading was giving incorrect uh values or incorrect results. So we removed the parallel streams. Parallel streams is not a very good option. We got to know in this scenario and we also tried some uh as I mentioned we tried this demon threads that was hanging the system or making it very slow. Yeah, I mean lot of >> I mean I I'm hearing from first time I'm hearing about someone using demon threads. So interesting.
>> No, no, background threads. I mean normal threads if you say by creating a thread class. So there we we tried that and then we came with this option.
>> Why don't you use any framework or something like executor or any thread pool thread pool join thread pool sorry >> we used it later.
>> Okay. Okay. Okay. These were initial flaws in the design and also we did not go for bulk ops initially. It was another database and pushing so much of data to posgress SQL initially that it was not working out. So then we thought we'll go for MongoDB and then um yeah it's it's like stages of development.
This was core product development. So >> okay fair enough. I think we are running out of time. I I just want to ask one more uh last question like recent as you know that there are methods of APIs API methods like put post get delete there is one more method which was introduced recently. Have you come across that?
>> Uh put post get delete head patch >> patch is there already head is not there >> options or something? No no no query >> query >> yeah it's interesting >> I I need to go through I I am not I definitely will go through as you mentioned >> okay thank you so much so Somia so it was a great discussion actually and like uh in fact I learned so much from you as well so uh like you overall you explained your project very well and explained the project flow responsibilities technologies it was clear to easy to understand actually and >> I hope so because Uh it's it's a very complicated thing to I should have used a drawing board.
>> I got it. I >> and it's a like you have a good practical knowledge of your project and structure and everything like use cases of every technology. So that was your strongest point. [snorts] We haven't discussed anything apart from that but as your experience level is like 13 plus. So maybe I thought I should stick to the project and those related technologies only. So yeah uh overall it was a good interview. Great to speak with you. Okay.
>> Yeah I'm uh really thankful for this actually. What happens uh we come to a point when we want to analyze ourselves.
So right now I feel there is a small thing which is muddled up in my complete portfolio is basically there are too many things which has gotten.
>> Yeah >> NodeJS and fast API. I will definitely segregate that out because uh um node and spring is my main skill set fast API and go is my very secondary.
>> Yeah. Yeah.
>> I do it as a because I'm senior resource so I get time on the those areas >> like uh I faced the same problem recently uh in my last project like it was 3 month project only. They [snorts] gave me something which I need to develop in Python and fast API. In fact, I did this using AI tools and everything. But yeah, I never learned anything from that and in fact I I'm also not using that in my resume.
>> Okay. Okay.
>> Because once you start using that, you will start getting calls uh from that and it's hard to explain the technology you never used, you never learn. Uh so it it will be hard to as well.
>> Yes. Yes. I I agree to this uh very much. So yeah, good actually. Uh it was good discussion. If you um want any help you let me know somewhere you want some kind of understand or maybe I need some help we can discuss one more time.
>> Yeah. Yeah. It was good interview. Thank you so much. Thank you so much uh for your time. Yeah. My name is Ashish Sharma by the way.
>> Okay. Okay. Okay. You have YouTube channel right?
>> Yes. Yes. Yes.
>> Okay. Okay. Okay. Okay. Good. Good. I'll go through a YouTube channels definitely. uh to be honest uh like uh >> channel I'll subscribe.
>> Thank you. Thank you so much. Thank you so much for your joining. It was great speaking with you >> and I wish you all the best for your future interviews. Okay.
>> And for our audience so uh everyone thank you so much. So this was Somia's interview for a senior Java. He's a senior Java architect actually and Somia did a good job explaining his project and his practical responsibility and also please share your feedback in the comments and let us know uh which question you found most useful and thank you so much for watching. Please like the video, share it and subscribe to the channel. Thank you.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23