[Applause]
you know what works okay everyone thank
you for being here thanks for coming
specially on the face of a negative
phone coming out of way later
my name is Santa Bernardino I'm a
software developer at opens up we
commence Emily we perform security
audits for these Android systems and we
also build open-source content libraries
and even for tools but I'm not here
today to share our work here or does
have a great work it's a space showing
that we have to talk about the personal
project and have took over a year ago I
wrote a book to more web 2.0 developers
to the space and how to develop
decentralized applications with this
code get it the thing is when working on
this person I think that one of the best
ways to learn something is to try to
teach it I also managed to squeeze
support attachment which is the best way
to learn something is to actually try to
research it try to teach and share it
with others and one of the biggest
things I got from the book is tablets
are actually much more tricky than they
see there are many things that we take
for granted that we assume that they're
easy to develop I mean when you start
thinking you you start to realize that
it's not exactly that way and to share
that with you I want to presented
short challenge basically some very very
simple obligation and showing the North
achieve of tokens over specific riders
and see how it's not become actually
tricky pretty soon we'll go with it
about minutes not many it's everything
to her throat so bear with me but the
idea will be just to get the great
office of the Year ceremony open new
ones that's it something to write well
assuming we have two building blocks
this is an oversimplification of the
standard example something that lets us
know okay give another is as these
tokens and and eventually something new
ones
step one listing the grant organs should
be Feliz right the user has received two
na two can be we just ask for the
current tokens forget that is with both
right but what we don't yet is when we
receive there are those no that's when
they were located below the particular
address for instance so can be good have
received last blow which means it's not
confirmed it's subject to being removed
and it's not information actually gets
so if we want to do a picture we need to
a query the state a couple of blocks
back let's say half a dozen one dozen
blocks depending on how much
confirmations but now we have a gap on
the past six blocks which natural to
feel maybe getting the past events
bowling or something to see something
has changed okay let's clear that out
for a second try to focus on the second
problem how we subscribe called how is
he for new targets this is probably easy
actually we have it what's of
information do you know not all notes
expose one we can just issue some time
with also from the current block onwards
we're notification on all opinion
transfers of the events when your job
instance the user receives well
hopefully from different one disappear
from a get install nature but that's yet
another problem so okay let's
a subscription the user receives two
tokens attempted an alpha to committer
we get events for that pretty severely
need to display them user interface this
is a reorder the subscription will also
take care of this for us and will let us
know you know talking metals remove user
organization token Delta at the earth
instead but this requires a change the
subscription to be allowed subscription
something that runs over worth of it and
HD the connection ribbon connections
break they may actually break while the
really stay in place which instead no
losses ability this is the state of what
information has been sending us and what
should we do struck that the
reorganization happens and we end up
with a spurious version of a client side
so we may that we may end up displaying
false information to the user again this
is a pretty edge case but connections
break witness connectivity there we're
screwed
we can go on another approach we can go
back to basics just polling them go with
a simple algorithm that just requires
checking block cache is continuously
seeing if they have changed a dividend
rate changing the block cache in Surrey
org we can react to that it means going
to undo all the produce event so we also
need to give a mapping from block to
from block to events again don't want to
go in depth but it's a bit cumbersome
it's not definitely not as easy as
installing a subscription actually using
this approach we can also soap a six
month window and a few other things but
since I only have my five minutes that
the point I want you to compare
to share with you is that these things
are more difficult than you think
and if we start digging and we start
looking for edge cases for unstable
connections reorganizations for stuff
that for the stuff that is outside happy
path things get very pretty quickly we
need to be looking for this we need to
do more work to have better plans and
libraries better support for travel for
having this big shout out to the various
blocks during library out there which
has exactly this case and by the way
hardly anyone uses it and especially
when you put your testing tools I mean
it's really difficult to code
application that's going to be resilient
to these situations if you cannot test
it there is no way for us to test our
organization there are cognitive tools
for testing sporty connections racially
develop assuming that we'll have a great
differences type of Soviet women we
don't always - so bring to make sure
that our testing framework that distinct
tools we use are commonly for support in
all of these cases so going back to the
challenge is a couple minutes before and
so we're just you know knowing how you
will calculate I've created an internal
forum it would be great if you to join
share your thoughts there I mean the
politic approaches shared is only one
option and I'm super interesting to know
on how you guys would solve it so that's
it thank you so much
[Applause]