hkk009
hkk009

Reputation: 11

How to provide music streaming on ethereum blockchain

I have some queries for ethereum blockchain.

1 - I was looking through some requirements of a project. They wanted to have music streaming on ethereum blockchain. I mean how that can be possible. I mean first pushing the data on ethereum and then retrieving that back would cost a lot of transactions. How can a music streaming be possible on ethereum.

2 - If I have an array of structs than pushing into an array is easy and possible but while retrieving back the whole array is not comming. I can have a specific index of that array. But I want the whole array, which is not getting retrieved. If it is not possible for EVM to give the whole array. Than what can be the alternative of the same.

3 - Lets say I am storing a reference link to blockchain. Now I can retrieve the link but, can I redirect to that link internally from blockchain only. I mean is it possible if I want to create a smart contract in which when a user gives some requirements than it automatically creates an account in mist or etherwallet.

Thanks in advance.

Upvotes: 1

Views: 193

Answers (1)

Adam Kipnis
Adam Kipnis

Reputation: 10981

  1. The purchases, rights, ownership, etc. can be stored on the blockchain. The media itself would be stored offchain on something like IPFS.
  2. Using an index is the preferred way to go. Retrieving the entire array can be problematic if the size of the array is unbounded (you can start hitting out of gas exceptions). See a more detailed answer here on returning an array of structs and this answer for more information on gas usage with loops needed to decompose your array of structs.
  3. I'm not sure I understand this question. You can trigger something to occur by activity on the blockchain by throwing an event on the blockchain and clients listening for those events can then perform some action. If you're attempting to do something within a contract, you can use an oracle to retrieve external information for use in the contract. But, you can't do something like create a new EOA account from inside a contract. This requires a private key that should not be on the blockchain.

Upvotes: 1

Related Questions