Can Corda do parallel transactions from the same node?


Avery Starr
 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Stefano Franz
 

Hi Avery,

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

Are you using the tokens sdk?


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?
 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Lanfranco Morini
 

Hi Stefano,

what do you mean with “multiple moves”?

 

I ask it because I have the same problem…

 

Best,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 09:39
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Stefano Franz
 

Say I have 2 states in my Vault

{
  owner: Stefano,
  value: $10
}

{
  owner: Stefano
  value: $5
}

and Let's say I want to "move" those states to you and Avery, it is possible to create a single transaction that has those two states as inputs, and outputs

{
  owner: Avery,
  value: $10
}

{
  owner: Lanfranco
  value: $5
}

OR, it is possible to move each of these states in their own transaction. The second approach will allow for higher flow throughput as each flow is simpler and has a lower chance of getting "stuck" waiting for a counterparty node to respond.


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 09:59
To: corda-dev@groups.io <corda-dev@groups.io>; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?
 

Hi Stefano,

what do you mean with “multiple moves”?

 

I ask it because I have the same problem…

 

Best,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 09:39
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Lanfranco Morini
 

Ok, thanks for the explanation…

 

BUT, if I use the second way, in order to obtain a better throughput, I can not be sure that both Tx will close successfully.

I try to explain it better: if I have a stock exchange transaction that can be considered closed only if both legs (buyer and seller) sign the Tx, the only way to be sure that both Tx legs are successfully closed is to include them in a “less plain” Tx… That means that I can have the same issue descripted by Avery (“all the nodes after this node will be pending forever.”)

 

Hope this is clear…

 

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 11:18
To: corda-dev@groups.io; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Say I have 2 states in my Vault

{
  owner: Stefano,
  value: $10
}

 

{
  owner: Stefano
  value: $5
}

and Let's say I want to "move" those states to you and Avery, it is possible to create a single transaction that has those two states as inputs, and outputs

 

{
  owner: Avery,
  value: $10
}

 

{
  owner: Lanfranco
  value: $5
}


OR, it is possible to move each of these states in their own transaction. The second approach will allow for higher flow throughput as each flow is simpler and has a lower chance of getting "stuck" waiting for a counterparty node to respond.


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 09:59
To: corda-dev@groups.io <corda-dev@groups.io>; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Stefano,

what do you mean with “multiple moves”?

 

I ask it because I have the same problem…

 

Best,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 09:39
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Alex Albano
 

Hi Avery, Stefano, Lanfranco,

 

We've banged our head on this in the past and come through to the other side. 

 

We can help you identify a solution and build exactly the infra you need to do this. Would you like to have a quick chat with me and my colleague Nick, our product manager? We could delve a little bit deeper on what issues you are encountering and put forward our recommendations. 

 

Best Wishes,

Alex

____

Alex Albano
Sales and Marketing Director  |  Chainstack

chainstack.com | +65 8798 7457 | alex.albano@...

Book a meeting with me here



From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 17:57
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?
 

Ok, thanks for the explanation…

 

BUT, if I use the second way, in order to obtain a better throughput, I can not be sure that both Tx will close successfully.

I try to explain it better: if I have a stock exchange transaction that can be considered closed only if both legs (buyer and seller) sign the Tx, the only way to be sure that both Tx legs are successfully closed is to include them in a “less plain” Tx… That means that I can have the same issue descripted by Avery (“all the nodes after this node will be pending forever.”)

 

Hope this is clear…

 

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 11:18
To: corda-dev@groups.io; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Say I have 2 states in my Vault

{
  owner: Stefano,
  value: $10
}

 

{
  owner: Stefano
  value: $5
}

and Let's say I want to "move" those states to you and Avery, it is possible to create a single transaction that has those two states as inputs, and outputs

 

{
  owner: Avery,
  value: $10
}

 

{
  owner: Lanfranco
  value: $5
}


OR, it is possible to move each of these states in their own transaction. The second approach will allow for higher flow throughput as each flow is simpler and has a lower chance of getting "stuck" waiting for a counterparty node to respond.


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Sent: 09 October 2020 09:59
To: corda-dev@groups.io <corda-dev@groups.io>; Avery Starr via groups.io <avery.starr@...>
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Stefano,

what do you mean with “multiple moves”?

 

I ask it because I have the same problem…

 

Best,

Lan

 

Lanfranco Giuseppe Morini
Program Manager

Banking & Finance

APPLICATIONS  

 

E  Lanfranco.Morini@...
+39 02 254427 1   
M +39 347 7282717

 

CEGEKA Via A. Volta 16
20093 Cologno Monzese MI, Italy
T +39 02 254 427 1
WWW.CEGEKA.IT 

 

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: venerdì 9 ottobre 2020 09:39
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Avery Starr
 

Stefano,

 

To answer your question specifically, we will need to invoke the same transaction function to move tokens from one node to multiple other nodes.

 

We did not use Token SDK. We implemented our own token definition (flows, states, contracts).

 

Thanks,

Avery

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: Friday, October 9, 2020 3:39 AM
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Avery Starr
 

Further on this:

 

It’s ok we will have to do the deduction sequentially and we will have to do that no matter what.

 

Initial balance = 10,000,

after initiating the giving process to give 10 to node1, balance =9,990

after initiating the giving process to give 10 to node 2, balance=9,9980

 

But the point is that we do not want to wait sequentially to receive the signoff from the receiving end. If node3 is down, only that 10 token transaction to node3 will be pending and we will have successful transactions for all other 999 receiving nodes.

 

From: avery.starr@... <avery.starr@...>
Sent: Friday, October 9, 2020 12:31 PM
To: corda-dev@groups.io
Subject: RE: [corda-dev] Can Corda do parallel transactions from the same node?

 

Stefano,

 

To answer your question specifically, we will need to invoke the same transaction function to move tokens from one node to multiple other nodes.

 

We did not use Token SDK. We implemented our own token definition (flows, states, contracts).

 

Thanks,

Avery

 

From: corda-dev@groups.io <corda-dev@groups.io> On Behalf Of Stefano Franz via groups.io
Sent: Friday, October 9, 2020 3:39 AM
To: Avery Starr via groups.io <avery.starr@...>; corda-dev@groups.io
Subject: Re: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi Avery,

 

Is your cordapp performing multiple "moves" in a single TX? If so, yes the transaction will be sent to the new owners sequentially.

 

If the move to new owner is done using an isolated TX, Corda will allow multiple flows to be inprogress at the same time, allowing much higher throughput.

 

Are you using the tokens sdk?

 


From: corda-dev@groups.io <corda-dev@groups.io> on behalf of Avery Starr via groups.io <avery.starr@...>
Sent: 09 October 2020 04:47
To: corda-dev@groups.io <corda-dev@groups.io>
Subject: [corda-dev] Can Corda do parallel transactions from the same node?

 

Hi

 

We encountered a problem where one node needs to transact to hundreds or thousands of nodes, for example, when the government node needs to send money to thousands of citizen nodes.

Can we use any multi-threading to perform the transactions out from this same node?

 

We tried with multi-threading but we encountered double spend problem.

We also tried sequential processing, but first of all it is very slow to process thousands of transactions one after another, and secondly, if there is one citizen node down or having any problem, all the nodes after this node will be pending forever.

 

Anyone has any good suggestions?

 

Thanks a lot!

 

Avery Starr | Managing Director

32 Broadway, Suite 1701, New York, NY 10004

Toll-Free: 1888-665-3066

Work: (914) 979-1888 | Cell: (914) 584-0979 | Fax: (914) 941-1315

avery.starr@... | www.seatig.com


Important Notice to Recipients: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient(s) of this communication please contact the sender and delete all copies immediately. You are not authorized to copy, distribute, or otherwise use this message or its attachments. Seatig Inc. is a global IT services company. We help our clients to develop and maintain software applications. Seatig Inc. makes no warranty that this e-mail is error or virus free.

 

 

 


Dimos Raptis
 

Hi Avery,

Following on the conversation from earlier on, there are two main approaches to follow with different trade-offs:
  • As it was mentioned at some point in the discussion, you can batch all the tokens for all nodes in a single Corda transaction. The main benefit of this approach is that the transfer of all the assets will be atomic. However, Corda OS will complete some parts of the flow (e.g. signature collection) in a sequential way, going node-by-node. The latest versions of Corda Enterprise contain some performance improvements that mean the same things are performed in a parallel fashion, sending & receiving messages from all the nodes in parallel. This is beneficial in terms of throughput and latency, but you would still need all the counterparties to be available in order for the transaction to complete.
  • The second approach that was also mentioned is to create smaller, independent transactions for each one of the counterparties. The main drawback of this is that there will be no atomicity across these transactions (e.g. transfers with one counterparty might complete, while transfers with another party fail). This is also an advantage, because it means you don't necessarily need all the nodes to be available, transactions will still be completed with those that are. In order to do this without suffering from double spends, you have to be careful when selecting the tokens to exchange. You have to make sure you select different tokens for every party, e.g. exchange the first 10 tokens with counterparty 2, the next 10 tokens with counterparty 3 etc. You also need to ensure no one else is trying to spend these states at the same time. Last, keep in mind that the internal engine of Corda OS is currently single-threaded, which means amongst all the flows you will create one of them will be making progress at a time. Corda Enterprise has a multi-threaded engine, which means you would be able to fully leverage the parallelism of this approach from a performance perspective.
Hope that helps,
Dimos