2018-12-05 Engineering Meeting

Date/Time: 2018-12-05 @ 15:00 UTC / 10:00 EDT / 23:00 HKT
Click here to convert to your time zone
Length: 45 minutes
Meeting link: [https://zoom.us/j/966890423]

This meeting is for the engineering team, app developers and the community to discuss engineering concerns or questions.


Please reply to this forum post with items you would like included on the agenda.

UserSession API

I’d like to discuss whether or not this can be refactored to a non-breaking change.

Meeting Transcript

Unknown 2:43
cool fun so first item on the agenda appears to be UsersSession
API earn brought up.

Unknown 2:51 So I want to thank everybody for for comments on a pull request.
I was in the process of finding those, but since we have a meeting, we can talk
about those now instead of writing them down, which will be great for posterity.

Unknown 3:04
We should write it out as well.

Unknown 3:08
It’s transcribing as well so Oh cool.

Unknown 3:13

Unknown 3:15
So the question is whether or not this refactored into a non breaking change.

Unknown 3:21

I mean, it clearly can be refactored to a number of you change any that uh that
Hanks proposals, really great. I actually like as I like went back to the
beginning of why we started to do this and then looked at like the results so
realize that the one of the motivations for doing this was did we were handling
state without telling developers like so there’s a bunch of instances where they
didn’t realize stuff was being stored in local storage so I could have a bug
like something a break it like delete their code rewrite it and find out the
same problem was happening like because like there’s stuff stored in local
stores that we didn’t tell them about.

Unknown 4:01

So if you look back the forum thread the original motivation was like 200
reasons. One was to like enable usage of this in non browser environments and
other was to give control to developers over storage of their state

Unknown 4:18

and like somewhere along the way. Third optimizing for, like, well, don’t want
users to have to. We don’t want developers to like have to configure too many
things. So let’s make it — and we also want it to be backward compatible with the
state is already stored in apps like so in local storage.

Unknown 4:36

So that’s how we ended up with its app config class that like sort of like if
you just create an instance class, it will have you just create an instance of
user session. right now it will use the same interface with local storage at the
current library does so that like nothing will break.

Unknown 4:54

Um, and also it won’t ask I want to ask you to specify that sort of strategy
will use local storage search strategy. By default, so like, in that sense, this
didn’t actually like get to where like like part of the intent was to like
practically force developers to be like, Hey, I have state and like either have
to have to make a choice of where it’s being stored. That way they know it’s
being stored somewhere and this doesn’t do that which is my fault. Since I sort
of create that. And so I’m perfectly happy if we think that like there seems to
me that there are two ways to go. One is to like sort of go the route that I’ve
chose that I started on and then like really optimized totally for like know
breaking changes like which is like to do Hanks approach what I think would work
very well um the other the other way to go is to say, hey, like we want
developers to know that they’re creating state you want them to make a conscious
choice of how that’s being stored so that they know that it’s there and then
they can deal with any problems and, in which case, that would be argument for
making this intentionally a breaking change and actually changing some of the
behavior of the classes that I wrote so that you have to like proactively choose
like I’m storing this and local storage.

Unknown 6:11

Yeah. So those are the two like forks in the road and I think that that would be
a great place to start. Discussion like what do we want to get out of this. And
if we decided it’s one that we go one way or the other.

Unknown 6:23

Um. Another thing we can do is, like, kind of in the vein of something that can
suggest it which is like we can add like a almost like a console warning. So if
they use the default behavior we get to add a console warning that says like
user session is being stored in the storage.

Unknown 6:47

Right. Yeah, I like that. And that way, like we could still have this sort of
like default behavior that like tries to do a lot of things for developers, but
like a developer is probably going to look at the console. The first few times
they run that application if not all the times we had all the times,

Unknown 7:11

but it doesn’t that mean this message will be log or basically every application
is there isn’t an alternative to local storage.

Unknown 7:23

Yes. So I guess it would only appear if you just let it let the default ride so
like if you just like don’t do anything like you’ve never declare any sort of
app configure something like that and you just use the default in there and just
be like a console warning that says like user session state is being stored at
local storage and it’s just like a one line message when the user lines we have
like a we have a lager which you were surprised I’m like, presumably that can be
configured and a production out not to print that out, log in all yeah and we
actually do for whether we are already using the different storage strategy
functionality like using Android to like store the session someplace and very
specific don’t know if other people are using it

Unknown 8:23

so yeah actually I really like that and then like I would be totally supportive,
I would it be in support of like Hanks approach. I think the question would be
like yeah he can you mentioned like deprecating marketing is deprecated um yeah I
don’t know, sort of, like,

Unknown 8:43

but you guys decide what like you think makes sense. I mean, there’s also a
question of, like, do how do you want the tutorials like the way you want the
tutorials written this more of like how do you want to frame the user side of this
this library, like how do you think about it, do you want them to use it. The
original way or do you want them to use it this way and like what are the trade

Unknown 9:11

Yeah, that’s a good point. So, like, even in the case of where we maintain this
this here so it’s not actually it’s breaking change and the tutorials aren’t
wrong, per se, we still might at some point want to update their content so that
people are like more proactive in their choice of how they store state

Unknown 9:36

or we could write a tutorial around state and how
to store it and how the logger works.

Unknown 9:43

Unknown 9:46

so, so I’m a little bit uncomfortable with I guess the current the current API
like like he has we have global state right so like that’s that’s sort of like
quickly. I mean, can possibly become confusing like we just have like this stuff
that’s out there and like in in Android. I believe iOS be chosen to take go the
session route where like you, you create a block session or user session that
represent object represents and encapsulates all this stuff need to know about
like that user being logged in and you can like pass that around and you don’t
have to worry about it like being influenced by like another instance of that

Unknown 10:25

and like we don’t have that property now and I get the reason for not doing that
is like, Well, it seems to be easier like to get started but I’m not sure what
the trade off is in terms of the developer understanding like what it’s
happening and like yeah I don’t know

Unknown 10:57

developers like patch. We’re using local state sell button legacy button

Unknown 11:05

of that that’s not really the issue, it’s just it’s more of a it’s more of a
like a best practices like I mean like it’s a question of, like, I mean, do you
want to have global state and and like a library like that. You’re just like you
board this library and start doing stuff and effects this global state that like
you don’t tell people exists,

Unknown 11:27

like in a way that like I would assume I use that that they were static methods
like like the current API. If I imported that library with someone else’s I
really jQuery, I would assume that like if I use the jQuery methods that I’m not
affecting something that’s going to live past the method call

Unknown 11:48

I don’t know I’m the only one, but that’s just how I think about it. I think
that’s generally a good I think it’s generally expected but that’s just you know
best practice. It’s not necessarily what actually happens in real life on I mean
like it’s not clear to me that it’s a binary choice right if we’re adamant about
making these methods static we could simply make each and every method we
establish the guy

Unknown 12:22

just reconstruct on the fly local storage.

Unknown 12:26

I think that would be also bad but the choice between doing that and having
static data if we already settled on having said

Unknown 12:42

worried about what people what the fallout is going to be if we break
compatibility like this. I think that’s going to shake the faith in a lot of
people building on us.

Unknown 12:59

Yeah, there’s more we can do. And in addition to like the console the console
warning, we could use like the JS doc deprecation tags and like really put it in
their face that they should upgrade and still maintain backwards compatibility

Unknown 13:16

mode most like IDs support the we could also set up, push this off until later
and sort of bundled together all the other breaking changes that we might want
to make and then released that as a separate beta version.

Unknown 13:37

I just don’t break anything for now

Unknown 13:41

I got a pretty good right right i mean like other other projects that have to
make breaking changes what we scheduled them like once a year, we do a big
breaking change and we do it. Around this time, so just be prepared and will
support the last release for, like, you know, one more year and then we’ll stop
supporting but it is common to leave in the backwards compatibility and have a
deprecated right like that’s super yeah that’s helped me to realize this, like we
just say blocksstack 18 is the deprecating stable old stable branch and
blocks tech 19 is the new state and we will stop maintaining or accepting prs on
walks at 18 at the state and we we instrument 18 with the deprecate tags.

Unknown 14:21

I don’t think this is that big of a breaking change to like be like I mean it
literally takes it’s a Find and Replace find blocks tech dot replaced with like
user session and then before that you create new user session, it took like not
much time to refactor test scores. I wouldn’t I mean I think that like we can
deal with how we how we should take breaking changes a different like discussion
than later than like as I like to sort of frame the discussion on like is is
having like is the current method of like having sort of like a global state
like is that problem or not. If it is not a problem, then we should just ship
like Hanks like solution. Like, I think, which is great. Um, if we think it’s
something we don’t want to encourage for XYZ then we should not like I mean,
how, how can we shift that we can figure out like once we have decide

Unknown 15:21

To be clear, I just wanted to throw my hat in the ring of I do not like the idea of
hidden local storage at all like having had these blocks, such as a lot in Node.
js that’s been a thorn in my side for a long time because local storage eoesn’t esit to Node. js.

{I agree that was the first big pain point I ran into
Blockstack JS. }

I have real experience with Justin hunter like having to do evil
things like dive into our private local storage state in order to do things in
graphite that he needs to do like the this API is a lot more amenable to what
he’s trying to do and I think he’s going to be really excited about it.

Unknown 15:57

I mean, so I like I absolutely agree like this is a really good pull request.
This eliminates a whole host of issues, it saves us a lot of future pain.

Unknown 16:06

I think the only question for me is like how do we deal with the inevitable
blowback of, you know, doing a breaking change now that App Minings getting off the
ground. And I think that what we need to come out of this meeting is either
either something we can tell them that makes them less upset or a promise that
we’re not going to deprecate just or just yet. It’s yet to be determined.

Unknown 16:37

I’m actually not worried about blow back and partially because we talked with
developers before like we came up with this API meet those has already using it
as well too. I believe, because it solves the problems that they had.

Unknown 16:50

Awesome. So, so I mean like, I don’t know. I mean, where’s the blow back coming from.

Unknown 16:57

I mean, you’re right. I have zero data points suggest is low back, and that
maybe that maybe the state of the world in which case, great break the world. No
one’s going to care.

Unknown 17:10

Interesting. I mean, all I’m saying is that like if we’re going to approach this
from a cover your ass perspective, like just leaving 18 as an old stable branch.
I think solves that problem.

Unknown 17:27
It doesn’t require any more effort from us, we just say that 19 is the new
stable branch all works going to have a year, but we’re not going to we’re not
going to we’re not going to like completely erase at just yet. So if you need
time to migrate you have time to migrate

Unknown 17:44
yeah and I mean we don’t want to ever erases a like NPM package right so like
none of the MPM packages will break if this 19 SHIPS right like nobody saying
it was like

Unknown 18:03
might as well be

Unknown 18:08
yeah you can actually lead a version on NPM but we wouldn’t do I’ve done.

Unknown 18:15

Yeah, it wouldn’t do it okay so like people people’s apps won’t just like
suddenly break but they wouldn’t they wouldn’t need to go through an upgrade
process if they wanted to get whatever the new features and so I think at case
then you just need to like write out a document. It’s like, we want you to
upgrade the Saturday to do the upgrade.

Unknown 18:39 I think we already have that which is great and I like how it’s
short and it’s very easy to carry out so kudos could read. Wait, you mean like
freak years post I mean like that. Let me saying that all you have to do is find
and replace and then the texts that describes smash that’s basically a post,

Unknown 19:02

but we should we should like put it into a document or some sort and make it a
little bit. Yeah, it needs to be right now yeah also like depending on how
people structure their apps, it’ll be a little bit different because like that.
No need to re instantiate the session object.

Unknown 19:20
Alright, cool.

Unknown 19:21
Then, then I’m sold. Let’s Let’s release 19 no one’s gonna die or be upset or break over it up to date with 19 like will tutorials are there any tutorials or documents that are going to break as a result of at Yes, people are going to like run up the reactors. Yes. Yeah. Actually, my maker and running plots that a key and if the NPM package is a pen that the version.

Unknown 19:56
So yeah, I will die.

Unknown 20:01
Yeah, I know there’s a lot of documentation that needs to be updated.

Unknown 20:10
That being said, none of it is, I think, none of it is actually will actually be broken.

Unknown 20:17
At the time of release. It’s just that like me. The yeomen app generator that we have uses blockstack 18 and the second that we update that to 19 all the documentation will break

Unknown 20:35
so can we have a flag day when we upgrade the auction documentation at the same time as emerging Mr. Master,

Unknown 20:45
there definitely needs to be some sort of project management around like this is for quest is not like merge than release, it’s like it’s like address issues merge and then like perhaps do other stuff like like come up with a plan of when release. Yeah, one of the things to do

Unknown 21:05
that. We can release along with this releases is a code map which essentially would change to do all the Find and Replace in projects for them. things like style components another language that I use often when they have a large kind of breaking change, such as this, they’ve released code much that the community really likes

Unknown 21:33
that sounds like more programming and testing it sounds like another product.

Unknown 21:37
I mean, essentially like a script that runs regular expression kind of stuff and and manifesting I’m going to put I’m pretty conventional for this

Unknown 21:51
is that like what what web packs web did for that last version. Is that what you’re talking about.

Unknown 21:58
They might have done I’ve known a few libraries that have used it. It’s like a package from Facebook. That is, it made for this kind of rejecting when they’re expecting changes that are kind of like very able to be done automatically replacing places to just for my clarifications what were the arguments against really seeing their 18 major version with these updates with backwards compatibility with deprecation warnings.

Unknown 22:33
What’s the argument against it is like what like what’s argument for it. Like what problem is it solving like if you have a certain way you want people to use a library, then the earlier you like start teaching them to use it the right way, especially when you have a lot of developers coming on that’s better than being like, hey, well, you can keep using it the old way we’re going to like break it tomorrow,

Unknown 22:56
hopefully when you have like a large number of new people starting to use product culture. It just seems pretty typical for this situation to happen and for there to be the same city these introduced in the same same major version but have things markets separated. I just feel get seen that a lot.

Unknown 23:18
And so we get up. They all of our documentation and examples to recommend using them.

Unknown 23:26
And I think most people would i mean i i would if you said if that was available as opposed to the the deprecating one if that was option. I just want to know. Like why we’re not going that approach that seems like a really typical Pro. Yeah, I think it’s pretty conventional to and I think it might actually be advantageous in a long time to kind of define that as a convention that we do to kind of allow like the community will then be like okay they’re introducing these changes the center, what has been deprecated and I’ll have time to update my app, rather than immediately going to like with an 19 and okay actually made all these changes.

Unknown 24:04
I guess I don’t really know if it would be much different between like 18 point something verses 19 and then also in 19 having a deprecated warning. Yeah, it would be a good idea. Yeah, I’m fine with it if you want to do that. Yeah. And because it also. It also simplifies the release because like that way we can just sort of do like we don’t have to do like a a time girly swear like once we update the app generator like all the tutorials are like either at that point updated or broken right

Unknown 24:42
we can sort of sort of do like a slow roll update all the documentation and then like once the deprecation is placed for some period of time. we’ll just do a 19 release.

Unknown 24:57
Sounds good to me.

Unknown 25:05

Unknown 25:07
So I think that that covered that topic

Unknown 25:13
a couple different ways a couple different times. So rather

Unknown 25:20
One follow on question are we going to have a project around this, just so we track all these different bits instead of just one giant PR with discussion.

I think I think Ken is taking over on on product on capsules. So we’re actually have a hand up meeting this evening. This afternoon, yeah ok ok cool.

So Ken, you’ll take on set up all the issues and stuff. I just want to make sure that since it involves the documentation that the timeliness understand what the timing is

Unknown 25:58
yeah okay

Unknown 26:08
in your things to chat about

— Discussion of cat boxes omitted —

Unknown 29:12
How do we address the one single block for node issue if someone asks me so right now what needs to happen when you get responses. You have to pass in the corner of the API settings so that way your app learns about it that’s already the case like it’s already supported by the author critical, but I don’t think authenticators actually passing in the URL. No, it is it is. And there’s a setting in blocks that browser you could change it.

Unknown 29:45
Oh, cool. So I need attention meta mask too but like yeah no difference is like a booting up a guest node. So like I I’ve tried to do this multiple times where like, I want to run a death node so that I can do some like queries on various Ethereum chain state and like the time from when I download gas to when I would actually be able to run queries and live data is like measured in the order of like weeks. It’s like we can have two weeks or something on like cloud computing like a beefy node

Unknown 30:32
and that’s like sort of unacceptable was like blood like you can run a box that corner like you can have one running on your computer 20 minutes

Unknown 30:44
and like I understand that it’s not the easiest thing in the world to run like it’s gas like I mean like from the perspective of like an experienced developer like you know one I can get running the other one you can no matter how much you can cure to okay your standard is very low, but is it we’re trying to say yes okay I’m gonna On another note. It would be nice to see like some maybe like working with Jeremy a casa to have them ship blocks that coordinates with the pasta nodes of their shipping like that sort of stuff, then they get like like I don’t know way that people could easily run it, or like having nice like Mac or Windows. x enables you could like double click and like turn on your your node.

Unknown 31:38
Yeah. Or like in the like AWS store like we have there’s like an AWS VM for like box that core 13 or something so we we update those that’s also another nice thing I used to run blocks that core 13 to my stuff running yes yeah sucks many reasons for your day.

Unknown 32:09
Okay. Um, this actually is an interesting question. If you want to pursue it further because I mean Aaron and I need to spend some time thinking more about this, but if we start embedding watch that core nodes inside of IoT devices like Casa notes from each have a way to either a canonical way across as a hard fork or we need to start thinking about how the stacks blockchain can allowed forward upgrades by forks

Unknown 32:38
away. Well, I think you don’t want a like a way to enable hard forks, the way hard forks were is you convince people that are running it that whatever you want to hard work to is worth their time and effort to upgrade. I agree immutable.

Unknown 32:52
I now I don’t want to have to do hard for sending more than necessary.

Unknown 32:55
That’s why I feel like maybe at some point we should have a second place about mechanisms that we use to ensure that soft forks are viable upgrade mechanism

Unknown 33:09
is done.

Unknown 33:10
Yeah, I have a few ideas about this, but we planted them in advance up when I generally talk about it in detail here. Unless Unless meeting goes to 45. It says in the calendar because I don’t know

Unknown 33:28
yeah I think like we had the intention of turning these into 45 minute meeting but I don’t know who actually controls the top towel windows of knowledge.

Unknown 33:41
Got it.

— Discussion on transcript production omitted: Decision Chattam house rules and meeting close —

Unknown 43:13
All right.

Unknown 43:15
Happy Wednesday.

Didn’t come up in today’s engineering meeting — but here are our OSS statistics as of today:

Statistics for issues/PRs created since Mon Nov 05 2018 02:57:10 GMT-0600 (Central Standard Time)
Issues PR
open closed no response days to close days to response open closed no response days to close days to response
All creators 58 20 37 2.4 0.5 12 53 33 0 0.6
External only 8 8 5 1.6 0.8 2 7 1 1.1 0.3
Per Repo Statistics
Issues PR
open closed no response days to close days to response open closed no response days to close days to response
blockstack.js 5 0 2 0 3.8 2 1 0 NaN 0.7
External only 2 0 0 0 NaN 1 0 0 0 NaN
blockstack-core 3 1 1 NaN 2.6 2 5 0 0 1.8
External only 1 1 0 NaN NaN 0 0 0 0 0
blockstack.org 8 1 3 NaN 0.1 1 4 5 0.3 0
External only 1 0 1 0 0 0 0 0 0 0
blockstack-browser 12 0 10 0 NaN 2 0 0 0 NaN
External only 1 0 0 0 NaN 1 0 0 0 NaN
blockstack-explorer 1 0 0 0 NaN 0 0 0 0 0
External only 0 0 0 0 0 0 0 0 0 0
blockstack-app-gener 1 0 1 0 0 0 5 2 20.2 19.1
External only 0 0 0 0 0 0 2 0 NaN NaN
blockstack-ios 4 0 3 0 NaN 0 0 0 0 0
External only 2 0 1 0 NaN 0 0 0 0 0
blockstack-android 4 1 1 NaN 10.3 5 0 2 0 6.8
External only 0 0 0 0 0 0 0 0 0 0
app.co 9 5 4 4.8 0.6 0 1 0 NaN NaN
External only 1 0 1 0 0 0 0 0 0 0
docs.blockstack 8 0 6 0 NaN 0 26 21 0 0.6
External only 0 0 0 0 0 0 5 1 0.6 0.6
cli-blockstack 2 4 3 5 5 0 2 0 NaN NaN
External only 0 0 0 0 0 0 0 0 0 0
animal-kingdom 1 8 3 1.7 0.6 0 3 3 0 0
External only 0 7 2 2.2 0.7 0 0 0 0 0

The issues reported by external users which haven’t been responded to are 1 in ios, 1 in blockstack.org, 1 in app.co

1 Like