Comments (3)
Hi Victor!
The queue approach is the result of mPOS startups reality: you have a merchant ID together with one of few terminal IDs (TID). But your customers might have more points of sale, more messengers. Even if you ask your bank for more — it might be not always possible to get. Only one message with the same TID can be processed by payment systems at a time. So, in case there are two messages with one TID — they will get queued.
Basically you right: 10 requests, made by one terminal will take up to 10 * timeout seconds to complete. In case there will be messages with different TIDs, they will be passed to the upstream one by one immediately, then responses will get dispatched in order and at the time of appearance.
You may see this in action by running:
nodejs socketQueue.js --upstreamHost=localhost --upstreamPort=5000 --listenPort=2014 --vv --echoServerPort=5000 --testTargetHost=localhost --testTargetPort=2014 --testClients=100
from iso-8583-socket-queue.
Hi,
That really makes sense. Even from an ATM terminal only one transaction can be carried out at a time. And if the TID is different as you said it will be executed concurrently then there is no issue.
Just being curious, could you point to the files which is validating TID for queuing purpose? If i want to test concurrency from same terminal (TID), will it be much difficult to change the code and remove TID validation for Queueing? If you could just guide on which files it's validating I could give it a try from my end.
from iso-8583-socket-queue.
Victor, there is queueLockTerminal parameter that does the job.
For the sake of curiosity, please see here: https://github.com/juks/SocketQueue/blob/2f7b6519fce1c615be84ffdd672dae8cdbb35878/lib/iso8583-queue/lib/iso8583Queue.js#L132
from iso-8583-socket-queue.
Related Issues (20)
- BCD packer HOT 15
- Upstream error: ISO host sent data with no client connected! HOT 3
- Echo request initiated from SocketQueue every 5 minutes HOT 8
- I managed to connect to the server but when i send a request i am getting no authorisation, can you please assist HOT 2
- how to config format message as 2 byte length + TPDU + BITMAP + DATA HOT 1
- Add a dynamic header in packager HOT 4
- Authentication on connection start HOT 6
- iso20022 support HOT 4
- How to run sv_*_header.txt samples HOT 2
- New Feature Request: Add Agent Proxy HOT 3
- Problem encode RAW packet [Length] HOT 1
- error while trying https JSON request HOT 2
- Incorrect bitmap length when using binary instead of Hex HOT 8
- Listening to host messages from socket queue HOT 2
- Processing Code [3]..............................NaN HOT 1
- Communication Link Using SocketQueue HOT 2
- DE55 before pack HOT 1
- ascii data receive from POS client processing HOT 3
- connect to a server with certificat auth need
- Package errors HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iso-8583-socket-queue.