A drive module for messaging gateway to support delivery data that came from http protocol.
It has driver terminology that came from drive acronym means that the module it self must comply with the legacy protocol provided by third party application, in this case is as an http web server.
It run only for http protocol as a base before it will represent as http get with query string data or http post with xml or json format, it depends how the legacy format that the web server provided.
As an module that built from java languange, it has internal API functions to provide service from other modules, the API is represent as Java Interface, and will came with the following 3 functions : sendMessage( Message message ) ; recvMessage( Message message ) ; recvStatus( Message message ) ; The sendMessage function is used for external module to send message , the recvMessage function is used to forward message from external module , and the recvStatus function is used to forward status of send message.
Please find the basic design of the driver module below
Inside the module there well be at least 3 workers : SendWorker, RespWorker, and RecvWorker. SendWorker is a submodule to handle all the send message that came from external module, accept it by store into the send queue or buffer, and send it all via http protocol with throughput mechanism. All the sent messages will forward to RespWorker, and this worker will accept it, store all the records into the transaction table. RecvWorker is a submodule to handle all the status outbound and inbound message, store into the queue or buffer, and forward to the external module.
All modules, including the http driver module, and all the submodule must have a legacy message data that can be understand thru all the functions, the legacy data message will found outside the module, because it doesn’t belong to specific module.
Please find the basic design of the SendWorker and RecvWorker