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,
toggle quoted messageShow quoted text
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
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@...>
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
From: corda-dev@groups.io <corda-dev@groups.io>
On Behalf Of Stefano Franz via groups.io
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@...>
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…
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
{
{
{
From:
corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Hi Stefano, what do you mean with “multiple moves”?
I ask it because I have the same problem…
Best, Lan
From:
corda-dev@groups.io <corda-dev@groups.io>
On Behalf Of Stefano Franz via groups.io
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@...>
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
chainstack.com | +65
8798 7457 | alex.albano@...
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…
From: corda-dev@groups.io <corda-dev@groups.io>
On Behalf Of Stefano Franz via groups.io
Say I have 2 states in my Vault
{
{
{
From:
corda-dev@groups.io <corda-dev@groups.io> on behalf of Lanfranco Morini via groups.io <lanfranco.morini@...>
Hi Stefano, what do you mean with “multiple moves”?
I ask it because I have the same problem…
Best, Lan
From:
corda-dev@groups.io <corda-dev@groups.io>
On Behalf Of Stefano Franz via groups.io
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@...>
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@...>
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
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@...>
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:
Dimos
|
||||||||||||||||||||||||||||||||
|