Using Ethereum Logic Apps to publish ledger data to Azure Search

welcome to another episode of Block Talk
I’m Chris in today’s episode we’re going to continue the theme we’ve been talking
or discussing in the last couple of episodes we’re going to continue the
theme of how do I take ledger data and push that into some sort of back-end
system in previous episodes we showed how to take something like the SQL
Server MySQLPostgres and then integrate that with the ledger using
Logic Apps and some of our logic app connectors and today’s episode we’re
going to do something very similar but instead of using a structured database
to contain my my contract information to contain my ledger information I’m going
to use Azure Search let’s go ahead and look at the logic app flow to talk about
how this works with Azure Search so here you’re on the screen if you’ve seen any
of the previous episodes should look very familiar
in fact I’m reusing the same database we used for the Azure SQL episode or the
SQL server episode I’m sorry but we’re going to go ahead and when I add
an entry or to this table we’re going to go ahead and use the Ethereum Logic App
connector to create a smart contract but rather than push that information back
into a database we’re going to use this HTTP request and push that information
into Azure Search you can see here on the screen at the bottom I’m gonna push
into my search index the contract address the contract ID the participants
and the transaction hash so that now in Azure Search I have a widely available
easily queryable queryable index of all the information i’ve created on my on my
ledger let’s go ahead and watch that in action so let me add a few transactions
to my database which in turn will create various transactions or various entries
into my search so let’s go ahead and for example
let’s add it’s just that a couple of these let’s go ahead and add maybe two
so one two three five one two three six and then I have a couple of them that
are already in there but let’s go ahead and add these now while we were waiting
for the SQL database to update this whole flow was taking taking shape
deploy the smart contract push information into as a search now let’s
go ahead and look at the information that’s in as research today I’m going to
use fiddler you can use postman you can use any sort of rest rest capable application that you want postman and
fiddler are certainly very common very popular you see here I’ve created a post
request using the rest interface specification for as research when I go
ahead and execute this we’ll go ahead and execute this in the request body I
am going to ask it to please find me the contract address of the one two three
five one two three five contract that I deployed initially so let’s look at the
result you see here I’ve done and I’ve sent a resultant as research as a search
comes back and says here is the address of that contract let’s look at a
different way to get to that information I use the post request earlier but I can
also use a get request the get request rest interface looks very similar but
rather than put my search string in the body of my text I can put it here in the
header information so let’s go ahead and execute that let’s get the current
contract that we just searched for earlier the one two three five let’s
execute it and then if you look here you see again now I’ve found at my contract
address one two three five all of the participant information so again just
two different ways to get to the same pieces of data in the first example I
used a a post request to go ahead and send information and a request to the
index to the search index using in the body in
that second example here I used to get requests but basically to get the same
information but in the header rather than in the body requests and that’s it
just a very simple walkthrough of this logic app connector demo these are all
available on our github page in the Blockchain Dev Kit github repository
great thanks for joining you

Leave a Reply

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