 So today I'm going to talk a little about that and well actually this is a clickbait. I'm mostly going to be talking about the open badges specification and then at the end a little about how the migration is going on. So, yeah, let's let's start with the specification. So this was this open badge specification was initially developed by Mozilla foundation, and this was done to fuel individual motivation. So people can feel rewarded for doing tasks that they do on their own, and they don't have to feel pressure to follow to pursue with degrees and formal education. So, yeah, Mozilla launched the first version of open badges in 2012 and by 2013 I was already very popular and over 1500 organization issuing open badges. By 2014 Mozilla had launched badge alliance, which was a group of organizations companies that wanted to further develop the open badges specification. This was later handed over to collective shift and collective shift partnered with concept tricks sky to develop open badges 1.0. Sorry, open badges 2.0. The slide is wrong. And yeah, so today, so the application badger is the one is actually developed by concentric sky and Mozilla has also migrated to badger and so is for that are going to migrate to. So, yeah, let's talk about the specs. I'm going to talk a little about the data structures that the badges open badges uses. And yeah, I mean, I won't talk about everything, but hopefully I've kept stuff that is interesting. So, open badges uses Jason LD to to define the structures that are needed to issue a badge. And if you have heard of Jay, you might be familiar with Jason LD because this is something that we use in search engine optimization and most of the search engines except maybe being officially recognized Jason LD as a way to structured data in on the web. So, yeah, so this is quite popular and that's why specification chose this to define open badge specification. So, all you got to do with for Jason to use Jason LD is declare at context and differ give it a link to where the badge, the specification is host test, and then you can use type wherever you want to and refer to all the definitions inside that inside the definition file that you have hosted. So, for example, this is what a assertion would look like with. So, yeah, on top you can see that there's context, give the context link is given and the ID, which is the unique identifier for the assertion. Yeah, all the metadata related to it. You can see that the structure is nested so you can actually nest structures and link Jason LD that's one of the benefits of using Jason LD other than that you can also use other languages. So, yeah, that's it about Jason LD. So, let's talk about a few of the data structures that open badges uses. So, an assertion is it's basically the badge that it's an instance of a badge that you give to someone. So, the fields that are involved that are the ones that are required, and then the rest, they're optional. So the required ones are obviously ID type recipient badge verification verification is something that defines how the badge must verify. There are two types of verification which I'll talk about later, and then issued on is the date time on which the badge was issued. So, yeah, that's it about this I guess. So, yeah, in this you have you might have noticed that there's a expected type of badge class. So that's what we'll talk about next. So a batch class is is the class that you that you'll use to that that basically holds the metadata for the badge itself. And then you the application is supposed to make instances of that batch class and give it out to the recipients that you mentioned. So, in a batch class, the required types required fields are ID type name description image criteria and issuer. I think most of them are sex self explanatory. The criteria is the text for how you achieve the how do you get that badge. And then the issuer is the organization organization that is issuing the batch. So, yeah, and the rest is pretty self explanatory. So next we are we talk about profile so a profile can be either an issuer or the user itself so as I said and issuer is the organization that will give the badge to someone and Yeah, so you got a both of them both issuer and a normal user come from the same data structure which is profile, except that if you're sure you you'll have some extra required fields that you need to have. So, for a normal user you just need to have ID and type and the rest is optional, but for issuer you'll also need to have URL email and name on top of that. Next, let's talk about identity object. So an identity object is it's used to identify recipients. You can identify recipients in many ways. The most common way to do it is to use an email, but you can also use a telephone number or some other kind of unique identifier. So, there's also an option in case that if you you want the recipient to be private, you can hash the hash the text value and instead of putting it in plain text, you can put the hashed and yeah use that as your identity object. So next we have evidence and alignment object so an evidence is an object that that will be linked to to an assertion. So you can Yeah, so you can attach multiple evidence to each assertion and basically let's say you have a batch to batch that for making a website so an evidence might have the link to that website or something like that. And you can obviously have multiple evidences attached to an assertion and alignment object is a property of a batch class. So this is basically for education standards. I'm not sure if that's the correct terminology but yeah, so if you want to do. Let's say, I can't really think of an example should have been, but yeah, I guess you can say let's say a particular batch, batch alliance to saw a speech speaking skill that is approved by a university then you can mention that Next we'll talk. So yeah, we talked about a lot of structures till now but even even if you couldn't if you wanted to add something else other than that, you can use extensions on top of that. So an extension is used to add additional data to badge objects and you can define to use an extension you have to define your own Jason LD and yeah just put it in your ad context and that way you can have your own structure of how you want to define the specification and yeah you can also add validation to this your own extension and you can do that with Jason schema and there's an example of how you do that right here. So yeah this is the overall how it I mean how the whole operation goes. So you have hosts which stores and manages all the assertions badges profiles and everything and then you have displayed applications like badger UI which will display your application display all the badges that you've earned and also sure you can also share them with people. You can also use the display to verify the badges that you've gotten will not you but other people might want to verify that that the badge that you've gotten is legitimate. So you can use the display at itself to verify that and the display will just go to the host and check if that badge is valid and yeah let you know about that. So yeah that's about verification. So one of the things that I was that I found interesting about badges was I saw this YouTube video on how you import a badge to badger and the way you did that was you just dragged the image file and you just clicked or like imported it on the drag and drop it on the application and it was kind of like magic for me because I didn't really understand okay how did it get the metadata. So that you do that with bad baking so you can so the only two types that support bad baking is PNGs and SVGs. So yeah if in case of PNGs you got to insert the as assertion metadata to itxt chunk and in case of SVG you can add the XML open badges attribute with the value of open badges.org and then add the open badges assertion tag with the verify attribute. So the verify attribute will be either the it'll either be the the unique identifier of the badge or the salt not the salt. Yeah I think that's it you cannot use anything other than that. So this is what it would look like in an SVG you can see that you use open badges colon assertion and in the verify field you have to add the unique identifier in which case it's just a URL with ID attached at the end and here is where all our metadata lies. So yeah so so far we were talking about version 2.0 but there's also a version 2.1 which is in the candidate final stage. This basically defines the rest API part of it and it's called badge connect API. So it defines the standard of the rest API that usually that the application should use to be able to have compatibility with other applications. Let's and there are various use cases that are written down here which this version will solve. So let's say a user wants to connect the assertion to a recruiting platform. They can use the the recruiting platform can just use the rest API of badge connect and then import those badges and display it there. So yeah let's so let's talk about badger server so badger server is the back end that badger is using and it's based on Django and Django rest framework. This allows you so yeah it has a very convenient documentation which allows you to see what operations you can do on the server and this in fact is actually a lot of it is I think aligned with the version 2.1 spec. The version 2.1 spec isn't out yet so you can say that but a lot of the endpoints that are already here are aligning with the 2.1. So yeah this is what the UI of badger looks like. So this is the backpack and this is where you keep all the badges that you've earned and you can share them from here or view them. So this is what the detailed view looks like. You can see that this is the issuer which is which is Fedora and this is who it's awarded to. So this is the recipient and another feature that badger offers is to you can have collections which which are basically collection of collections of badges that you can specifically tailor to your choice. So you can share it to someone in the sense let's say you want to have all your web development skills in one collection so you can add it to your resume and share it with your employer employers. And yeah so that's also you can also share it right from there. This is what the collections look like you can you can choose to make it public or private. So yeah let's talk about Fedora badges now. So yeah so this is the outline of what Fedora badges currently looks like. We're using three for as the application and so three so with Fedora badges you automatically get awarded badges with certain rules that are written and usually ideally the admin doesn't ever have to touch the doesn't have to ever award the badges manually. So the way they do that is by using Fed badges so Fed badges is a consumer and a consumer a Fed message consumer and it has rules for various badges that can be awarded to the recipients. So Fedora Fed message is for people who are not familiar with Fedora Fedora it's the it's a hub for where all the events come in and all the events that are performed or various users come in and you can and Fed badges checks exactly all that and yeah based on the rules it will award you badges. There are also you can also do stuff from the admin like from the like CIS admins can also award the badges or revoke badges manually with scripts that are written and then there's Cron services which for some badges which which depend on third party applications you can't you have to use you can't depend on Fed badges and yeah you won't be receiving messages for that so you got to do that with the Cron service. So for the migration to Badger I've worked on several things so one of the important ones is an SDK for communicating with Badger server so we call this Badger client and this is it's a simple SDK that calls the various endpoints of Badger server and the benefit of using that is that you can have clean code and then also separate the well basically it's for clean code let's say that and then yeah so yeah unit test was something that I did for the first time and yeah I finally understood why people hate tests so much but yeah and then on top of that we also I also wrote some scripts to add issue and revoke badges just like we saw in the previous architecture diagram you can do the same with the new Badger application and then for deployment where you're going to use community shift so that's why I've written OpenShift templates for that and also for Badger server I had to write a custom S2I builder which which was really I mean I didn't think it would be that hard I had to try like three four images but yeah it finally worked in the end. We also have FES authentication obviously so you can log in with your Fedora ID and the two major tasks that are left is the migration of data. So this will be fairly easy hopefully because of Badger clients so you just got to read the data from the Postgres database that we have that the read users and call the rest API is according to that and yeah the other task that is left is the migration of Fed badges to Fedora messaging so that's there and we also need to integrate it with Badger client. So yeah this is what the Badger client looks like so you can import the it's a Python packet so you can import it and then provide the password and the client ID and also the scope and each it's a class based API so you'll have classes for various objects that I just talked about in the beginning and you can call the methods like get issuers, get issuer and get badges right here and get the appropriate objects back for it. So one thing that isn't yeah another thing that we haven't that needs to be done right now is leaderboards Fedora I mean Parit does have it also statistics but Badger doesn't have either of those and yeah we need to also work on the leaderboards and statistics part of it so yeah that's it for this session I wasn't really prepared for that so I started a lot but I hope you liked it or I hope you found something interesting and yeah thanks for attending I want to thank my mentors Sian and Michael for guiding me with this migration and also the folks over at Badger because yeah it's a it's a really outstanding application and I learned a lot from just looking at the code of Badger and yeah if you're yeah if you want to check their website it's Badger.io they also provide pro memberships not memberships but yeah subscriptions or whatever and you can yeah yeah go check them out and yeah thanks for attending.