Hello, everyone
George Mulhearn: 8. How's it going?
That's a bad George. How about you?
Bogdan Mircea: And so you you left quite a few comments on, my dear.
Bogdan Mircea: Yeah, yeah, not nothing too bad. There right now. I'm actually really glad that you you were so pedantic, and actually went through a little bit
Bogdan Mircea: from from what I could tell.
Bogdan Mircea: Yeah, I was trying to find
George Mulhearn: more major issues. But I I couldn't really say good job. Oh, well, yeah.
George Mulhearn: hey, Patrick.
Patrik Stas: Hey, George, it's been it's been a while. It's good to have you Have you on the call again. Let's see if a mirror is gonna join. I I I think you would. But i'm not sure. I'll just double thing. I'll just ping him.
Patrik Stas: and then we can start. Perhaps
Patrik Stas: in the meantime.
George Mulhearn: is this is this spot. New.
George Mulhearn: The meeting analytics.
Patrik Stas: Oh, yeah, that's that's something new introduced by Hyper Ledger. Apparently
it's possible to opt out of it. There's some information about what it is in the chat.
Patrik Stas: so I don't know experimentally the last it it started since last meeting, and experimentally I just kept it on. I will see what kind of things this is, what kind of metrics is it going to produce?
Patrik Stas: But I know if we feel uncomfortable because we can turn it off and just have normal
Patrik Stas: meetings without having our voices analyze.
Patrik Stas: It's some sort of a technologies, as I understand, to analyze the like, who you know how the meeting was going. Essentially
Patrik Stas: That makes it.
Miroslav Kovar: Hey, Mira, we have me around the as well.
So let's get started. I'll share my screen
Patrik Stas: so for starter i'll display at this disclaimer. It's per usual hyper ledger policy. The Anti Trust police notice.
Patrik Stas: All right. Let's get into it. So things gonna be interesting. Call today we have, since we have a big changes going on, and both on the Pr.
Patrik Stas: And also some stuff related to serialization. So just a yeah short overview of
Patrik Stas: agenda. Here we this is wrong meeting.
This is
Patrik Stas: this old one. Yeah, this is it?
Patrik Stas: So? Yeah, just as the usual will cover the stuff which we've done, which is going on. We are planning to do and then finish the meeting with the discussion about the serialization approach and sort of philosophy.
Patrik Stas: Yeah, and I I guess that could be interesting discussion here.
So
Patrik Stas: yeah, let's for for starter. We have kind of completely con completed the the Pr. And you, as I understand you did pretty sorry review. So really it's really appreciated.
Patrik Stas: It's a it's a huge Pr: Just for everyone. Anyone else. Perhaps tuning into that call. So we are. We have recently and a previous month or 2 introduced new State machine, like New State Mission for connection protocol, which is, however, not coupled with any sort of mediation.
Patrik Stas: It also the mediation has to be done by the user that consumer of a is V. 6 and themselves.
Patrik Stas: Yeah. And so this is pretty like vanilla connection, doing the minimal amount of things needed to commodate a connection Protocol. And this has been introduced about the month or so ago, and then bog down here
Patrik Stas: to to to initiative, to kind of rewrite it actually, and use a completely new approach as to how we do state machines
Patrik Stas: in there is.
And yeah, it's, it's really great improvement. We have covered, like all details and advantages
Patrik Stas: in a previous call. So feel free to take a look there, if you like, if you are in the details
Patrik Stas: all right.
Patrik Stas: I guess
Patrik Stas: I guess that that that should be enough for a brief introduction of this. Pr: we've done recently.
Patrik Stas: And then yeah, small, small like notice. It's always a a a bright moment when somebody new comes in, and some means. Pr: so we have this small Pr. From roughly
Patrik Stas: it's a fix in Ayles. Some Some method was failing, so this is fixing the issue.
Patrik Stas: No.
Patrik Stas: this is deleted
Patrik Stas: and check the message that left. They opened a new am I? This is this elsewhere? Okay, okay, I see.
Patrik Stas: Is it on different by chance.
Patrik Stas: Maybe there's something.
Patrik Stas: No, it's the same thing, I guess.
Patrik Stas: Yeah.
Patrik Stas: So yeah, Happy to have a a new contributor here.
Patrik Stas: Yeah. And then and the stuff in progress Well, apart from the the State pattern, which is not the marriage, but it's mostly complete.
There's been an interesting Pr. Open from from you.
Patrik Stas: Please.
Patrik Stas: George Charge. Sorry some sort of gave in my mind.
So yeah, I wanted to ask if you can like, Tell us a little bit about it, and how it's going.
George Mulhearn: Yeah.
Patrik Stas: Do you want me to give a quick demo on
George Mulhearn: cool just to just a question on the State patent stuff? What is what is left on that for it to be merged in.
Patrik Stas: I think we we were just like having the final discussions about this serialization format, and that kind of relates to the the end ending of this a meeting, so
Patrik Stas: I think we can leave it for there, but it's pretty much done here. It just like small need picking like, how should this realize?
Patrik Stas: Right? And and yeah, Well, let's let's leave it to the end. So let's do that. You need to find out.
Patrik Stas: or maybe book book done. Do you have anything else in mind other than this?
Bogdan Mircea: No, no, no, that's that's not really it. Once we figure that out. We can.
Bogdan Mircea: Some of my
Patrik Stas: okay.
George Mulhearn: You can see my screen. Okay.
Bogdan Mircea: Yep.
George Mulhearn: Cool.
Patrik Stas: Okay. So so sorry. Just I'll just I'll just. I'll just jump in for for short second, just so short intro about a bubble. This is actually
Patrik Stas: so. So. So this is like a a new approach as to how how to
do as I
Patrik Stas: for a is the 6 right so currently one the existing options for consuming Aries and Ecx. Via as a 5 from different languages
Patrik Stas: for many people, for most people that's like a mobile use cases where they do Java or Ios.
Patrik Stas: and they and they use it. Fight to talk to. That's using the live Vcx portion of the library, which in the long run we would like to deprecate essentially. And instead, we we want to encourage
Patrik Stas: people to to adopt this kind of modern approach of of doing the Fi: so
Patrik Stas: I I guess I guess it's about the invite.
George Mulhearn: Yeah, yeah, exactly.
George Mulhearn: So yeah, yeah, unifies a relatively
George Mulhearn: new tool
George Mulhearn: that lets you create. You know, rappers for cotton, Swift python. And I think javascript soon, hopefully.
George Mulhearn: But it it alleviates like the pain of some of the complexities, and
George Mulhearn: live Vcx. Like having those handle and maps, and using handlers for everything
George Mulhearn: and error, states
George Mulhearn: it. It eliminates a lot of that pain.
George Mulhearn: Yeah. So
George Mulhearn: yeah, I've been just working on a proof of concept just to
George Mulhearn: explain the basics of how it works to you guys, and then
George Mulhearn: I guess we can decide if it's something worth taking further.
George Mulhearn: So I've I've made a a separate create under the Rappers Directory.
George Mulhearn: So
George Mulhearn: how unified works is you create what's called a udl file.
George Mulhearn: and in this Udl file you describe all of the interfaces.
George Mulhearn: interfaces the structs methods that you want to expose, and you know, have wrapped over.
so
George Mulhearn: you can see my Udl file here
George Mulhearn: actually, before I go further into that. So the Udl unify has restrictions on what you can wrap over.
George Mulhearn: So they They're pretty good like. You can wrap over error, types and structs and everything.
George Mulhearn: but they put in certain rules in place such as you can't wrap over Async functions directly. Everything that you wrap over has to be thread, save so they enforce that it's all send in Sync.
George Mulhearn: Yeah. And and so, because of those restrictions, in my opinion, the best approach is usually to
George Mulhearn: create a thin wrapper create, which is what this is here which just thinly wraps over the things that can't be
George Mulhearn: directly interpreted by unify.
George Mulhearn: So that's what you're seeing here.
So, for example, I was
George Mulhearn: working on wrapping over the connection
George Mulhearn: handler the old connection handler, I guess.
George Mulhearn: And yeah, so connection handler, it couldn't be wrapped over directly, because it had a lot of mutations that could go on.
and
George Mulhearn: basically the the approach to solving that is to wrap over it in a in a mutex fashion, so that you can
George Mulhearn: sort of take the lock and then mutate it, and then put it back.
So
George Mulhearn: yeah, here's my thin wrapper over connection. So I've wrapped over some of
George Mulhearn: you know the basic functions that it has.
So
George Mulhearn: this one here is creating a new invider connection.
George Mulhearn: and as I mentioned, you can't wrap over async things directly, so occasionally you'll think you'll see things such as block on, which is just a simple wrapper
to
George Mulhearn: you know, Execute this
George Mulhearn: as a sync function so converting Async to sync.
George Mulhearn: And then, you know, on the Android side or on the Ios side, you'd launch up a a dispatcher. I/O thread or something of that effect.
George Mulhearn: so that it's acting as if it is asing.
George Mulhearn: So yeah it. The general pattern is
George Mulhearn: pretty straightforward. Sorry this create invider.
George Mulhearn: It basically
George Mulhearn: calls on the constructor for connection create invider
Patrik Stas: passing in a handle a passing in a profile which i'll get to next.
Patrik Stas: Yes, yes, of course. So i'm wondering about this. So this is this great invite right? This will be basically this is the function which will then be exposed
Patrik Stas: on the F. A file. This is the Ffi rapper Interface. Right?
George Mulhearn: Yes, Exactly. So this is what
Patrik Stas: and right, right? And so this create. Invite, for example, as you shown the function, it's it's sync, it's it. And and then you are using some sort of blocking.
Patrik Stas: So is it possible that I think you know. Maybe you expand it just now. Maybe I didn't get it. But is it possible to make, create, invite, or a sync? And then I guess you need Fi is
Patrik Stas: having some sort of runtime which which takes, you know, care of executing it. Or do you have to use like always blocking functions?
George Mulhearn: Yeah, I I haven't. I haven't dove too much further into it other than basically blocking the current
George Mulhearn: complete.
George Mulhearn: Yeah, sorry. I can't answer it much further than that.
Patrik Stas: Right?
George Mulhearn: Yeah, this this approach here is actually something I've gotten from Aries Asca. They
George Mulhearn: their python rapper basically calls on to these block functions so that they can call those Async functions, and and they are using this unified approach in Arizona.
George Mulhearn: No, I know they are. No, I've just noticed how they, you know, run Async functions synchronously
George Mulhearn: just by locking the current thread.
Patrik Stas: So they use something like this in the some blocking.
Patrik Stas: Yeah. Yeah. Oh, okay, I see.
Patrik Stas: Yeah, Sorry. I can't answer the question much further than that. Yeah, that's fine. I I was wondering. I think that's gonna be pretty important. I like
Patrik Stas: because because I I I don't think this will be very performant in the current state. For example, if you want to, if you want to like, create
Patrik Stas: 50 invitors, and all of them have to create keys, but each of those calls will be blocking. And, for example, if we call from no jazz, you just have one threat you called 50 times. Then it wouldn't really run in parallel with it.
George Mulhearn: Right? Right?
George Mulhearn: I I guess maybe the thing with that is when you're when you're writing the Android code.
George Mulhearn: That is where you know you can launch up dispatch of threads.
Patrik Stas: Well, right? Hmm.
Patrik Stas: Because for Mobile these would be like sort of like toler tolerable. Maybe that's why they do it on us. Oh, but as Kari as agnostic, it's not necessarily mobile.
Patrik Stas: and I find it surprising that they do this blocking. I find in a bit, Hecky. But yeah, I I don't know that there there the case in Arizascar. But I think it will be
Patrik Stas: apart from how great it looks. You know, this this thing so far, I think the the figure around the using would be like my big, big
Patrik Stas: improvement, or like import and sort of
Patrik Stas: Oh.
Patrik Stas: yeah, enhancements in yeah, in the future.
George Mulhearn: Yeah, yeah, for sure.
George Mulhearn: So so yeah, so that you can see his 2 basic constructors for a connection here
George Mulhearn: where all I'm doing basically is wrapping the original Aries, Vcx connection handler
George Mulhearn: into my own connection, which is unifiable.
George Mulhearn: It's safe for unify. And then you can see here, I've just implemented a couple of the methods which connection has so a simple one and a synchronous one
George Mulhearn: get state. All that has to do is
George Mulhearn: get the handle from the look which I'm storing it in.
George Mulhearn: and then, you know, cool. Get state on it.
George Mulhearn: I'm also doing a translation of state.
just because that email wasn't
George Mulhearn: wasn't unifying immediately.
George Mulhearn: Yeah. So I guess you can. You can sort of see the the basic pattern that's happening here.
George Mulhearn: How you can write these thin rappers over
George Mulhearn: the Aries Vcx objects so structs
to create a unified safe one.
Patrik Stas: And then.
Patrik Stas: yeah, yeah, Sorry I i'll. I'll i'll let you speak. I have the questions, I guess, but i'll i'll I'll I'll I'll just leave you to speak for you. So yeah. So 2 constructors and then all the
George Mulhearn: class methods. And then you can see here we got
George Mulhearn: the 2 constructors which create this connection struct.
George Mulhearn: And then you define in your udl file all of the methods that the connection has. So get state
pay, wise info.
George Mulhearn: and then etc.
George Mulhearn: So yeah, that's what it looks like
George Mulhearn: in the video
George Mulhearn: and how it's represented.
George Mulhearn: Hey? Yeah, I'm: Sorry. What was your question?
Yeah, I was wondering about.
Patrik Stas: Let let's go, for example, to the connection how how we create connections, the the viper code so
Patrik Stas: create, invite, or returns. Some be UN, if a result and breaths are and reps connection. And yeah, and and then from from unifi, you can they? They have some sort of infrastructure which lets you generate the
Patrik Stas: like
Patrik Stas: a code for different languages.
George Mulhearn: Yeah, yeah.
George Mulhearn: yeah. Do you want to see that now?
Patrik Stas: Yeah, maybe we can take a look at it. I what i'm actually interested in where i'm where i'm like aiming towards is I'm. I'm wondering how the memory kind of works like, if you, for example, create connection here.
Patrik Stas: Oh.
Patrik Stas: I like, how is it free? Like? Do you have to.
Patrik Stas: I I guess that's like
Patrik Stas: specific. I I guess there will be different per different languages like
Patrik Stas: It's gonna be. Do you think it's gonna be garbage collector in the language which eventually we all free that connection, I suppose.
Patrik Stas: I suppose that will be the case.
Patrik Stas: That's kind of how it works in the Vcx. Actually. But I wonder how the memory model and the you know allocations and freeing works with the Unifi.
George Mulhearn: Yeah, yeah, it's
George Mulhearn: good question.
George Mulhearn: I'm not sure off the top of my head. So you so you're wondering if.
George Mulhearn: when a connection is garbage collected in an Android application.
George Mulhearn: does it call on to. You know the drop method
Patrik Stas: of the corresponding connection. Yeah, I guess something like that. I I I suppose that it's gonna probably work somewhat like this because you work because in rascal you don't know how long that connection you return here is going to exist, and
Patrik Stas: who's gonna work with it in jail, for example, right?
Patrik Stas: A person can keep it for a long time, so Rascal Doesn't know when to drop it. So I guess it then must become the Java responsibility responsibility to somehow freed
Patrik Stas: this this collection instance.
Bogdan Mircea: I think that makes sense. Essentially.
Bogdan Mircea: Once something. Once the memory crosses the unified boundary.
Bogdan Mircea: I assume that the
Bogdan Mircea: let's say host, language will
Bogdan Mircea: to be responsible for taking care of the memory.
Bogdan Mircea: whereas if you were to create a string in one of these functions, and then it gets dropped at the end of the function.
Bogdan Mircea: That's basically
Bogdan Mircea: the the library's responsibility.
Bogdan Mircea: When it gets compiled.
Bogdan Mircea: the free
Bogdan Mircea: is where the drop is called implicitly.
Bogdan Mircea: were introduced implicitly by the compiler.
Bogdan Mircea: because on the Vcx.
Bogdan Mircea: Oh.
Bogdan Mircea: you're essentially just
Bogdan Mircea: reading a hook
Bogdan Mircea: in the garbage collector to free some parts of the connection map.
Bogdan Mircea: but it wouldn't necessarily have to be like that.
Bogdan Mircea: If you, for instance.
Bogdan Mircea: I mean I don't know exactly how they'll work with javascript and all that. But if we were to
Bogdan Mircea: sort of, I believe that George is doing here in between the connection
Bogdan Mircea: to be removed from the map of the attorney.
Bogdan Mircea: Then
Bogdan Mircea: it it crosses the by boundary, and it's
Bogdan Mircea: implicitly by the right time.
Bogdan Mircea: No, just.
Bogdan Mircea: I just don't know exactly how that mapping would be would be done between the actual structure like the rust type
Bogdan Mircea: and the
Bogdan Mircea: and javascript.
Bogdan Mircea: But yeah.
George Mulhearn: I I think I just worked out a clue on that which I'll I'll get to in a second when I show you the android code.
George Mulhearn: Yeah, yeah. So
basically how it works to generate your bindings is
George Mulhearn: they have this cli tool code unified by and Gen.
George Mulhearn: And you know you specify what language rapid you want.
George Mulhearn: And then you pointed at the audio.
and then
George Mulhearn: that will basically
George Mulhearn: spit out
George Mulhearn: in this case a Colin file
George Mulhearn: which has, you know, those those classes for connection and for the profile holder and all of that stuff
George Mulhearn: along with a bunch of
George Mulhearn: very confusing and bulletp.
George Mulhearn: And and then, of course, you know, similar process to live. Vcx. You have to build this for the appropriate target binary.
George Mulhearn: So in in my case I've just been
building it
George Mulhearn: quite simply, just for the 64 android.
George Mulhearn: This is just stealing scripts from Live Vcx.
George Mulhearn: Then you know that that builds out into you into your binary
George Mulhearn: any questions before I show some android stuff
Bogdan Mircea: not from my side.
Patrik Stas: I'm good as Well.
Patrik Stas: no one can go ahead
George Mulhearn: cool. So yeah, once once you have that generated bindings file and your binary.
George Mulhearn: In this case i'm just dragging into a very simple project
George Mulhearn: to demonstrate how it works, but I imagine you could also pack it up into your AI file, or.
George Mulhearn: however, with Vcx is distributed. I'm not actually too sure
George Mulhearn: about the distribution process.
George Mulhearn: The what what does that distribution process look like in the Vcx for?
George Mulhearn: Android
Patrik Stas: for Android? Well.
Patrik Stas: you know honestly, I I don't remember the details of the it's it's called. You find the pipeline there's a bunch of scripts, you know, building the the library and linking the other libraries
Patrik Stas: together. Then.
Patrik Stas: I guess, in bills.
Patrik Stas: I don't know some, some. What is it? Some what? What are those android archives in? Here? Is it arc a. A. Are
Patrik Stas: something like that, some sort of archive which
Patrik Stas: the the job of rep reason binded to something like that. I guess.
George Mulhearn: Yeah, yeah, cool. Okay? Well, yeah, you could essentially do the same thing where
George Mulhearn: you're packaging up the generated bindings. And then all of your architectures as your J. And I loops.
George Mulhearn: Yeah, cool. So so in this fragment it's just sort of demonstrating what the calls into the binding look like. So
George Mulhearn: take, for example, this button. Here create wallet and profile.
George Mulhearn: What it's doing, is it's calling on to my new Indie profile method which actually forgot to show.
But all that's doing is
George Mulhearn: blocking and creating and opening a wallet and then creating a profile
George Mulhearn: and then wrapping it in a unified, safe manner.
George Mulhearn: So yeah, so that function here maps directly to
George Mulhearn: this one here, and
George Mulhearn: you can see, unifies also
George Mulhearn: turned it into camel case.
George Mulhearn: which it does per language depending on what the language standard is. It's pretty nice.
George Mulhearn: So yeah, so you can see I'm.
George Mulhearn: I've also wrapped over the wallet config struct which I was able to do directly without you know, wrapping it in my own wallet. Config
George Mulhearn: So this is wrapping directly over it, and you can see, unifies
George Mulhearn: generated out this data class with all of the same methods, all the same as the original one.
Patrik Stas: I also have like option, right with the question, Mark, I suppose i'm someone who the Java Syntax.
George Mulhearn: Yeah, yeah, exactly
Patrik Stas: since I
Patrik Stas: I see.
Patrik Stas: And for example, this world, config you you you. You know how many times you kind of define it somewhere. Is it only the in the Udl file, or did you also have to?
Patrik Stas: It? Is it only in you the office, and that links directly to the vault config in a is Vcx, or that you have to like, declare your own kind of what config in the you need 5 wrapper.
George Mulhearn: Yeah. So this one is directly wrapping over the Aires Vcx wallet. Config
Patrik Stas: the the cases like with connection. And you you you need to create your the the thinver right?
George Mulhearn: Yeah, Exactly. So so you can see all of the things that i'm just directly using, and then exposing
George Mulhearn: while it config unifies, able to wrap over that directly.
George Mulhearn: and these ones as well, I believe.
George Mulhearn: So. So yeah, yeah, Well, it config and pass it in. And then I'm.
George Mulhearn: You know.
George Mulhearn: globally storing this profile in this fragment.
And
George Mulhearn: yeah. So so this is what I was talking about before. How it it can be. The applications responsibility to, you know, call these blocking things within its own thread
within an I/O thread.
George Mulhearn: And so that way, how way, I guess you theoretically could you know.
George Mulhearn: fire off? 20 opens at once
George Mulhearn: all different wallets.
George Mulhearn: Yeah. And so this other button here create connection maps to this one.
George Mulhearn: So yeah, this is where i'm calling on that create invider method
George Mulhearn: that I was showing before. And so yeah, that's that constructor for
George Mulhearn: this connection.
which again.
George Mulhearn: is that a. Vcx. Generated one.
George Mulhearn: and then again clearly storing that, and then the lost button.
Patrik Stas: And then, once you have this connection, you create a new connection. Then you can call methods on that object itself, right? I suppose.
George Mulhearn: Yeah, Exactly. So. So this next button here is show state.
George Mulhearn: It's basically showing how you can call methods on it. So
George Mulhearn: connection pair, wise info, returns
George Mulhearn: the pair, wise infer struct which has, you know, Vw: that did, and Pw. Dover Key
George Mulhearn: and that stuff.
George Mulhearn: So see if I can get it to work.
George Mulhearn: So yeah, that button creates and opens the wallet so that you know, initialized
George Mulhearn: that sqlite database, whatever database it was on the device and created the profile. So now
George Mulhearn: this profile is instantiated and ready to be used by this button create connection.
So
George Mulhearn: yeah, as I said, create connection, all it did was use the create, invite a method
George Mulhearn: and then show State, I guess, is probably the most interesting, so you can see by the toast. It's printing out what the State was, which was initial.
George Mulhearn: and then the pairwise info.
George Mulhearn: I see it was able to get all of that data
George Mulhearn: out of the pairwise info, which which means that the the connection
George Mulhearn: when you created, invite a
George Mulhearn: did successfully generate, you know that did. And
within the connection
Patrik Stas: And yeah, I have gone as far to
George Mulhearn: try, mock out an app with, you know, accepting an invite. And
George Mulhearn: yeah, going through the whole connection state, because that'd turn into a pretty significant fragment just for a demo, I guess.
George Mulhearn: Yeah, Any any questions on that?
Bogdan Mircea: I don't know if it's that much of a question. But I do have
Bogdan Mircea: to the wild idea in terms of Async.
Bogdan Mircea: So from from what I can gather, the problem with
Bogdan Mircea: like you unify has this problem with wrapping
Bogdan Mircea: teachers
Bogdan Mircea: right
Bogdan Mircea: and crossing them over the if I boundary.
Bogdan Mircea: because then they have to be executed in some way, just hasting front time, and
Bogdan Mircea: with, and so on, and
Bogdan Mircea: 8
Bogdan Mircea: didn't we
Patrik Stas: Can you try to place your Mike a little bit closer.
Bogdan Mircea: Yeah, I think, My.
Bogdan Mircea: I don't know why my audio always gets messed up
Patrik Stas: every single
Bogdan Mircea: Okay, there we go
Bogdan Mircea: better. Okay, yeah, I was using my laptops microphone for some reason, anyway.
Bogdan Mircea: Yeah. So I was saying that
Bogdan Mircea: the problem is with sending features through the F 5 boundary, because they have to be executed in some languages native as Inc. Event. Look right.
Bogdan Mircea: and what you're doing is you're emulating like you're kind of forcing the Async
functions to
Bogdan Mircea: to be sync by blocking the runtime on each of them.
Bogdan Mircea: What if
Bogdan Mircea: here's a while I the wild idea! What if
Bogdan Mircea: you would actually spawn the the tasks asynchronously.
Bogdan Mircea: and then
Bogdan Mircea: store the join handles and some sort of a hash map or something.
Bogdan Mircea: and in a separate thread. You could pull these
Bogdan Mircea: handles and just
Bogdan Mircea: manually progress the
Bogdan Mircea: the futures like that. And then you could basically just retrieve
Bogdan Mircea: the
the result when
Bogdan Mircea: when the the poll is ready, and send it to some different part of your code. It would be a completely different way of doing things, but this would sort of allow you to do asynchronous stuff
Bogdan Mircea: like you could have just a background thread that only looks in that hash map and just takes everything
Bogdan Mircea: and
Bogdan Mircea: just pulls it constantly. It's doing that all the time.
Bogdan Mircea: And then I know through some identifier. You would know what you put in there, so you know where to send it.
Bogdan Mircea: Does it make any sense?
George Mulhearn: Yeah. Yeah. Yeah, yeah.
George Mulhearn: yeah, yeah, that that that could work
Patrik Stas: sounds like quite like menu manual approach. But I guess maybe I I guess that could be the way. But that's I. I think that's assuming that the unify. If I you you need a 5,000 sort of support
Patrik Stas: I think, natively like. I would imagine that there is easier way to do it, and maybe I I I don't know how how like how deep you do. You need a fire, judge? But
Patrik Stas: perhaps there is a way you can declare as a asing methods and then unify. You need, if I somehow handling it for you like.
Patrik Stas: Yeah. So I don't know how you have it if it works. But, for example, with the the Ni Ni n Api rs the
Patrik Stas: the appro, the Ffi approach to use for no Gs. The the An Api Rs comes with a a runtime, a like a Tokyo, and which is invisible for you. And you just declare this thing methods. And then in javascript, right? So
Patrik Stas: okay, sorry. Yeah. So so I would just expect that something like that should be hopefully possible. You would you need if a fire as well?
Bogdan Mircea: Yeah. But I think that the key difference here is that you need. Ffi is trying to support multiple languages, whereas
Bogdan Mircea: not the Rs is only for node
Bogdan Mircea: like it's targeted, and they it's easier for them to know
Bogdan Mircea: or to to map the internals of rust features to promises in javascript.
Bogdan Mircea: because they they only have one job, whereas you know, if you, if you have unified or you need fi has to be sort of
Bogdan Mircea: transparent about that.
Bogdan Mircea: I don't. I don't say it's not possible I don't know if it's done or not. It's the first time I see this this kind of stuff. So.
Bogdan Mircea: but it's definitely
Bogdan Mircea: more complicated
Bogdan Mircea: then, and not Prs.
Bogdan Mircea: What what do you? What do you know about the
Bogdan Mircea: like, the Async functionalities of unified George like is that supported at all? Or.
George Mulhearn: yeah, I I I don't believe it is.
George Mulhearn: I I don't know, maybe maybe naively. But I I don't really see the problem with doing it this way.
George Mulhearn: Yeah, maybe maybe if you guys could explain more. But this is essentially using Android's
George Mulhearn: thread pull to launch off a thread.
George Mulhearn: and, you know.
George Mulhearn: run this function, which is technically Async, but as being
George Mulhearn: run blocking. But it's blocking this dispatch of thread.
George Mulhearn: So you know, then the threading is in the hands of the Android code, which
George Mulhearn: I think is a a better approach than
George Mulhearn: an Android
George Mulhearn: application, calling into a binary a rust binary that fires off its own threads.
Bogdan Mircea: Well.
Bogdan Mircea: the the thing with that is
Bogdan Mircea: essentially an agent will do a lot of I/O right? So it's going to wait for messages.
We're wait on
Bogdan Mircea: confirmations for sending messages.
Bogdan Mircea: so it
Bogdan Mircea: it's gonna be
Bogdan Mircea: like that's the benefit of the entire Async
Bogdan Mircea: methodology that you have these green threads, which are much more lightweight than
operating system threads.
Bogdan Mircea: And
Bogdan Mircea: even though the the context switching is not as expensive, and you as a user. Are in control of
Bogdan Mircea: that. Whereas when you're using threads, you're sort of at the mercy of the operating system.
Bogdan Mircea: Now what i'm curious about
Bogdan Mircea: again. I don't know any any cotton or Java to this level. So you're dispatching the thread.
Bogdan Mircea: But the Tokyo runtime that you're we're using in rust. Also.
Bogdan Mircea: basically we'll just block
Bogdan Mircea: while executing the
Bogdan Mircea: asynchronous function in a thread.
George Mulhearn: Yeah, yeah, exactly. So I'm: I'm launching a an android thread using, You know, the native Android Thread pool management, and then I block that thread
George Mulhearn: in in rust. I'm blocking that dispatch of thread
here
George Mulhearn: so, and if I will
George Mulhearn: through this. Then it's gonna launch 4 different threads, and each one of them are gonna get blocked separately.
Bogdan Mircea: Well, that's the thing.
Bogdan Mircea: Did you? Did you actually test that because the runtime like when you're blocking the runtime in Tokyo, you are blocking the entire runtime
Bogdan Mircea: right? Right? Right? Right? I I I could be wrong. But I I believe that's basically the whole point
Bogdan Mircea: like that's that's the whole point of of blocking it on what you could do instead.
Bogdan Mircea: But again, that sort of implies
Bogdan Mircea: there was some, some you can basically
Bogdan Mircea: issue a.
Bogdan Mircea: Yeah, I don't know, even if you, if you spawn
Bogdan Mircea: a blocking task that's still sort of executing in a different thread, and you have You get a joint handle and you have to retrieve the value.
Bogdan Mircea: But yeah, right now, I I believe that what's actually happened is that you You spawn all these 4 threads and you dispatch them in the Android app. But
Bogdan Mircea: the underlying runtime is gets blocked on each of them.
Bogdan Mircea: and that they do not run independently.
George Mulhearn: Right? Yeah, I I see what you mean.
Hmm.
Bogdan Mircea: I mean, I guess what you would have to do
Bogdan Mircea: to like you, could you? I'm not even sure if you need the runtime to that extent. You could just create a future and do a while, and just call the poll method on it until you get ready
Bogdan Mircea: right.
Bogdan Mircea: And that would essentially
Bogdan Mircea: like creating a mini runtime for each of each of the of the futures
Bogdan Mircea: I don't know. But honestly, I think like, if you want the most efficient way to go about, it would be sort of that.
like letting the Tokyo runtime do its thing spawning tasks, and then just going through the tasks
Bogdan Mircea: and retrieving the values as they're done in the background threads
George Mulhearn: right? Yeah.
Bogdan Mircea: I don't know again. I I could be wrong. I don't. I don't know for sure.
Bogdan Mircea: But I you can go around with it and test this block on thing.
Bogdan Mircea: Do you create a new runtime, or is it just created once? I believe it was lazily created once?
George Mulhearn: Yeah, it was, yeah, you're right. So it would.
Bogdan Mircea: Yeah. Yeah. Yeah. Yeah, Good Point: Good Point.
Bogdan Mircea: Yeah. Now, the thing with I don't think you can create multiple runtimes, either.
Bogdan Mircea: Not yeah.
Bogdan Mircea: yeah.
Bogdan Mircea: Maybe actually.
Bogdan Mircea: I don't know about current thread run times. So you can create a runtime in Tokyo like with just a single thread a single threaded on time. And maybe if you create
Bogdan Mircea: that kind of a runtime every time you
Bogdan Mircea: you call this block on function.
Bogdan Mircea: maybe that would
Bogdan Mircea: work
Bogdan Mircea: like it would be fairly easier to implement.
Bogdan Mircea: But
Bogdan Mircea: yeah, and then you could actually get like
Bogdan Mircea: one thread one run time, and you can dispatch them, and they would actually run a parallel like this.
George Mulhearn: Yes, yeah.
George Mulhearn: yeah, yeah, it's interesting.
George Mulhearn: Yeah, I guess I guess it needs more thought about the the Async method handling.
Bogdan Mircea: Yeah, I mean, ultimately, I think Patrick is right. I probably at some point. If they don't already, or they don't have it planned. Even
Bogdan Mircea: they're probably going to support it because it's a it's a big thing.
Bogdan Mircea: and that would be that would be really really cool.
George Mulhearn: Yeah, yeah, i'll need to have a browse through the community discussion. I'm sure they will have talked about it a lot.
But yeah.
Patrik Stas: I mean other than that. It really looks cool. So it's it's awesome. I I apart from other than the Async. I guess the the that, I think, is the only thing in like, only
Patrik Stas: the at a tribute or part where where Libya 6 it's current state. This unlike, has advantage. But I mean, this is amazing, as you can generate all the rappers for all, for what I you mentioned number of languages right, Java Ios python.
Patrik Stas: So that's that's pretty cool. I mean there's lots of code we currently have to maintain. If you want to make it changes to a would be 6 like if a. By interface. And there's like 3 other places we need to update things. So this this is amazing that you can. We can do this all just do it once and have it everywhere.
George Mulhearn: Yeah, yeah, it's pretty pretty cool. I was gonna show you this as well. So all the all the structs, all the impulse, have a destroy method attached to them, and I guess I I Haven't seen this before, but
George Mulhearn: this looks like it's doing the the freeing of the reference counter, which
George Mulhearn: in turn would.
George Mulhearn: I guess, free of the memory in rust and drop it.
Bogdan Mircea: So maybe this is something.
Bogdan Mircea: Yeah, it looks like it's simulating what the arc is doing
Bogdan Mircea: because it has the internal reference counter
Bogdan Mircea: and assume that once that reach 0, it actually frees
Bogdan Mircea: the memory.
George Mulhearn: Yeah.
Bogdan Mircea: is this all reference counter?
Bogdan Mircea: But i'm actually that was maybe a different question. You mentioned the beginning something about the
Bogdan Mircea: like when crossing the Ffi boundaries. That types must be sent in sync. And you're wrapping the connection. I believe in an arc.
Bogdan Mircea: I don't know if I remember correctly.
George Mulhearn: Yeah, yeah, they they force you to, I guess, pass structs through as if they are
George Mulhearn: so. For example, this constructor in the udl. It says, you know there's no arc around it, but unify
George Mulhearn: what unified does as well is it generates out.
George Mulhearn: I guess
George Mulhearn: it generates out rus code which is exposed in your binary.
That
George Mulhearn: is what the the the
George Mulhearn: yeah is what the rapper Colin interface ends up calling on to. So
George Mulhearn: that generated Rus code enforces that. You know these things are wrapped in ox.
which is why
George Mulhearn: you can see, i'm having to return them as a
Bogdan Mircea: not for still.
Bogdan Mircea: Okay, I mean, I guess it makes sense that if you want to interface with the
Bogdan Mircea: the language that uses reference counting
Bogdan Mircea: probably be the way to do it.
Bogdan Mircea: What i'm also curious about is how they handle mutability, though.
Bogdan Mircea: like.
Bogdan Mircea: Okay.
George Mulhearn: Yeah. So that that's why I've had to wrap it in this mutex.
Bogdan Mircea: And then I can.
George Mulhearn: These functions get the Mutex and then mutate it and then store it again.
Bogdan Mircea: I see.
Bogdan Mircea: Okay.
George Mulhearn: for example, this year.
Bogdan Mircea: Yeah. So you basically have to enforce that in your rust codes
Bogdan Mircea: so that
Bogdan Mircea: nothing crashes when you cross the by boundary.
George Mulhearn: Yeah, exactly. Yeah.
Bogdan Mircea: Fair enough.
George Mulhearn: yeah. Yeah. And the other cool part as well is that it does a pretty good job of
George Mulhearn: wrapping your errors as well, so you can see
George Mulhearn: I've created this very basic
George Mulhearn: error type, and it supports this error.
George Mulhearn: And then in Udl that's exposed as
George Mulhearn: this here
George Mulhearn: and then methods which return a result mocked as as throwable.
George Mulhearn: and then in the generated code
George Mulhearn: you can see it's generated out the exception classes.
George Mulhearn: so it'll
George Mulhearn: throw and pass through these different exception types.
George Mulhearn: Into
George Mulhearn: this Scotland code. You can pass through messages as well to give more details, etc.
Bogdan Mircea: Cool.
Bogdan Mircea: Yeah, I've seen your as part. That's actually really cool. They didn't map them
Bogdan Mircea: fairly well.
George Mulhearn: Hmm.
Bogdan Mircea: Really interesting.
George Mulhearn: Cool. That's all I had to show
Patrik Stas: awesome. Thank you, George. I was really well prepared, and I mean the the the code is nice, and you even started the application the only a all over the expectations for this demo. I didn't thought we actually gonna see like working android, and we'll emulate the demo. So it's really well done.
George Mulhearn: Yeah. Well, you never know if it's working until you put it in a map, you know.
Patrik Stas: Yeah, that's right.
Yeah. But I guess let's let's move on to the like next part. And I guess just
Patrik Stas: the end meeting discussion about the the State machine. But state pattern and serialization. And but before we dig into it, I would like to just ask you if you are okay, going a little bit over the you know the official
meeting minutes. Let's say if we stretch it out to 10 min, 10 or 15 min extra. Are you? Are you guys? Okay? With that
Bogdan Mircea: it's cool for me.
Patrik Stas: Yeah, yeah, Cool for me. Yeah, I I feel like we need more than 10 min for this. So just so we we we get it. We get that
Patrik Stas: kind of cleared up ahead of time. So yeah.
Patrik Stas: now, yeah, where to start? I'm not sure. I guess i'll just like brief intra, although you are aware of what's going on
Patrik Stas: for the sake of the meeting and the recording.
Patrik Stas: there was a so there! There's a discussion about serialization, and and it's approach and philosophy. So the way this whole thing started mainly is by making this new board, you know, implementing the new approach with the type, state connections
and by book done.
Patrik Stas: And and I saw this as a portrait to
Patrik Stas: fix inefficiencies or like weaknesses in the serialization
Patrik Stas: format we currently have.
Patrik Stas: And I thought, oh, we can now do a bunch of other. Since we are making breaking change on this connection, Steve machine, we can introduce a bunch of other breaking changes
at at this opportunity, and we can
Patrik Stas: come up with a new, better format.
Patrik Stas: And then this also relates to this this, this this thought. They're also triggered by by issue with George created few days last week
Patrik Stas: about about using from parts and 2 parts methods which are defined on medieval connections, but not on others. And apparently George found this concerned useful. And
Patrik Stas: here, in these issues being suggested that we adopt the same sort of methods or pattern for the other State machines as well. Now, then.
Patrik Stas: then, this kind of took us to some of the discussions we had until now internally with Bogdan and me about the actual philosophy of serialization, where
Patrik Stas: where
Patrik Stas: we're thinking whether the format
Patrik Stas: should be simply, it's completely up to the consumers, and it should be just internal, you know, internal matter of as DC. And and and therefore we should actually be quite clear about the fact that you should not rely on what the serialized
Patrik Stas: State mission looks like.
Patrik Stas: This format can change, and it's not meant for sort of direct consumption.
Patrik Stas: So that's kind of the intro. No. So maybe we can start. Since since George, you created this issue. In the first place, maybe you can give some, you know.
Patrik Stas: background or like, kick off the discussion about what you are trying to do, and then
Patrik Stas: we can take it from there.
George Mulhearn: Yeah, yeah, sure. Thanks. So
George Mulhearn: yeah, I was. I was working with the connection handler, at least in its old state and recently in the type State version.
George Mulhearn: And
George Mulhearn: basically it seems at the moment that the only way that you can, you know.
George Mulhearn: take a Area's Vcx connection.
George Mulhearn: and then turn it into something that you can store in your own database or something of that effect.
George Mulhearn: and then later fetch it from your database and reconstruct it into that Aries Vcx connection. The only way to do that at the moment is by using serializer methods.
George Mulhearn: That. And that's because there's no way to, I guess Manually construct the connection handler with data that you have yourself.
George Mulhearn: And so I guess
George Mulhearn: the problem I have with that being the only way to do it is.
George Mulhearn: I guess, the state of the connection handler being serialized and be serialized isn't
George Mulhearn: extremely stable, at least at the moment. So I guess
George Mulhearn: there's no guarantee that if I were to serialize a connection now and then store that string in my database. And then.
George Mulhearn: you know, 2 years later on, on a newer version of Vcx. Try to
George Mulhearn: deserialize that
George Mulhearn: back into the connection, handler. There's no guarantee that it would
George Mulhearn: be successful.
George Mulhearn: Yeah. And and so because there's not that guarantee. And also just because, in my opinion, it's best practice to store data in your own format rather than
George Mulhearn: relying on a a third parties serialization
George Mulhearn: method.
George Mulhearn: at least from a Vcx consumer standpoint
George Mulhearn: it. It'd be better if there was a way to construct up the connection handler using.
George Mulhearn: you know, raw data using your invitation message and your did, Doc, You know those are
George Mulhearn: di primitives, in a sense.
George Mulhearn: So yeah, that's why I was proposing that the from parts handle the the front parts method of connection should be
George Mulhearn: a a a public Api.
Patrik Stas: So basically. You like, yeah, I I I get it like if you have, if you have did do. And if you have some key par pairwise keys
Patrik Stas: for the big talk
Patrik Stas: that's actually that that represents some sort of did come communication channel. And you want to create the connection object from the connection handler from that.
George Mulhearn: Yeah, yeah. Exactly. So I I guess if you imagine your consumer of the Vcx.
George Mulhearn: you
George Mulhearn: you're an invite. I say, you're an invider, and you generate the invitation and send it out.
George Mulhearn: Now you'd want to take that connection, handler and
George Mulhearn: turn it into your own bits of data. So you know you'd still your did dock, your pay, wise keys, the invitation you generate, you'd
George Mulhearn: take that and store it away in your own database, and then.
George Mulhearn: when you get the request message back from the P that you're connecting with.
George Mulhearn: Then you can, you know, fetch it from your database, and
George Mulhearn: you know, Take that. Did Doc. That invitation method
George Mulhearn: message and turn it back into the connection handle that you had originally. And then you can, you know.
George Mulhearn: Dot, accept, request, or whatever the method is to take the next step.
George Mulhearn: and then you can store it away again. Bring it back.
George Mulhearn: Yeah, that that's the idea rather than relying on serialization
Patrik Stas: book Done? What? What's your take? And the response
stuff
Bogdan Mircea: I mean
Bogdan Mircea: so
Bogdan Mircea: honestly. The the selling point that George had in one of his comments was about the fact that.
Bogdan Mircea: regardless of what you do.
Bogdan Mircea: people will still be able to manipulate the connection in its serialized state.
Bogdan Mircea: and then modify that. Let's say it's adjacent string, and then serialize it back to a different state.
Bogdan Mircea: But my take honestly would be that
Bogdan Mircea: this is, in my view, sort of looking for trouble like arbitrarily modifying a connection which is part like a connection state as part of a protocol which should be followed. Let's say strictly.
Bogdan Mircea: and then deconstructing that and constructing it back is not something that I would personally do or advice doing in terms of
Bogdan Mircea: like the stability of the of the serialized format. I think that even when we let's say, let's say we merge this type, state connection, and a year from now we change the serialization format. We could accommodate
the deserialization to
try both the old and the new format, so that
Bogdan Mircea: we can sort of ensure backwards compatibility in that regard. It wouldn't be too difficult and more costly, and then ultimately, the old format would get deprecated at some point.
Bogdan Mircea: And
Bogdan Mircea: yeah, I mean like, if it weren't for the possibility of someone modifying the serialized format.
Bogdan Mircea: I would honestly be against
these
Bogdan Mircea: public methods of from parts and into parts. I think
Bogdan Mircea: that the protocol
Bogdan Mircea: should be followed strictly without shortcuts, or
Bogdan Mircea: I don't know alternatives like this.
Bogdan Mircea: But
Bogdan Mircea: I guess the other reason
Bogdan Mircea: might be that
Bogdan Mircea: I don't know if you want to. If you want to migrate from a different agent implementation which might store things differently, and you ultimately end up having the same parts, so
Bogdan Mircea: you could just take those parts and then migrate to the the as B. Cx implementation.
Bogdan Mircea: So that would be, I guess one good use case. I don't think it would happen too often, but still
Bogdan Mircea: and mirror. I have an idea about these.
Bogdan Mircea: Let's say, let's hold them. These raw methods
Bogdan Mircea: to be behind a a feature flag or something like that, so that they wouldn't necessarily be directly accessible, and people would be
Bogdan Mircea: Let's say, to use them with caution.
Bogdan Mircea: Hmm.
Bogdan Mircea: Yeah, I mean, I guess like that's the way I I would do it. I would implement them behind the feature flag.
Bogdan Mircea: And
Bogdan Mircea: yeah advice people to use them if they really really really need to.
Bogdan Mircea: And I guess it's also in the in the view of
Bogdan Mircea: kind of helping them not mess things up because
Bogdan Mircea: you can theoretically do it right now
Bogdan Mircea: with the current implementation of the types they connection. Like. Even without these methods, you can serialize into something, build the replica like how the replica of the
Bogdan Mircea: connection and the serialize into that, and then take the take that split that apart into parts
Bogdan Mircea: and smaller pieces, and then store them, or whatever
Patrik Stas: I I i'll just point out, I guess, like on George's point about like relying. You know, the 2 years down the road relying on the format of
Patrik Stas: the Vcx.
Patrik Stas: Like. If you're gonna.
Patrik Stas: I guess if you're gonna like dissect connection in this kind of fashion like you basically take connection and you generate
Patrik Stas: like, I know there's few things right there to some some connection state. And third, Id and some Paradise info.
maybe something else
Patrik Stas: in in some way. You're still relying, I guess, on the way
Patrik Stas: that you know. How is this serializing?
Patrik Stas: But
Patrik Stas: you know what I mean like. I guess the the the risk kind of which you
Patrik Stas: very afraid of. I guess it's still there, because
Patrik Stas: 2 years later, this 2 years later, this must still serialize into the same thing
Patrik Stas: as it is as it is today.
George Mulhearn: Yeah, yeah, I see a point. So I guess on that.
George Mulhearn: I I've been playing around with the the type State branch where I've made the
George Mulhearn: from Pots method public. Just so I could test a few things
George Mulhearn: when the from Pots method is public. You're able to basically reconstruct connections with
George Mulhearn: the base data. So it did dock invitation, message, request, message, etc. Thread Id
So
George Mulhearn: I I guess what I would consider best practice is if a. V. 6 consumer is storing that data themselves and in whatever format they wish, and then they can.
George Mulhearn: you know, construct the invitation method, message and threat. Id
George Mulhearn: and then plug that into the from Pods method.
George Mulhearn: Yeah. So they don't have to rely on any
George Mulhearn: Vcx Specific serialization formats
Bogdan Mircea: well. The format is not necessarily
Bogdan Mircea: setting stone. It's the
Bogdan Mircea: I guess the realization method that's set in stone.
Bogdan Mircea: The format could be Jason or Ben Code, or anything you want
Bogdan Mircea: Right? Right?
Patrik Stas: The the the idea I like we had discussions with with, and the the idea, and I tend to I I
Patrik Stas: i'm i'm rather convinced. Now
Patrik Stas: this is following the philosophy. I guess I guess there's like actually like 2 issues here, and i'm gonna use draw. I because I love diagrams and visual visualizing ideas. So
Patrik Stas: let's say you have a connection, some sort of connection object.
Patrik Stas: whether it's the old handler or the like. The new type state connection. And and then, I guess, like one thing is what George wants right is like having this some sort of Api which enables you to dissect the connection into multiple things. So, like some state data, and
Patrik Stas: the dog maybe, and
Patrik Stas: I don't know.
Patrik Stas: and then and then, like the
Patrik Stas: and the approach with like serialize. So this will be from parts, from 2
Patrik Stas: arts. That's like one thing. And so questions like, do. Should we have the, or should we not have it.
Patrik Stas: And then, or should it be behind feature flight, and then the other like issue or question discussion. Point is about the serialize, the serialize
Patrik Stas: which we currently have, and I think we we gonna keep it.
Patrik Stas: because I mean the removing. It will be like really a huge change
Patrik Stas: for everyone. So the current approach
Patrik Stas: I like with them
Patrik Stas: what's on the main branch right now is yeah, that we generally the Syria, like serialize
Patrik Stas: into some sort of Jason.
So this is data, and there's like the State and like invite her blah, blah, blah, blah, blah!
Patrik Stas: I may be paralyzing for
Patrik Stas: otherwise insult.
Patrik Stas: and it's like generally the key.
Patrik Stas: and it's like.
Patrik Stas: generally speaking.
Patrik Stas: like easy to look at and bars, and
Patrik Stas: and
Patrik Stas: it's easy to make me well.
Patrik Stas: It's easy for people currently
Patrik Stas: to fall into pattern where they actually start relying on this in this structure of the serialized data and the the philosophy, the idea bog done was proposed, like main proponent of, and and, as I mentioned, I tend to agree
Patrik Stas: with with his suggestion now is that we should make it like. We completely go back
Patrik Stas: to the to the user so the user shouldn't by any meet, any
Patrik Stas: chance, you know, attempt to rely on what this Jason looks like, and instead, he should just consider it the black box like oh.
Patrik Stas: it's some sort of string, you know, or some sort of binary format or whatever.
Patrik Stas: So so that's the kind of yeah 2, I guess 2 2 issues here. That does this make sense, George and Logan is this: do you think? Is this re clearly representing the discussion we are heading
Bogdan Mircea: in? The
Patrik Stas: Yeah.
Patrik Stas: Okay. And so, then, then the the question is.
Patrik Stas: then the question is, should we
Patrik Stas: given the like new approach, and maybe the new philosophy where we want to.
Patrik Stas: as it's booked on said settings to the serialized and the serialized methods as a contract like, or if you use, if you serialize something, we will give you a guarantee that you'll be able to dissurilize it. But but
Patrik Stas: consider the serialized data as a black box.
Given this approach.
Patrik Stas: and this like kind of contract or promise here.
Patrik Stas: Do you think, George, you would like still need or want this? This, this approach, or I mean ideally, there will be like one canonical way of doing things, and it will do less code to maintain. But, on the other hand, I don't know. Maybe
Patrik Stas: it is something we really want to have, because we can. We can still consider it.
George Mulhearn: Yeah, I I guess. Yeah, I get what you mean by the If you have a guarantee, then it could solve the problem. I I don't know. It is still my opinion that it's generally best practice to
George Mulhearn: store
George Mulhearn: data in in your own format
George Mulhearn: rather than rely on a third party format
George Mulhearn: from a consumer point of view.
George Mulhearn: Yeah. But I guess if you guys disagree that that's okay.
George Mulhearn: But yeah, I I think i'll be skating. This serialization format is a is a good idea.
George Mulhearn: Stops people from trying to replicate the connection and then change the data manually themselves.
Bogdan Mircea: Yeah, I think in the end, like
Bogdan Mircea: I assume that's the main goal of the protocol.
Bogdan Mircea: and especially the
Bogdan Mircea: I just
Bogdan Mircea: 5 state
Bogdan Mircea: pattern approach of having things run in a strict way, so to say, so that
Bogdan Mircea: you don't end up making mistakes
Bogdan Mircea: and
Bogdan Mircea: giving people more access to
Bogdan Mircea: stuff that they can break
might not necessarily be a good idea.
Bogdan Mircea: I I honestly don't know I mean I i'm not trying to say that
Bogdan Mircea: I know we shouldn't do it, or that it's a bad idea.
Bogdan Mircea: I just think that there is a very narrow use case for stuff like this, and it can still be done
if you really need to.
Indeed. You have to like. Build your replicas and stuff like that.
Bogdan Mircea: I don't know, and replicas can up being out of sync
Bogdan Mircea: like I don't know if the serialization format changes.
Bogdan Mircea: But I guess this is also the reason why we wouldn't necessarily advice to use this kind of approach.
Bogdan Mircea: Because, yeah, then things will break or might break.
Patrik Stas: How about about this? How about
Patrik Stas: How about the state machines? You know the the the state machines, or these handlers, or these objects
Patrik Stas: they wouldn't necessarily. They wouldn't actually be serializable. We wouldn't declare, you know, serial, that serializable on it. We wouldn't derive it
Patrik Stas: What we instead. Would do. If we have this, we have this kind of pair of methods
Patrik Stas: which would produce, you know, number of
Patrik Stas: building blocks, some components of the connections
Patrik Stas: of the connection which are serializable. So everything returned here. Each of these parts.
as we speak.
would be serializable.
Patrik Stas: and it it wouldn't be
Patrik Stas: at all a concern of how to. You know serialize things.
Patrik Stas: I'll. I'll do see, relax connection, and and it now, when I come to think about it, it's it's very opinionated that you know we do it to string, and it's in it's Jason, like Why should it be hard? Coded in a. Is V. 6? On the other hand, we we want to
Patrik Stas: keep the maintain the Liberty 6 contract, so we we don't want to like, Go completely like crazy, and make something completely new, and we want to preserve the interfaces. So, instead
Patrik Stas: instead of having this in
a
Patrik Stas: let me do some swim lines here.
Patrik Stas: let me do like this is
Bogdan Mircea: i'm going to understand that we don't enforce any serialization format in as Vcx
Bogdan Mircea: implementing the serialized trade only allows the serialize them to anything
Bogdan Mircea: they don't have to be Jason.
Patrik Stas: Oh, yeah, that that's right. That's that's true. But yeah.
Patrik Stas: Well, where I was heading. Well, maybe I'm: I'm: i'm wrong. But i'll just finish my original idea kind of. Maybe it's it's like technically slight, slightly wrong, or you can correct it or it right only. But the idea it was that the the kind of main interface would be like. Oh, you can. You can dissect this this
Patrik Stas: State machines into some like
Patrik Stas: reasonable chunks of
Patrik Stas: things which belong together like state data, or maybe the dog or paradise in full, maybe like, yeah.
Patrik Stas: right? Id just some things you typically want to, maybe
Patrik Stas: like, have a separate or access
Patrik Stas: frequently, or kind of deal with it
Patrik Stas: individually.
Patrik Stas: And then yeah. And then this would basically accommodate, like George Need, or people who want to just structure, and
Patrik Stas: this will be like generic enough for any. And they want to like implement any kind of serialization and and organize the data in a way they they desire. And then in a lib cx
Patrik Stas: to the back different color it there's a
Patrik Stas: it's an in in live Vcx: basically that's where we would implement the the sort of
Patrik Stas: that. Take these things together.
Patrik Stas: I know how to draw it, but, like
Patrik Stas: pick some arrow
Patrik Stas: like, put it put it together again. We would use the same sort of methods, maybe.
Patrik Stas: and we would like wire it up together again. And basically
Patrik Stas: yeah, some some connection. We would then serialize into our like opaque string, as you know, following the loop Pcx kind of
Patrik Stas: ideal, like philosophy.
Patrik Stas: And so this way. This would cover both George's case, and we could still do the same things the same way we do them even preserve the same serialization format we have currently, perhaps.
George Mulhearn: Yeah, yeah, see, I see what you mean.
George Mulhearn: Yeah, I I I guess maybe
George Mulhearn: I don't. I'm not sure if it solves a bog. D's main issue
George Mulhearn: with
George Mulhearn: consume is being able to
George Mulhearn: put the connection handler into a strange state
George Mulhearn: by, you know.
George Mulhearn: using from parts with some invalid
Patrik Stas: I I I think, like, I mean.
Patrik Stas: like, if they
Patrik Stas: Oh, like, yeah, I guess it's like
Patrik Stas: granular, a kind of granular access, and you can mess it up. But like.
Patrik Stas: yeah, I guess like 0 responsibility of consumer not to like mean coming like 2 different connections together or something. And yeah, so you can always. There's always ways to mess it up somehow
Patrik Stas: in a database, or
Patrik Stas: I I I wouldn't be personally particularly like concerned about consumers
Patrik Stas: messing up the data, and and if they do like it's it's their problem. It's it's granular. Api. People have it. It gives everyone like lots of power
Patrik Stas: and great power comes a great responsibility.
Patrik Stas: What do you think will be done?
George Mulhearn: Yeah, no, I I I that opinion as well.
George Mulhearn: It is a bit philosophical whether
George Mulhearn: you give users control over things, and they can shoot themselves in the foot, or whether
George Mulhearn: you restrict it and ensure that they
George Mulhearn: don't make mistakes, but
George Mulhearn: sort of take away some of the
George Mulhearn: the freedom that how the users might need.
George Mulhearn: Yeah.
George Mulhearn: not not too sure.
Bogdan Mircea: I don't know. I mean
Bogdan Mircea: Again, from my point of view, we can implement the methods. I wouldn't necessarily
Bogdan Mircea: take away the serialization, industrialization from the connection itself, I think honestly, that's going to be the main way people are going to use it.
and
Bogdan Mircea: if if I don't know there is any need to decompose and recompose the connection, we can just implement the from parts and into parts methods.
Bogdan Mircea: And then, if people really want, they can store these in a different format or whatever.
George Mulhearn: Hmm.
Bogdan Mircea: Yeah. I mean, I I was. I already like when the meeting started. I was sort of already decided that we can implement this
Bogdan Mircea: for the few use cases when people want to do things differently, or
Bogdan Mircea: I don't know.
Bogdan Mircea: Yeah, just have more more control over the the State machine, I guess, with the State machine data.
Bogdan Mircea: Yeah, I guess like the the thing that I would
Bogdan Mircea: like the thing that I would be against would be people relying on the serialized format.
Bogdan Mircea: So yeah, this is your main concern, right? I think that should always be sort of like a black box and a black box is a is a wrong term.
Bogdan Mircea: It's completely visible, but it's just that we do not. We shouldn't guarantee that things will stay the same in that regard, at least not right now. Maybe in the future, when things are really stable, and we.
Bogdan Mircea: I don't.
Bogdan Mircea: decide together that there's absolutely nothing else we can we can do to the connection State machine. Let's say.
Bogdan Mircea: Then, yeah, we can tell people. Yeah, this is going to be the stable format from now on.
Bogdan Mircea: because the protocol is completely implemented. It's
Bogdan Mircea: running smoothly. It has everything we wanted to have.
Bogdan Mircea: and that's it.
Bogdan Mircea: Right now I think there's still room for improvement. So that's why I would keep. And I would be reserved about making
Bogdan Mircea: such a promise.
George Mulhearn: Yeah, yeah.
Patrik Stas: George, You, I guess you are okay with that, because you are not even using. And you do this
Patrik Stas: serialization yourself, right? So this is not really something of concern. You concerns you too much.
George Mulhearn: Yeah. Yeah.
Bogdan Mircea: yeah, I guess. But it's not about sorry jurors. That's not about the that's about the
Bogdan Mircea: The connection should still be serializable in the serializable without any issue.
Patrik Stas: So you
Bogdan Mircea: right? Yeah.
Patrik Stas: And I forget about this.
Patrik Stas: Okay. So we are back where we started. But it was a good exercise.
George Mulhearn: Yeah. So so going off what you're saying.
George Mulhearn: I guess
George Mulhearn: Aries Vcx is not a 100% ready to make
George Mulhearn: a promise that
George Mulhearn: a serialized connection. Now
George Mulhearn: we'll be able to deserialize. And
George Mulhearn: 2 years time in in the long term future.
Bogdan Mircea: Yeah, I mean not. Not that we can make that promise. What we can from is that
Bogdan Mircea: that if you serialize a connection today and you serialize it again in 2 years, that the 2 strings will be the same, provided that the connection is exactly the same. I think that's the promise we can, whether you can. This your life from both the old and the new string we can definitely accommodate that.
George Mulhearn: Yes, but you you'd need
George Mulhearn: potentially like some migration
George Mulhearn: when you deserialize it, I guess.
Bogdan Mircea: Yeah, you can. You can do an attempt to be serialize, and not to the new format, which should be the default, I guess. And then, if that fails, you can just right to this realized to the old format, and then transpose that to the
Bogdan Mircea: current connection State machine.
Bogdan Mircea: It's it wouldn't be too difficult.
Bogdan Mircea: Then it would be completely transparent to users. They wouldn't have to do any sort of shenanigans, too.
Bogdan Mircea: to to continue using that.
George Mulhearn: Yes, yeah, I see. I see.
Patrik Stas: Okay. So what about what about from and 2 parts bog done. I, as I understood you are.
Patrik Stas: Yeah, I'm. On board.
Bogdan Mircea: I'm on board.
Patrik Stas: As I said, I think that people can
Bogdan Mircea: like, regardless of what we're going to do, they They could Still.
Bogdan Mircea: I know metal with that. So we might as well make it a bit more consistent.
George Mulhearn: Yeah, I think I agree with hiding it behind a feature flag at least might be a good idea.
George Mulhearn: because then they really the opt in and say they know what they're doing
Bogdan Mircea: exactly. Yeah, I think I think it should be
sort of of an advanced feature for people that really need it and really know what they're doing.
Bogdan Mircea: and especially like if you take the I know the scenario of migrating from a different
Bogdan Mircea: as agent implementation.
Bogdan Mircea: You're probably gonna do that. You know.
Bogdan Mircea: It's going to be a one time thing, right? So you could convert your
your connections, maybe in a separate program. Store them back and then
Bogdan Mircea: fire up the Paris Vcx agent or the Us. Vcx. Based agent.
Bogdan Mircea: and just use it without doing anything in terms of that.
George Mulhearn: Yeah.
Bogdan Mircea: cool, so that you wouldn't even need the the feature flag in your in your main agents. That's what I mean. You could just do it separately as a one time thing.
George Mulhearn: Yes, yes, yes, Gotcha.
Patrik Stas: cool.
George Mulhearn: and in terms of what this means for how it would be implemented.
George Mulhearn: I found that
George Mulhearn: all you really need is the the From parts method. To get this to work
George Mulhearn: because you can reconstruct that.
George Mulhearn: You know the requested State struct and all those structs
Bogdan Mircea: right, and you need the into ports method so that you can deconstruct it as well.
George Mulhearn: right. But but you can do that already with the the methods that are provided on that connection, like you know, dot there. Did, Doc
George Mulhearn: all those methods?
Bogdan Mircea: Yeah, but I don't think you can. I don't think you you have the state available.
Bogdan Mircea: and I have to look into it a bit.
George Mulhearn: I see what you mean. Yeah.
Bogdan Mircea: yeah. So you you cannot get the the actual state. Let's say the what's called the fat state that actually has the data in it. You can get a thin state of from a generic connection
Bogdan Mircea: for runtime matching. But you don't get the data inside the state.
Bogdan Mircea: So yeah, we can just implement an an additional method from parts and into parts. I mean, that's it.
George Mulhearn: Yeah, Cool: yeah, the the from parts method you have at the moment, which is
George Mulhearn: pub, Crate.
Bogdan Mircea: Yeah, I I'll just make it public.
Bogdan Mircea: Yeah, yeah, if not, at least from my used case. That's that's all I needed
George Mulhearn: to get things to work.
George Mulhearn: But maybe there should be other 2 parts methods, if
Bogdan Mircea: yeah, essentially, i'm thinking again about the state. So the States cannot be constructed, I believe.
Bogdan Mircea: Oh, you can. Actually.
Bogdan Mircea: you can construct the State.
Bogdan Mircea: Yeah, yeah, they're all public. The States.
Bogdan Mircea: Yeah, okay. So you can. You can construct the State, they will have the new method
Bogdan Mircea: so given that you can construct your state, pass it to from parts of method of a connection. And then
Bogdan Mircea: there you go.
George Mulhearn: Yeah, yeah, and all the constructors for your for your State objects. They sort of take in the the main
George Mulhearn: primitive, like the invitation message and the threat Id and they did duck. It's very like
Bogdan Mircea: right.
George Mulhearn: which is, which is great
Bogdan Mircea: Cool?
Bogdan Mircea: Yes, so I guess this settles it. Then.
Patrik Stas: Yeah, I think I think we good. So
Patrik Stas: yeah, it was a. It was a good discussion. It was a long call. I think it was. It was worth it. It was a good one.
Patrik Stas: Yeah. And we we covered everything all this on the agenda. So
Patrik Stas: thank you guys again for
Patrik Stas: helping on on here, and even staying overboard. Oh, oh.
and it's almost 25 min later.
Patrik Stas: So yeah, thank you. So much. And enjoy your weekend, which is coming soon.
Patrik Stas: and i'll see you next week.
George Mulhearn: Cool. Thank you. You, too. Yeah, thanks for the
Bogdan Mircea: to my place.
Bogdan Mircea: Have a good one, Bye bye.
George Mulhearn: Do zo.