Handling media and documents on the blockchain


hey my name is Marc Mecuri and i’m Chris Segura and welcome to another episode of Block Talk on this episode we’ll be
talking to you about the Media and Document Accelerator you can find inside
of the Azure Blockchain Development Kit Chris you want talk a little bit more
about it yeah absolutely let me bring this up on screen so we have someone to
look at if you go into the blockchain github repository underneath the
repository we have the Development Kit in the development kit we have a bunch
of different samples for different scenarios one of the more interesting
scenarios and the one we’re going to talk about today is a testable documents
and media Marc you want to add a little more color to what that really means
yeah so one of things that we saw is a number of customer requests where they
had files where they wanted to make sure that they hadn’t been tampered with and
so the documents were testable but they also knew that they shouldn’t put them
on the blockchain because they didn’t want to blow the size and so what they
had heard about and you know I think anyone in the blockchain space has heard
this story sometime over the last number of years is what you don’t do is you
don’t put files in the blockchain you hash them and then put the hash on the
chain but I think as many times people have heard that there’s probably been as
many people that have gone to look up to see where they can find a sample and
they’ve not been able to find one so we thought maybe that should be something
we should help out with absolutely not only can we help out with that we can
help out to show many scenarios of that right we have Adobe Creative Cloud we
have FTP samples Google onedrive side of samples today we’re gonna dig in deep on
the Adobe Creative Cloud sample because we think it’s a pretty interesting
scenario so if you go to our github pages go to the Adobe Creative Cloud
sample you’ll get to this page I won’t cover in any detail what’s on this page
we’ll talk more about it as we go through the demo but I do want to
highlight this button here that says deploy – err
it’s the easy button right the quick way to get resources deployed into your
subscription and editor in fact when you press that button you get a screen that
looks like this and if you look on it a bunch of
information you have to fill out your own bunch of free text information but
the most important information to look at is this service bus connection string
you will need to have deployed workbench first to have this connection string so
remember that you need workbench deployed first so you can get that
connection string once you fill out that information
you press purchase and deploy it will deploy a bunch of resources to you
for you sorry but when it does that go into those resources and open up the
logic app in fact open up the logic app designer more specifically so you can
kind of fill out the rest of the information now let’s go through a
little bit of what this logic app designer actually does so you see this
first block here this is your connection to Adobe Creative Cloud
you need a Creative Cloud account but fill in your information here fill in
your password and so the one thing here is that Adobe Creative Cloud just like
onedrive and all the rest of those those have connectors for logic apps and they
will basically trigger a logic app from happening so this is whenever you add a
file we’ll go ahead and kick off this launch got correct it will exactly and
we’ll see that just a second we’ll add a file but when that file is added the
next steps are pretty straightforward right in fact you see them here we hash
the file content itself but you’ll notice we also have the metadata now
mark there’s a reason we’re actually hashing both you want to sort of explain
that a little bit you bet and so the hashing of the file make sure that the
file hasn’t been tampered with so if someone’s changed the image or a
document that’s gonna be super important but remember these things don’t live in
a vacuum there’s usually context about them who’s the person that created them
and other things like that so one of the things we also do here is we hash the
metadata so we make sure that it’s not just this image but it’s this image with
the right context so I don’t take it with the dhobi Creative Cloud imagine
you’ve done some really interesting photography I then take that image and
say okay the image is valid which the first hash would do but now I’m saying
it’s Marc Mercury’s image which is not true so the metadata would have changed
so we’ll really look at the two of those in this example absolutely okay so
straightforward hash the file hash the metadata a little bit of few more
variables here let’s talk about user chain identifiers right that is the be
not necessarily the person but the process that is adding this information
to the chain right what is what does that really mean sure so in this case
this logic app is effectively serving as an agent and that agent is going to
write to the blockchain and so that user chain identifier is the
ID for it on the blockchain then we’re gonna go ahead and initiate that request
on behalf of so it really is just those for the agent that’s gonna be writing to
the ledger and then there’s last piece of information file registry address
what does that do so in reasoning aetherium blockchain in
this particular example and so smart contracts are deployed at an address
and so this effectively is the address that we’re going to be sending this
request to so we’re saying hey we’ve hashed it send it to this registry at
this location yep so we have all this information and you see the last block
there is send message this effectively puts the information in this case into
workbench and eventually wind up on the blockchain and you’ll see that in just a
second but we could replace this with other things right in fact we could
replace this with the logic app in fact there’s a very specific logic app we
have that will do what for you yep so you can have a logic app connector
that’ll allow you to send this directly to aetherium we have other ones in the
works for things like the quarter blockchain but suppose you wanted to
send it to a ledger that we don’t have support for today you could write your
own as your function and have it call that function yeah they would go ahead
and send it in so very flexible architecture yes future looking forward
to future growth right exactly awesome all right so let’s do a quick demo let
me go and again we’ve already have workbench deployed I want to show this
screen just sort of briefly you see we’ve done a little bit of testing
already we have a few files up in our registry three files today let me go
ahead and add a new file to Adobe Creative Cloud so let me come over go to
the Adobe account we have created let me find a file on my laptop here and drag
it over oops sorry just one file let me grab this file drop it into Adobe now at
this point my file is getting copied into Adobe you see here a few files
being uploaded let’s go to the workbench and four folks are listed you were
logged into your Adobe Creative Cloud account
well actually think this gets mined okay exactly and so you’re just dragging and
dropping into Adobe’s cloud and then it’s being triggered it’s triggering our
logic I think exactly I’m going through that flow we just showed nobody tells us
we take the file hash it in fact you already see it here on screen right and
this is the fourth file add it to the blockchain with all of the important
information that we need the file hash the metadata hash you’ll notice there’s
no file name here mark you want to explain why we don’t add the file name
yeah so that’s one of questions it does come up a fair bit like hey where’s my
file name and so the thing is that a lot of file names actually contain metadata
that could be considered personally identifiable information and so the
blockchain is immutable so once it’s on the chain you’re not going to be able to
get it off and so here we’re using the file ID which is not
and then if you did have a name that you want to dissociate with that you’d store
that off chain like in a sequel database or cosmos DB here they’ll switch things
in and pair them up for reports and things later on yep absolutely
so that was the demo super simple super quick and that’s kind of the point so
yeah that’s all part of the Azure Blockchain Development Kit right we have a
find that in the link we’ll have in the description for Github Oh yep alright
thank you for joining us that’s right and you can follow us @MSFTblockchain
on twitter and subscribe on youtube to see these videos in the future you

One thought on “Handling media and documents on the blockchain”

Leave a Reply

Your email address will not be published. Required fields are marked *