Azure Blockchain Development Kit for Mobile Apps | The Xamarin Show

>>On this week’s Xamarin Show, I have my good friend Marc on from the Azure Blockchain group
showing us how to become Bitcoin billionaires by integrating the Azure Blockchain Development Kit
into our mobile apps. You don’t want to miss this. [MUSIC].>>Welcome back everyone
to the Xamarin Show. I’m your host James Montemagno
and today I have one of my best friends in
the entire world all the way from Building 41 Marc from our Azure Blockchain Group on
to talk to us about blockchain.>>Excellent. Thanks
for having me James.>>Yeah, I know nothing
about blockchain, this is the most exciting episode
of the Xamarin Show I think I’ve ever produced
and had the honor of sitting across someone
that is incredibly brilliant to talk about blockchain because I
know nothing about it.>>So, James, can you do
my performance review this year?>>Actually, send me a perspective
we’ll be good to go. So, all right, I just need
to get out of the way one, what is this Azure blockchain group that we have and what do you do here?>>Sure. So my name is Marc Mercuri, I lead the Product PM team. We actually have a set of different blockchain
technologies that we do. To be clear though, we don’t do Azure Blockchain
Server Enterprise edition 2018 R2 or anything like that.>>Update four.>>So, update four. So, the key thing is
that customers ahead there’s a 120 different types
of blockchains, right? So, blockchain is a category
of technologies just kind of like NoSQL or SQL server
and that sort of thing. So, the reality is
there’s over a 120, please don’t be a 121 and they say, can you do the best at Microsoft? Can you bring mobile? Can you bring identity? Can you bring security, and bring those to the
ledgers that already exists? Distributed ledger is
another name for a blockchain. So, all blockchains are
distributed ledgers, but not all distributed ledgers
are blockchains.>>Remember that. Don’t forget that.>>That’ll be on
the interview. So, what we’ve done is we’ve built out
a set of services to help people be very productive using blockchain and billing
end to end applications. So, what you’ll see us do is
we’ll have first party services, we’ll have the Azure Blockchain Development Kit we’ll
talk about today. Things like Azure
Blockchain Workbench, which are really about how do
you go from what used to be eight to 12 weeks down to say eight to 12 days and
now we’re working on things for eight to 12 minutes? So, when I talked to the folks in my team about it’s let’s
optimize for the hour. So, everyone’s excited
about blockchain, but it’s usually not
their full time job. So, they get an hour before work or an hour at lunch or
maybe an hour while their spouse watches Game of Thrones or Grey’s Anatomy whatever they do. So, what you’ll see in the DevKit is a great example of this is how do we help within an hour or do
something productive with blockchain? In this case, we’ll talk about
using mobile to do that.>>While I’m washing
the Bachelor as I do my partner will be off learning about
blockchain integrating this.>>There you go.>>That’s what she does. So, perfect. All right, so first off
more than anything, I think we need to get
it out of the way. What is a blockchain? Apparently, it’s also a ledger
but a ledger is not a blockchain.>>So, a blockchain is a ledger.>>A blockchain is a ledger.>>Okay, so let’s talk about what a distributed ledger is and
we’ll talk about blockchain.>>Perfect, I like this.>>So, we think about
a distributed ledger and so people have used
ledgers forever, right? Think about in the opening
like a Christmas Carol, there’s old man
Scrooge guiding debits and credits and
those sorts of things. But basically, a ledger is a characteristic
of a blockchain, right? So, what that means is that is there’s not a database record
where I replace this value. There is a set of values
that are recorded in this ledger that I can go
back and take a look at. Now it’s combined with it being
cryptographically secure. So, what that means is not only
are these ledger entries in there, but I’m fairly confident
they haven’t changed.>>Got it.>>So, you think about what
the database people might a bad actor might take
a bribe or something like that and change
values in a database. So, it happens. With this happens here is is we know every record is there and we have high confidence it
hasn’t been changed.>>You’re telling me
that there are people that do bad things on the Internet.>>Yes, but for whole other stuff.>>So, all right so let
me first break this down. A ledger, people may forget what a ledger is because I’m not
balancing my checkbook, all right? I’m not putting my input
and output almost like my checkbook back in the day was this ledger of I paid this person. I deposited this check. This person owes me. It’s a combination of ledger. I think about is this person owes
me I pay this person et cetera. What you’re saying though is that I’m a traditional
mobile developer. I think about building
my architecture. In tradition, I think
I’m going to spin up a database and then I just
insert records into there, but it’s not just a database. It’s a distributed secured database.>>Yes, so, let’s talk about
a couple of other attributes. So, one is we talked about it being ledger and then it’s
cryptographically secure. Then we haven’t talked about
yet is that it’s shared. So, if you think about like a supply chain suppose we’re delivering
ice cream for example. There’s everyone who makes will be boring we’ll have vanilla, right? So, you have people who
are making vanilla and there’s people that
are raising cows and monkey and that stuff and then
it gets mixed together and then it gets packaged
up and it gets sent to a retail store and that thing. Well, if you think about
where they started was cryptocurrencies those are
transactions around currency. We can think about that ledger, I can now track everything in
that ledger in terms of what was the life and where
did everything come from. So, I can say this vanilla came
from here and all the way through. Then when that vanilla and
the milk comes together, I can say that this has
now become this product. So, by the time it gets
to the retailer’s shelf, I can track everything back with all those entries and have really high confidence
about where it came from.>>I see and you care about this all the
time often when something is tampered with or there’s no I mean tamper with just there was
something with spinach, it’s always spinach or remain or
some lettuce some leafy green.>>Spinach, romaine lettuce.>>That needs to get tracked
back and sometimes that can take weeks for them to do it, right? What you’re saying is
with this technology, blockchain allows us to create
that ledger of this spinach. These went into this bag, that went on this truck,
that went and drove to this here and
then this was out. Based on how many inputs you can
keep adding to that ledger to track a full summary of
the finished product.>>Yes.>>James consumed it and we’re
going to have our apps that track my consumption and now we know that James has consumed that spinach.>>Well, we’re not there
yet, but that’s 2.0.>>There we go. I’m thinking
like a true blockchain expert.>>But the other thing too is
that for people that are- so that’s great for when
bad things happen. So, maybe one of what a food
safety incident but suppose you want to make sure that when you buy coffee that or you buy ice cream it’s from a farm where
there was no child labor. Or maybe you can learn more about particular areas by knowing where this particular
coffee came from. You can say I’m paying
a premium for that but I also understand a lot more about the region other things like that. Here Microsoft, we have a number of solutions that can
help out with that.>>So, what do we got? What are we going to be
talking about today?>>So, one of the things we have is this thing called Azure
Blockchain Workbench. That’s one of the things
that we shipped first. We started with templates and
so templates would deploy a blockchain for you and
customers said, “That’s great. Now what do I do with
it?” We said, “Hey, we want to do- we build an app.” I want to be able to have an API. I want to get data into a database because sometimes you want to query them
in different ways or make it available to other folks that might
will have a mobile app because if you think about
an end to end supply chain, a lot of people on trucks and
they have mobile computing in their pockets and
they want to be able to record information
and add information. We’ll do a demo of that
later in the show.>>So, what we realized is that projects we’re taking about
eight to 12 weeks and about $4,500 which was
a showstopper for proof-of-concept.>>Yeah. It’s a lot of money.>>They were pretty
weak purpose concepts. It was like a black background
with green text that was scrolling and exactly what say is at the beginning of the matrix from a business process I don’t know, I’m not going to give you $500,000 or $2 million to go build a signal. So, what we said is
the bulk of this has nothing to do with the Blockchain, what people wanted to do was write these things called smart contracts. Which are basically think
of them like a class or the code that drives the process as a set of behaviors, their state that’s associated with it and there are
functions that are there. So, they’d rather write
those and then just get all the rest of that for free. So, with Workbench we
said as we could do that, and we can go from eight to 12 weeks
down to maybe into 12 days.>>Got it.>>So, that’s what we
released last year. So, here you can see what it really does
is bring the best of Microsoft like we were
talking about the Blockchain.>>Yeah.>>So, it brings identity management
and enterprise integration, platform we’ve done
some somewhat DevOps but clients are just super important. So, with mobile we said there’s
an opportunity for us to go ahead and build a mobile application actually folks formerly
from those Xamarin team. Now one of them is like
a little black belt to kind of muddy, built this out for us. So, now what we’ll have
is part of what we’ve just released called the Azure
Blockchain Development Kit.>>Cool.>>Is a full-fledged
Xamarin application. You can spin it up and run
it as is and it will connect with APIs that we’ve
created behind the scenes. So, if we look at Workbench, this is the architecture
underneath the covers. You can see here
there’s an API I mean, API is designed to allow people to log in and authenticated way to
access the backend services. So, the Xamarin app is
one example of that. It’s part of our DevKit
and so the DevKit really focuses on three key themes.
One is connect. How do I build clients
like in Xamarin to enable integration with clients and
individuals and in system? One is focused around
how do I integrate, so how do I integrate
with my backend systems, and how do I deploy with DevOps?>>Nice.>>Yeah. So, really about how do you build an end-to-end
solutions because a lot of people talk
about the ledger and like the ledger is the only thing.>>Yeah.>>It’s like no, it is
a data technology just like a relational database data technology and it’s part of
an end-to-end solution. Mobile as an interface
becomes just super important because it’s computing pocket that everyone
has in their pocket. So, whether I want to check things
that are on the Blockchain, whether I want to interact
with the Blockchain. My colleague, [inaudible]
relationship things around [inaudible] identity there so we’ll get Blockchain mobile becomes a really important facet of
the end-to-end solution.>>Yeah. What I want to point out on this diagram too and
you’re looking at it, is that it may look scared
is there’s all these things, all these different
technologies but I’ve shown very similar diagrams and what we’re seeing on
the left-hand side is you have your data sources,
your apps, your sensors. It could be IoT devices, your mobile apps, anything else. What I’m seeing is things that
I’ve done forever which is like communicate to an API
like I’ve done that forever. Then there’s a bunch of
other stuff happening but a lot of these things
look similar to me. Right? I have a database in there. There’s off chain storage. There’s an Azure
function in there and integrating the rest of my services. So, really it seems
as if I don’t have to completely take years of learning to start
integrating some of these. I’m already doing a lot of this.>>So, you start on and
here’s the beauty of it, to get all that stuff on the right. We’re just showing that you
know what’s under the covers. You press a button you deploy
this from the Azure portal. You provide some parameters about what you want to name it
and things like that. That it gets all spun up for you it’s run for you behind the scenes. So, if you want to do a Blockchain project or
your mobile developer doesn’t know anything about Blockchain or maybe some of
these other components, it’ll spin everything up for you. There’s a swagger based endpoint
you can hook into the API. We have this sample code
and you can wire this up. So, again optimizing for the hour, takes about 20 minutes
to deploy this. You download this, you spin it up. Within an hour you’ve
got mobile connecting into a backend here and we’ll show one of the sample
applications we have. So, there’s smart contracts that show the different types of
applications that you might run. We’ve got a whole set of those. Whether it’s connecting up
to IoT for supply chain or will show a simple
asset transfer scenario where we’re exchanging value. In this case we are talking
about selling cars in the site all using the Xamarin app.>>You want to go into
that and show that off?>>I do. Yeah.>>Where do you want to start
on the browser or on the phone?>>Why don’t we start on the browser?>>Okay.>>I’ll pull this up here. So, this
is Azure Blockchain Workbench.>>So, describe first what is
an Azure Blockchain Workbench. You can mention all the things
but where did this come from? It was just the easy part deploy?>>That easy part deploys.
This what you get.>>So, you deploy this and
you’re going to see this. So, it looks a lot like
office. It’s boring. That’s an important thing
for when you talk to customers or if you’re especially the consultant working with clients. We think about the old way was black background with
green text scrolling. This looks like office.
This does not scare me.>>Understand this
there’s a new button. There’s a bunch of words that I can press on most likely see some number. That’s how it really
look like office.>>Yeah and so we’re actually
following the office paradigm and where it’s a React application. We’ll be open sourcing this later as well that people can have access to. So, here I can click “New” and
I can add a new application and upload one of the smart contracts
that we have available. But here we’re going to use one
that we’ve already uploaded. So, what happens is as soon as you upload it that’s
smart contract and another file that describes the business process that goes
with it, we give you both. It will go ahead and put
a new title in here. This is for something
called asset transfer. Okay. So, here what I’ve done is
I clicked on “Asset Transfer”. Remember we talked about
Blockchain being a ledger.>>Yeah.>>So, we also have these things
called smart contracts. So, what happens is
I can go with create a new contract or I can
interact with an existing one. What happens is when I go
to create a new contract, or I go ahead and want to
make changes to a contract. Those are all transactions that
are being stored in the ledger. This makes it really easy
to go ahead and do that. So, suppose for example, I wanted to create a new contract
here and we’re selling cars. So, let’s say I’m going to sell a 2019 Subaru Outback
and that costs $28,000. I go ahead and click “Create.” You can see your contract is being created and what’s happening is
it’s sending it to the Blockchain. So, unlike a database where
you writing directly, we’re setting this to a ledger
that has what’s called a consensus algorithm and then
eventually joins the chain. So, if I click on this now, I’m seeing information
that was put to the chain and you can see here
what Workbench does for me. So, remember we talked about it
being a database where it records information about
the context for this. So, one is I’m an authorized user. I’m in the role of a seller. I can see what’s been
added to the chain here. So, all these values have
been added to the chain. You can see there’s
a contract address. So, this is the location. Think about like
a database row where I might have a representation
of a record. This is the address on
the Blockchain where this particular contract
has been placed. Here’s the details have been
passed along through that. My asking price is 28,000. There’s no offer price yet. You can also see here that I can take an action and
these will trigger other types of entries in the ledger. So, I can modify or terminate
that sort of thing.>>Got it. Okay. So, this is what
we get on the website of things.>>Yes and this is all built
against our standard API. So, now I’m going to go into
our Workbench application. So, I have already the mobile app. Right. So, here you can
see I’m logged in with my Azure Active Directory login. So, I’m going to go ahead
and click “Asset Transfer.” This looks very similar
to we saw on the web app. We can see here that’s
a Subaru Outback.>>Yeah.>>Now I’m logged in here is me. You can see what’s happened so far. So, there’s a graphic
that shows the progress. I can see the details as the contract
address we saw a moment ago. The role owner here as the owner Marc and then I can see all the
activity has happened so far. Now you know what, I’m going to
go ahead and take an action here. Remember I’m logged in as Marc, and I’m going to go
ahead and modify this. I’m going to say actually it’s a 2018 Outback and because I’ve
got big fingers on a small screen. We’re not going to
say Subaru Outback. So, they’ll change the price
for this be $25,000.>>Okay.>>Click “Submit.” Okay. So, that’s submitted
here from my mobile app. You can see here, it’s actually already been
added to the blockchain. So, if I click here and go
back to the web application, and I look at activity, I can see here that
the modify event has come through. We’ve changed it to 2018 Outback, and the price is $25,000.>>Got it. So, what
just happened there? Now, the action, that
went to the blockchain.>>Went to the blockchain.>>Went into the blockchain.>>Event happened on
the blockchain, they got picked up, put into the Workbench system
and then displayed here. Now, what’s happened is that
we’ve updated the state variable, but all the transactions, so the debits and
credits in this case, I’m saying that this is
the price and this is the name, and then I’ll go ahead and say,
no, I’m going to change that. All those transactions
are on the blockchain. So, there’s an immutable record
of those that we have available and then
people put an offer and so, if someone put an offer and
that I’d been accepted, I said, yeah, I don’t
want to sell it to you. You’ll say, actually, you’ve
accepted it it’s on the blockchain, so on and so forth. So, all that sort of being recorded.>>Now, imagine though,
here so this take action. So, you’re specifying. Your saying, hey, this
is a 2018 Subaru, but since you have a mobile device, I have to imagine that
the reason for it is not only you can do it on the go because you could build
a mobile website for that, but now you could Azure GPS location. You take a photo. If you were
doing that ice cream situation, you could probably even
have the temperature, like with all the different sensors
that are built in, you can make those transactions
on the blockchain. So, the reason that it’s a mobile app now is that you’re just getting
a mirror and can take actions, but you can now add
all this other transaction data. You’d be like, Oh, look, it really is a 2018 Subaru, is that correct?>>Yeah. So, there’s
a couple different things. One is, imagine I’m selling things and I’m not
actually from where I say, I’m actually some place else and trying to get you to wire me money.>>Yeah.>>Phones have lots of
different sensors near. So, I’m going to get
my GPS information. But we tend to see them
a lot more in sort of supply chain scenarios
used a fair bit. So, imagine I’m delivering
a truck full of Xboxes to Contoso or
tailspin toys, right? They’re going to sell them.
Well, some people will say, hey, you didn’t give me
the full load of Xboxes. So, there’s this dispute
that goes on. That can actually be expensive for not delivering on time
and that sort of thing. So, what you can do with a mobile
phone? Let’s think about that. I can have a GPS sensor. That’s going to say that this action that this person is recording
is at that location. They’re taking a picture
and we can say that picture came from
that phone that was at that GPS location and then
there’s whatever the person puts in there and there may be video or other things like that
that you may record. All that is put onto the blockchain. The other thing that’s
really interesting is, a lot of people today
recording video on blockchain. Suppose you’re using it
from a different type, together where I’m going
and recording something. I want to say that this is my video or make sure it hasn’t
been tampered with. What you can do is, now you don’t put videos on the blockchain or images in the blockchain.
You do what’s called a hash. So, you run it through
an algorithm, you get a hash. But you can put that hash. You can take the video here, push the video into storage, but also put the hash
into the blockchain.>>Got it.>>Then, if anyone’s modified
even a pixel of that, you can say, no that’s
been tampered with.>>Yeah, because of actual change
and then bang. Yeah.>>So, we’re seeing lots of
innovation now with mobile, but the biggest problem was that blockchain is just a lot
of fun to deal with. Like, it’s not a relational database. There’s no SQL API to it
and those sorts of things. So, with Workbench, we’ve actually
added APIs that make it easier. We also made them enterprise
friendly because they’ve got Azure ID backing on that. Then, the other thing is
that we’re going to give you the app that you see
here out of the box. So, you can take this and just run it and point it to
the API and it works. Then, sometimes simple changes
where you change like the color and those sorts of
things can make a huge difference. Actually, if we take a look
over here, we can get it. It’s over here in our DevKit.>>How cool. So, this is just
available right on GitHub?>>It’s available on GitHub.>>Beautiful.>>If folks wanted
to do pull request, we will take a look at those as well. The number one questions
we get from books like, how do I do like colors and theming. So, we have a constants.cs
file in the helpers folder. We can go ahead, modify that and very quickly tailor it for your customers. So, if you want to explore it, again, optimizing for the hour. You can actually get
a blockchain application with a web interface and mobile in
a bunch of different scenarios whether it’s IoT or
asset transfer or a bunch of other things we’ve
got up there within an hour which we think is great. You can tailor that if you want to go talk to a customer about it or show them some value about
how they can go do that. The other thing is, a lot of times people
doing mobile development, maybe working with an ISV that
already has an application. So, we’re seeing a lot of folks
that says, hey, you know what? If I could have a testable
information that I share with multiple parties and we might have multiple people writing to that data, that a blockchain could make
a lot of sense for that. So, in terms of prototyping
something out quickly, they could do it with
Workbench and with the mobile app to see what
it might look like and then leverage some of
the development kit to go ahead and bill us really
interesting applications. So, the other thing that is
not easily tied to Xamarin, but for mobile just to
show the importance for mobile developers, we have, if we’re tracking that scenario, we’ve got vanilla for
ice cream coming in. That’s smallhold farmer who
sits in two acres of land, doesn’t necessarily have
an iPhone or Android Galaxy 8. So, they’re going to go ahead and want to use sms for interactions. Then, we have bots with
the bot framework as well as with Alexa and Cortana to
interact with things as well. So, really a whole set of
really interesting applications, but mobile really is
going to be the forefront because this is computing power
that everyone has in their pocket all over the world.>>How did the Xamarin
platform help you really scaffold these out and
why did you go that route?>>So, yeah. I mean, so, people say, hey why don’t you just do
like a mobile app for this? So, well, a lot of
people looking at this, they want to make sure that
it’s readily available. They want to put it
into an app store, and they want to do it
for both iOS and Android. So, Xamarin really made it. In customers that we’ve
taken this to and shown to, they’ve just been
super impressed at how fast they can both test
on both platforms. You’ve got App Central, we can
make it very easy to deploy out to enterprise environments
into customers as they’re getting ready
for the App Store. So, it made it very
easy to to develop for both platforms and across
multiple form factors. So, it’s not just an Android phone
and as I say Windows phone, but a iPhone, but also
the ability for me to get onto a tablet or other types of form factors that are appropriate in different
business environments.>>Got it.>>So that was super important, the ability to be able to take
it out to folks in and show it. Then, I think the other
big thing is being able to interact with the sensors
really easily. There’s just so much that’s
provided by Xamarin out of the box and then there’s
a whole bunch of like open-source libraries that
we’re able to really pull together in a very
short period of time. I need to give a shout out to to Mahdi who’s our global black belt, who used to be at Xamarin, and he was really one
of the minds behind this and really has been
driving and taking it forward. He’s been like, oh
yeah, we can do that. I mean, it’s actually been very cool because when we say, hey,
it could be good music. Oh, yeah, I could do that,
and like, how long would say, oh, I could have
done this afternoon. So, this is like a bunch of stuff in the box and we wanted to add like, were onsite with a customer
and they’re like, we’d really like to be
able to scan bar codes, and have it put and say, oh yeah, how long will it take
to get in there? He’s like, hang on, Matt, in 10 minutes already had done?>>Yeah.>>So, just going back like
optimizing for the hour, it’s just you’re super productive.>>Especially, we needed to
plan multiple form factors, multiple operating systems
and CICD pipeline, everything and I’ll feel it really good and integrated
in that dimension.>>Yeah. Especially, we’ve got folks at 11 Azure DevOps
and they’re saying, oh, I can use DevOps with Xamarin. So, one of the things
we’re seeing with customers a lot of
blockchain developers, they are not traditional Microsoft. It’s like the first wave
of developers. So, what they’re seeing is like, hey this is really easy for us
to get going and then we have this new wave of developers
because it used to be so high. The friction was really high.
So, the people that were involved like had
high pain tolerance.>>Yeah.>>That was a primary focus. We’re now seeing is like, hey, there’s lots of people were
interested and we’re saying, “Hey, you know what? If we can really lower the friction, if we can make it really easy for traditional mobile
app developers to be able to interact with the ledger. If we can allow people
who do AI and analytics, people get access to that data, that we can really start seeing some really cool innovations from
folks in the enterprise space.” So, this is really a lit up
a number of engagements we’ve had. Actually, last year at Ignites, we had 3M onstage showing
their mobile apps. So, they had taken this
and done some work with that for a solution to get
around smart labeling.>>Very cool.>>Thank you.>>Awesome. Well, Marc,
thank you so much for sharing this all of it.
It got me all excited. Now, I need to go learn
blockchain and get this up, and I’m just going to
go spinning this up this afternoon because
I can get it done.>>Excellent.>>As we open all of the
links in the show notes, and I’ll see you have a show here
on Channel 9, YouTube, right?>>We do. Yeah, it’s
actually called Block Talk. So, if you’re
hardcore mobile developer, but you don’t know
much about blockchain, we actually have like Blockchain 101. We have introductions to Workbench, and all the things we
talked about today. We’ve got videos like this and we also have snack packs
that are like step-by-step.>>Nice.>>Then, if you want to use
different aspects of the solutions, we have walkthroughs in
the development kit, and then also we’ve
added an easy button, so you can go click for
a particular sample, and we’ll go ahead and deploy
the sample for you as well.>>Awesome. I’ll also put links
to that in the show notes below. Lots of good blockchain stuff. Marc, thanks for coming out.>>Thanks for having me.>>Yeah, absolutely.
Well, stay tuned for more awesomeness from Marc, from me, and make sure you subscribe
to all of our shows here on Channel 9 and YouTube,
so you’re up to date. Thanks for tuning in. Be sure to subscribe and
thanks for watching. [MUSIC]

7 thoughts on “Azure Blockchain Development Kit for Mobile Apps | The Xamarin Show

  1. This is really exciting!
    Is there GitHub repo for the Xmarin app (+ it's configuration with blockchain)? Mark is a really awesome guest on these shows! I could watch this guy chat about blockchain and integration for days! Love the content! Please keep it up! Huge fan

  2. I still dont see how the difference at backend is going to make business model different for the Subaru example, as long as user experience is same, immunity and decentralization is not something normal people care about

Leave a Reply

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