Last active
July 6, 2016 10:55
-
-
Save JakubOboza/1219d0fdc5ee0948e8a11731cc46dfec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple bulk only Gateway | |
// url is for DR (Delivery Reports) | |
case class Service(name: String, url: String) | |
// Params your API gets in | |
case class HttpMessage(service: String, originator: String, msisdn: String, body: String) | |
// Handles MT's and MO's (maybe should contain service name for sake of simplicity) | |
case class MQMessage(guid: String, msisdn: String, originator: String, body: String) | |
// Types of DR's you could send | |
case class OkDrMessage(guid: String, response: String) | |
case class ErrorDrMessage(guid: String, reason: String, error_code: String) | |
case class IntermediateDrMessage(guid: String, reason: String, code: String) | |
// Flow | |
// 1) Get request via HTTP api | |
// 2) Validate client and message. Instant response if errors | |
// 3) Generate guid and create a message | |
// 4) Put message into queue to Router | |
// 5) Router picks message and decides where it should and how be send | |
// 6) Put it on right node queue | |
// 7) Operator nodes, Dr nodes or any other nodes picks message and perform task putting result into the result Queue | |
// 7*) MO flow = message is being submit from operator to the gateway | |
// 7**) figure out service, generate guid, put it into MO queueu to Router | |
// HTTP API -> Q -> ROUTER -> Q -> OPERATION NODE -> Q -> DR DELIVERY NODE | |
// OPERATION NODE -> Q -> DR DELIVERY NODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment