changed 5 years ago
Linked with GitHub

Permanent storage Architecture

input graph

digraph finite_state_machine {
	rankdir=LR;
	size="8,5"
	node [shape = circle];
    Alfred -> Load_Balancer
    Load_Balancer -> TA
    TA -> IRI
    Alfred -> Tx_queue [label = "transactions"]
    Tx_queue -> Load_Balancer [label = reattach]
    Tx_queue -> IRI [label = "check confirmed status"]
	Tx_queue -> ScyllaDB [ label = "Confirmed transactions" ]
    Listener -> ScyllaDB
    Listener -> IRI [ label = "query tx status and raw data" ]
    
    IRI -> Listener [ label = "zmq sn event" ]
    Importer -> ScyllaDB [ label = "historical data"]
    
}
digraph finite_state_machine {
	rankdir=LR;
	size="8,5"
	node [shape = circle];
    Alfred -> Tx_queue
    Alfred -> IRI [label = "get Tx status"]
    Tx_queue -> ScyllaDB [label = "confirmed"]
    Tx_queue -> discard [label = "spam"]
    Tx_queue -> TA [label = "promote"]
    TA -> Alfred
}

output graph

digraph finite_state_machine {
​   rankdir=LR;
​   size="8,5"
​   node [shape = circle];
​   Alfred -> Load_Balancer
​   Load_Balancer -> TA
​   TA -> Cache
​   Cache -> IRI [label = "unconfirmed Tx"]
​   Cache -> ScyllaDB
​   
​   
​   
}

ZMQ client

digraph finite_state_machine {
	rankdir=LR;
	size="8,5"
	node [shape = circle];
    Alfred -> Load_Balancer
    Load_Balancer -> TA1
    TA1 -> IRI
    TA1 -> Chronicle
    Load_Balancer -> TA2
    TA2 -> IRI
    TA2 -> Chronicle
    Load_Balancer -> TAn
    TAn -> IRI
    TAn -> Chronicle
    Alfred -> Promoter [label = "Token"]
    Promoter -> Load_Balancer [label = reattach_or_getStatus]
    Promoter -> Scylla_pending
	Promoter -> Chronicle [ label = "Confirmed TXN" ]
    Chronicle -> Scylla

}

The ZMQ client subscribes the "sn" event from IRI. The "sn" event is for transactions that has recently been confirmed.

But we could only get a part of transacton data from the sn event. ZMQ client will use transactino hash to request IRI for the whole transaction data.

Then the ZMQ client send transtions to Scylla cluster with Scylla interface provided from TA.

Load Balancer

To ensure all the transactions from Alfred will be stored in Scylla Cluster.
We need to send the transactions to scychronizer from Alfred.

Scylla interface

Scylla interface provide APIs to handle the querys from Remote workers or the ZMQ client.

Detail about Scylla interface

Select a repo