OK. So hi, everybody. My name is Julien Fortin. I'm a French software engineer, and I work for Cumulus Networks. I work on, if I'm down to, a Python project that we have streamed last fall. And I'm the new Debian maintainer of this project. So the goal of this talk is to introduce you to the project if you don't already know about it. And to give you an update on the progress we've made since the last release in October. So the outline of the talk. So I'm going to give you a little bit of a background of who we are, and that sets the context of why we developed if up down to. I'm going to tell you what's the problem with if up down and give you a general overview of the capability of if up down to, what we added since last October, a few words about where we're going, and how to contribute. And I will answer some questions. So a little bit more about me. I'm not a networking engineer. I'm not a networking specialist. I'm a software engineer interested into operating system development. I did my undergrad internship at Cumulus Networks in 2014. And after that, I took a few networking classes. Now I was hired four months ago by Cumulus Networks, and I joined the if up down to team. And I will graduate sometimes these four. So the ones who already know about if up down to may know Rupa, she is the author of if up down to. So the project started in late 2014. And the first commit was about 2,000 lines of Python. And as of yesterday night, we had 618 commits for about 18,000 lines of Python. So what is Cumulus? Cumulus is a software company. We designed Cumulus Linux, a Debian-based Linux distribution for networking switches. Our latest version, Cumulus 3.0, is based on Debian Jessie.  You can write your own app or install your own app just like you would do in Debian or use standard Linux tools. Cumulus is also contributing back to the community. We upstreamed a lot of patches. Kernel patches mostly related to networking. So we try, for example, to add more support to a netlink when it comes to configuring network interfaces. Or we also contribute to some user space packages like STP. So you may know about if-up-down. So it's the default network manager for Debian. You can configure your network in a static file, ATC network interfaces. And the networking faces are represented by iFace sections. So what is wrong about it? So first, it's written in C. So it's really hard to maintain or to extend. Second, if-up-down doesn't understand interface dependencies, the complexity increase with a large number of interfaces. If you have a large number of interfaces in your file, you have to keep it order so that the dependencies are respected. And so let's say you have 52 switch ports, 2,000 VLANs, 100,000 bridges, and a few more 1,000 VXLANs. You can do it by hand. I mean, good luck, yeah. Good luck doing it by hand. And if-up-down doesn't have support for incremental changes on life configuration, you have to bring down the interface, make a modification, and bring it up again. There's also a lack of tools to query and validate the running configuration. So it's super hard to troubleshoot your network. So our solution is a backward-compatible re-implementation of if-up-down in Python. With a pluggable architecture with Python add-on modules, you can add your own support or extend the if-up-down to-behavior to support your own protocol. We also generate a graph of all the interfaces to resolve dependencies and handle the relationship between them. We also added a few capability to add support to incremental changes and query life configurations. I'm going to give you examples in the following slides. So how does it works? We have a core containing the parser, a graph generator, and some other things. Then the interfaces are scheduled in order. And the add-on takes care of the configuration of each specific attributes. In this case, you can see a small example with a bridge. On the right, you see the iface object inside if-up-down too. And then you see which add-ons takes care of what. And so each module is able to tell what are their dependencies. And then we build this graph of all the interfaces, and we schedule them in order. So here you have an example of a small topology with a bridge on top with three bridge ports, so three VLANs. So we sort this graph, and it gives us this list of interfaces to schedule in order. So we also have built-in device supports. So I have done two implicitly recognize VLAN and physical interfaces that appear as dependents. And so we do the minimal requirements to bring them up, even if you don't specify them in your configuration. So here, for example, in your interface file, there's no need to specify SWP 1, 2, 3, 4. Or even the VLANs. This is another example. I hope you can see it. Now showing the capability that we added to IF query. So we added an option to let you query the dependencies of a specific interface. And you can see the results in plain text, JSON format, or dot format. IF query is now able to check the running state of the interfaces and to tell you if everything is OK or not. So in this example, I wrote the configuration from the previous side into the ETC network interfaces file. And then I executed IF reload, which is a new command that we added. I'm going to talk about it a little bit after. And then you can use IF query dash dash check to validate, to check the validation of your applied state against the user configuration. Yeah, you can see here that there's some failures because of the address attribute. Yeah, just don't ask me why. Another practical use case of the new IF query is the running option. So you can create a live topology using, for example, IP route 2. So here I create a bound and a bridge. And then you can use IF query to see the live configuration of these interfaces. And then you can cut the result of IF query to your ETC network file. So I have done two works on already up or down interfaces. We query the running state of the interface and we only apply the difference between the user configuration and the running configuration. So let's say you have a bridge with two ports and you want to add a new port. You can just run EF up on your bridge and it will add it automatically. So here is the example. So at the beginning I have a bridge. If I run IF query check on the bridge, it will tell me that it failed because the bridge is not up yet. Then I do IF up, then check again, everything passes. Then I remove one of the bridge ports with IP route 2 and run check again so it fails. It tells me what is wrong. But if I do IF up again, it will apply the delta between the user configuration and the running configuration and add the missing bridge ports. Can you remove stuff as well? Yes, you can remove, add, modify, whatever you want. So IF reload is a new command that we introduced. So basically it runs IF down on all the interfaces you removed from your configuration and it will run IF up on the interfaces that you changed from your configuration. So it's pretty convenient rather than using service networking restart for example. We also added support for JSON format for input and output commands. So you can provide a configuration written in JSON. So this is super good for automation and orchestration tools. Templating. Or IF I have done two commands, support micro-style templates. So the goal was to reduce the size of the configuration file which is easily can get to several thousand lines. So here's a quick example how to create 100 bridges in a few lines. So here is the list of the various add-ons that we currently have within IF updown 2 package. So what's new since October 2015? So we've added support for VLAN filtering in IF updown 2. Two new add-ons. VXLAN, VRF. We increased performances with Netlink and we introduced a policy manager which lets you... Yeah. So Ed, earlier question about the general architecture. You are using IP and VRCTL commands to configure stuff? Yes. Both. In the beginning we started by a full use of Linux commands but now we are moving towards a full Netlink back-end to increase performances. I'm going to talk about it in a later slide. So the new bridge driver. So the Linux channel now supports VLAN-aware bridges also called VLAN filtering mode. And IF updown 2 supports both traditional and the bridge VLAN-aware mode. So it helps with scale and... Yeah, it's cool. So I have an example here. So here's a quick example of how you would configure in both the traditional model and the new VLAN-aware mode for 200 VLANs. VXLAN. So VXLAN is a networking overlay. It encapsulates layer 2 frames into layer 3 UDP packets. It kind of solves the VLAN limits where you can only have 4,000 VLANs. Now you can have 16 million VXLANs. I have an example here of a small topology with the configuration that you would use in IF updown 2 to configure it. So very light. Practical. VRF. So virtual routing and forwarding is an IP technology that provides traffic isolation at layer 3 for routing. It was developed by Cumulus Networks and upstream inside Linux. It's now available in kernel 4.3 and higher. So this is a small example of how you would configure a VRF called Red with two slaves, SWP1 and SWP2, sharing a forwarding table ID 10.01. So if you specify VRF table auto, IF updown 2 will pick an unavailable table ID for you. So the new policy infrastructure lets our users define default values for add-ons. It also lets the users define values to override system default. And set specific behavior for each add-ons. So right now, most of the add-ons supports it. We are working on moving all of them complying to this new policy infrastructure and it was written by Sam Tellus from Cumulus. And have a small example of the policy file. So it's written in JSON. So you can specify that the default empty empty you will always be 1,500 if you don't specify it. Bridges tp will always be on, et cetera, et cetera. So when it comes to performances, I would say so far so good. IF updown 2 scales, scales okay, but we think we can do better. So for example right now, I would say that it takes about 3 to 2 to 3 minutes to configure 1,000 bridges, 1,000 VLAN, and 1,000 VXLAN. Something like that, yeah, 3 minutes. So what costs us time is to execute IP and subcommands. So we really believe that the net link is the answer. And so net link is an IPC mechanism mainly for kernel and user space communication. For example, IPro2 uses net link. But we want to move out from the use of IPro2 and have a pure net link backend in the case that our user don't use a kernel that have all the capabilities that we're looking for, we'll use IPro2 commands for some cases. For the net link work, we are using an in-house Python library written by Daniel, Daniel Walton. So it's called Python NL Manager. So it's not yet on Debian. It should be soon. So right now we are including the sources within IF-Updown 2. I hope you can see that. So this is an example of like a random topology. On your left there's the IF-Updown configuration. And on the right, the IF-Updown 2 configuration for the same topology. And we are not even using templates here. So thanks to our sponsor, IF-Updown 2 is available on Debian Seed and JC Backport since October 2015. So we pushed a few minor fixes. But we plan to do a more major release before the freeze. I'm going to talk about it after. So you can download the sources and build the dev or just add the seed repository to your source list. So what's next? So we plan on releasing a version 2.0 before the code freeze in December. It should really increase performances. And there are some features that we might add. But we have to talk about it internally. It's not 100% decided yet. And we keep fixing bugs reported by the community and the Cumulus clients. So how to get started with us? So IF-Updown 2 is available on GitHub as well as the documentation even though we need to update it. IF-Updown 2 ships by default as the default networking manager since Cumulus Linux 2.1. And you can get in touch with me or Rupa. That's her emails. And I want to take a second to show you an example of contribution. So this contribution was made three weeks ago. It was about 200 lines of code. And it adds support for Batman which is a layer 2 protocol for mesh networking. I didn't know about it before. That's pretty cool. And finally I want to conclude with some numbers. So 1.5 million plus switch ports are powered by Cumulus Linux. All of them use IF-Updown 2 to be up or down basically. And this tool is used in production by more than 400 companies all over the world. If you have questions, thank you so much for your attention. Hello. I would like more information about the vague slants implementation on the configuration you thought. Can you put the slide back please? This one? No, this one. So are you using some... You have overlay but is there anything in the configuration to communicate about the states of vague slant between two switches or do you have a controller in this configuration? Or is it... I'm not super familiar with the implementation details within Linux but IF-Updown 2 just configured... Just static vague slants. There's no controller or anything. You can do it without a controller, yes. And you can do it with a controller? But I'm not 100% sure on that. And how is it compatible with the bridge error mode? Because last time I checked it was a bit difficult to mix the bridge error mode and the vague slant setups. Has that changed or...? In IF-Updown 2 you mean? Or in Cumulus Linux in general. I would have to double check on that but I don't think that there should be an issue. We are trying to make the configuration very easy for our users especially since Cumulus 3.0. So we're introducing a lot of new things to let you do it more easily. But yeah, I'm not 100% sure. First of all, thanks for your great work because lots of things you described is basically what I, as previous maintainer of IF-Updown, always wanted to do and never found enough time to implement that. Actually I also wanted to pause IF-Updown 2 or some scripted language though it was something else than Python. Anyways, I wanted to tell you a couple of things I noticed. First of all, let me start from the end, from the last slide. You mentioned you've got this Python ML Manager package almost prepared and I noticed you have actually uploaded it to your private Dev&Package repository. Just one thing, please always publish the source packages you use to generate Devs because otherwise I could have just downloaded it and uploaded it to Debian in like five minutes. I see there's only a Dev file there and no sources for it and otherwise I could have sponsored it during the talk. Did you see? Yes, I did see. Okay, one more thing. You mentioned that you're going to have some discussions within the company about some certain features. Could you please also not do a discussion only within your company but basically ages ago I have created a mailing list for IF-Updown related discussions which nobody used ever, including me because I was the only person maintaining it so I had basically no one to discuss things with. But now when there's a certain group of people interested in this technology related I think it would be really great if you personally and as a company could coordinate with the current maintainer of IF-Updown which is a good sleeping, I'm not sure how it's pronounced but I think so because he's really actively developing IF-Updown now and there are certain features which are obviously not revolutionary as in your product but still I think it would be cool if you could coordinate so that features don't get implemented differently. Okay, sure. I will come to you after and you will give me the email of the mailing list and I'll make sure we talk. Thanks again for your work. You're welcome. So the question is what do we plan to do next with IF-Updown too if we want to replace IF-Updown or WhatsApp. So to answer your question I would say that the original goal was maybe to replace IF-Updown but now it's not anymore because there is all the system D, network D thing but our use case requires a scriptable and templatable network manager where you can plug your own add-ons so that's why we did it basically. I think our goal is just to keep adding features and let it available as an option for everybody but we'll keep using it as the main, as the default network manager in Cumulus Linux but we probably don't want to replace IF-Updown anymore because IF-Updown is dying and it's going to be replaced by system D, network D and everything else. I'm not entirely sure that there's a wide agreement about that. I asked a question during the system D talk about system D, network D and it's not clear that it's going to be, well, what are the plans for it? Yeah, the thing is this is Python and there is no Python in the Debian Essential on the Milimau build so this is a problem. Yeah, so Piero said, OK. Python would have to be promoted to Essential or something like that in Debian which I would be very happy to do but that probably will not happen so that's the main reason probably why IF-Updown too could not be in the default. But if ever, yeah, Python is in Debian Essential, we would maybe become the default networking manager. Yeah, I also planned to put in, when I mentioned I planned to put in IF-Updown to some script language but I made some resistance from some people because, well, basically there were not many options regarding the script language and most of ideas I had were really opposed to because like, OK, you're not going to include one more script language into the base system just because you want to use it, just stick with it and that's it. Yeah, so yeah, I guess we'll see. Another question I had about the general strategy was do you see it as a free software project with a real open development model? Kind of secos what you asked earlier. Or do you see it as an internal project from Cumulus that happens to be released as free software? Or do you grade it? So the license is GPR V2. I think it will, as long as this is not in Debian Essential, I think Cumulus will be the main contributor but we will accept any external help. How many external contributors do you have? As far as I know there's this one, the Batman thing, I'm not aware about anything else but it's because the project was only upstreamed in October and I would say we need to make some improvements on maybe the documentation and the add-on modules maybe a little bit and the version is eight months old or something like that and the internal version is much more advanced. So that's what we plan to upstream before... So you have an internal version that is in public? So we upstream most of the commits a few... Do you have the upstream? I don't understand why you... We pushed on GitHub most of the commits on the master branch We have a Debian prep branch which is for Debian but this one is like a few months behind because the tool internally is made for Cumulus Linux so we have to make some changes and backport it to Debian There's not a lot of work to do it's just that we don't have that much cycle to spend on that We need to fix bugs for customers and stuff like that so I would say the upstream work comes after The internal repository isn't it published as well? No, it's a Cumulus Linux private... a Cumulus Linux network repository but most of the code is on the master branch on GitHub Is there some support for a network new space? Not yet But that's one of the features that we are thinking about So actually I had another question Mostly technical one You said that you plan to use to port it to Netlink for performance reasons but still to use IPv2 when the kernel doesn't have all the capabilities but I understood that IPv2 adjusts the client side that uses Netlink for everything So I guess I'm wrong So can you give an example of capabilities that... I don't have an example in mind but just in case that the kernel you might use maybe it will be 3 or 4.0 something and the newest version will be 4.08, 9 or 5 someday So if of them two we'll try to keep up with the kernel API but if you're using an old kernel I get your question I would say just in case and we also want to let the user the choice Netlink or IPv2 That's also one reason No more question? How do you find... I'm switching context to the Debian Derivative thing that you have in Cumulus So how do you find Debian interaction or do you have any notes or comments about being a Debian Derivative or how could Debian help your derivative? So yeah, we are Debian based but we also contribute a lot back to the community We upstream most of the kernel packages that we are doing Otherwise I'm not really aware of specific comments on Cumulus Linux I think our customer like it The Debian community is fine with us as long as we upstream what we do Yeah, I don't know So we have a really great relationship as you see Yeah, I would say yes Why not? Any more questions? Is there any progress in Python 3 port? No Maybe sometime next year It's mostly because Cumulus Linux ships with Python 2 So if Cumulus Linux would switch to Python 3 we would work on that That somehow concerns me a little bit because in Debian there are plans to switch to Python 3 and also with the private repository thing which is a little bit like the Witterbox story which you have in public not really Witterbox but other projects So this is something which concerns me if you want to have that in Debian Okay Yeah, we are keeping a private repo because most of the work is for Cumulus Linux first kind of and the repo might contain some information about clients or bugs that are not public, I would say I don't know if we are going to change that Yeah, I can ask internally to see what's the plan but I'm not sure what we're going to do about it Yes I see concerns on that one because that calls for troubles if upstream is not it's basically closed and that's what you're telling me you have more commits upstream which is closed and you say now you will commit them back to a free version but I do not see any guarantees here if the development is not done in open Okay, I understand your concerns but I will relay the question and if there is compilation data available they should be maybe not in the repository Yeah, we'll try not to Actually, I'm just curious about Cumulus Network's business model What does it sell licenses for the operating system? Is it like the Red Hat model where everything is free and you will you provide that? No, so basically we sell licenses and supports and we sell different types of licenses depending on the hardware using 10GB, 40GB, 100GB But everything is free inside Cumulus? Inside Cumulus Linux? I would say that pretty much everything is open source except one main private driver that is basically the value of Cumulus Linux Cumulus Networks Oh, the private driver is not from the network switch vendor? No, that's a Cumulus Network thing Any other questions? Okay, thanks So my dad is watching live from France so hi dad but he doesn't understand English So, hi


How would you look at that and actually good spin-off this time? Hey guys, this is my review for Supernatural season 13 episode 10 Wayward sisters basically this is an intro episode is a spin-off idea that the show creators have had for a little while It's a much better spin-off idea than the one they had I don't know how many seasons ago the idea like a monster family crime syndicate thing didn't work that well This one is admittedly a lot better. However, it does the exact same thing that every Mid-season return of Supernatural does is it wastes a really interesting premise What we saw was Sam and Dean trapped in this other world with a giant freaking dinosaur footprint and They squander it like they're not even there for more than five minutes because the brother would barely get five minutes Screentime in this episode What we do get is actually a really well-developed team of the girls consisting of Jody Mills or adopted daughter Claire Novak Minnesota Sheriff and the psychic girl and They actually form a pretty decent team the humor and the banter is really well written and the conflict between them is really Well-written to Claire Novak's rebellious idea doesn't come off as hammy or as hammy as it's been before And actually works towards something Jody Mills protectiveness is also kind of countered in with the final resolution of the episode So the directions of the story Actually meet considerable ends rather than just rudimentary Normal cliche supernatural writing there's actually some good development out of this and I actually have to admit I'm no no if I'll be able to watch it because I can barely watch Supernatural's it isn't with work But it does interest me especially with the ending it actually made loss mean something Until the end of the episode But we actually get a really good dynamic and the humor was fantastic too. I love the Minnesota Sheriff when you pull that all these guns like why do you have all these I'm from Minnesota I've been watching Fargo the last little while so it was really funny just to see that Otherwise I like the episode.  However, apparently there's this girl who has this Spear thingy who beats up Sam and Dean and then kills the dream walker girl when Claire and her come and save Sam and Dean and Then however, this girl comes back through the door But it doesn't make any sense because how did a second door get open? We only know that the only person who can open doors is his Lucifer's son so What how did that even happen it turns out it's it is the dream walker girl I I don't know the ending kind of ruined it for me because I actually liked Claire's Monologue at the end about just the idea of family meeting them and all that I think that was good And then it just kind of ended itself with that cheesy ending However, when the brothers and them and Jody talk about how they're gonna work and they say oh, you know Sioux Falls We've got that you guys can save the world So it kind of made me think that this show is gonna be sort of like a Buffy idea that things just keep on coming to this town Otherwise, how else are they gonna differentiate this so from supernatural other than it just being a team of five women Rather than just being the brothers going from town to town that's the thing that I'm just interested in seeing how this show will differentiate itself from supernatural because Literally if they just do going to this town going to this town, it's not gonna be any different So if they do keep it all in Sioux Falls, maybe they can turn it into sort of a Buffy concept It's not like these guys haven't borrowed from that show before but in the end I liked wayward sisters admit that some of the stuff was squandered in terms of the else world and then the ending Which is really weird, but I like the concept. I admit that this Spin-off probably could work. It depends on how the ratings go through it But in the end, I'll give episode 10 of season 13 a 5 out of 7. It's a decent episode It's actually probably one of the better Returns mainly because they didn't focus on disappointing you with the else world as much They only spent like three minutes So you only can feel disappointed for that short amount of time Anyways, guys, I hope you enjoyed this review If you like what you see leave a like and maybe even subscribe I review all the episodes of supernatural as they come and I'm also trying to review the retro episodes as well Anyways, I'll see you guys next time


Everybody forced here ripping 2122 Donors optic basketball hobby six box number 28 pick your team style. You have Bozia B. Jazz Brooks H. Thunder Eric M. Celtics Eric a Rockets Irvin S. Spurs George B. Lakers Harper has the magic and T-Wolves J Joe Kings Jeffrey H Grizzlies Jeremy H. Hornets Jesus T. Warriors Josh D Sorry, John D. Has the Mavericks Kumpal Clippers Lionel with the heat Luke M Nets Nicholas W. 76ers Noah H. Bucks Rob C. Cavs Robert P. Blazers Rubin M. Pistons Ryan a Nuggets Sackle K. Raptors Sarin Lack Bulls Sean M. Pacers Tracy Seahawks Victor F Sons Wayne S. Nicks Z Chen pelicans and wizards. Thanks for joining everybody. Good luck Yeah, of course, you're welcome to watch and join you ever decide to join with your free shipping worldwide as well I just you just have to cover Taxes duties fees for import Watching breaks is a decent way to learn What's your what's your what's your sport? What's your sport of choice? Oh, I'm sorry Dario That orange miles Turner Pacers numbered 18 to 199 I think Sean was saying he picked the The vangals got hollow Grizzlies John Morant Dosumu rated Ricky for the bulls Let me roll the die for the whole break here one two three left four five six right on the All-stars tool player cards unless there's a low number. This will go all the same direction here If there is a really low numbered like big card, then I'll random it Four this one's going right side and now gets on this one right side for the whole break Yeah, I've been getting really into I've been watching primarily like A lot a lot this year. It's been It's been awesome to me. I love it Johnson a hollow Lillard and Mitchell Fantastic hollows spurs brinforbes Scotty Barnes rated rookie Barclay saved you Randy lime green Collins Sexton Cavs numbered 61 of 149 Kate Cunningham rated rookie reigning threes clay Thompson magic Johnson Larry bird Franz Wagner rated rookie lighted up Zach Levine Jonathan Kaminga rated rookie you've got hollow JT Thor Hornets rated rookie great brown lighted up hollow Jason Tatum Celtics Got 75 years Ray Allen Got a black velocity Pacers tj warren 20 of 39 nice black velocity hollowed against or thunder redemption after the butler is a Kai Jones rated rookie signatures hollow the Hornets Kai Jones Hornets Josh Christopher and a hollow Terrence Ross for the magic Ryan Reynolds the actor Yeah, I know he I know he bought a soccer club with um Someone else he bought it with it's kind of interesting pistol Pete Marevich Orange Miles Turner Pacers numbered 19 of 199 Key on Johnson hollow Kelly Olenek Pistons Trey young reigning threes Cameron Thomas hollow stargazing Kawhi Leonard for the Clippers Shreve Cooper hollow Kai Jones rated rookie Hornets Was bassy Got Chris Paul 75 years Trey man you got lime green tea wolves joshir kogi two of 149 That lime green tea wolves color color match their alternate color Hollow rated rookie Pistons Isaiah livers Josh giddy rated rookie followed by a red Davis and Yannis pelicans and bucks this one goes right side buck 77 of 99 Herbert Jones Kawhi Leonard in 75 years Hollow Knicks R.J. Barrett Zay Jackson hollow reigning threes buddy healed for the Kings Lighted up Trey young livers red Devonte Graham for the pelicans number 22 of 99 Hollow for the Raptors Gordon Draguage Jones Tatum and George and redemption josh christopher rated rookie signatures rockets Rockets josh christopher um Well rookies are a big thing in cards So some of the bigger rookies and this would be scottie barns Uh for toronto. He's on the cover the box actually Kate Cunningham for Detroit Um Franz Wagner for Orlando Kaminga for the Warriors There's a few more as well Jalen green for houston Evan Mobley for cleveland's those are some of the bigger rookie names and then outside of that you're looking for Steph Curry Yana Sons at a Kumpo LeBron James You know Jason Tatum luka Donchich jade springer orange norman pal numbered 63 of 199 the blazers hollow Andrew Wiggins warriors Damian Lillard on the blazers optographs numbered 96 of 99 Yeah, dude alhovers like Top eight for Celtics cards right now current players Hollow rated rookie pistons luka garza It's not as big in soccer, but it's gonna start to become bigger. I think once more people in the u.s. Get into soccer cards Uh net silly dominators kevin durant numbered four of 99 or at least like Certain sets if it's the first card in that set will be popular because obviously with with soccer or world football Like guys start pretty young for Certain teams so they it's it's weird to determine rookie designation on their cards It's like airling holland played professionally in norway at like 15 And his rookie cards were from about His age 19 season. I think I guess it really depends hollow chumo kiki magic what league it is Hollow reigning threes dami lillard blazers hollow 75 years jalen johnson That was bassy of lime green kembel walker nicks numbered 35 of 149 Hollow when lo carter jr magic and elite dominators rossel westbrook christo arte rated rookie pacers Tray murphy hollow stargazing james harden nets hollow rated rookie rockets alper and shengun Corey kispert Here's my garuba 75 years john stockton David johnson red for the pistons isaac stewart 62 of 99 These are made by panini So the main manufacturer be panini tops and then upper deck has some stuff as well But yeah panini and tops for the big manufacturers currently Upper deck has good history But they only hold for major sports. I think they only have the NHL so national hockey league license I don't think they have any soccer they have some golf as well. That's about it hawaii 175 years orange nicola yokich nuggets 181 of 199 evan mobily rated rookie for cleveland's Got red joshel primo spurs rated rookie 70 of 99 nice primo Yeah, I know panini has premier league license and then um Tops has like champions league bundes liga got hollow pj of washington jr hornets Pini also has liga and siri. Ah Mitchell we've got an isaac's hot rated rookie auto for the wizards non numbered Yeah, as far as soccer cards go, I think it's pretty much just tops of panini currently that'll have the big licenses Christopher hollow anthony davis elite dominators lakers Hollow rated rookie hornets james booknight And then world cup would also be panini as well world cup euro Hollow yanas onto the kumpo bucks See a big cd lane touchdown right now Got a nice a gold t-wolves joshakogi Number three out of ten Go t-wolves Mcbride hollow rated rookie blazers greg brown the third jalen suggs rated rookie Blue reigning threes chris middleton for milwaukey Number 20 of 49 light it up kevin durant The rookies jalen suggs Operant shin goon lime green on a nobby raptor is number 115 of 149 First down cowboys. Uh-oh hollow lighted up with brown james lakers buffs are done over 75 years julius randall Moses moody rated rookie, I don't know why you really don't play there You get a first down there like let's just ruin that Keep pushing down the field Hollow dwelling bead 76ers I feel like the opening drive is not the time for like a trick play. No whatever cowboys you do you Yeah, there's so many basketball sets now. There's a lot of basketball card sets All right guys, let's see. We still got some football spots to fill up tonight I think the select is sold out if i'm not mistaken Now still four to go Why is select not showing up on the homepage? All right eight to go here Ntm prism mixer four box mixer tiered random teams two teams for spots Kaminga, you got a pink velocity here nix mitchell robinson 64 of 79 Yeah, hollow lebron james lakers david johnson raptors optographs rookie auto number 18 of 99 james book knight rated rookie lead dominators middleton Zeke with the visor a different animal man Got blue pistons jeremy grants 49 of 50 49 of 59, excuse me His helmet looks crazy Hollow magic coal anthony Cade cunningham rated rookie quit and grimes ray allen 75 years i had to assume a rated rookie for chicago Rating threes hollow page page slyakovich It is like a power ranger helmet hollow ben simon 76ers Mitchell photon luke garza rated rookie pistons non-numbered short print photon Yeah, we've had tv for for At least a month now dwayne wade 75 years. He got all that resolved lamb green for the blazers norman powell 124 of 149 They run sharp hollow kings buddy healed josh christopher sadeek bay Hollow rated rookie warriors moses moody They go warriors nice hollow france vagner rated rookie Hollow all-stars durant and rose 75 years jason tatum nice tatum And last box of the break we got national treasures up next Just three more football breaks guys that have spots available for tonight 75 years chris paul the mixer nice Hey guys select is at three the nt in prism is at eight the mixer is at two Red greg brown the third rated rookie 89 of 99 for the blazers Nice color match there. There's a piece of dust in the bottom of that hollow pistons isaas steward Yeah, there's a piece of dust in the bottom of the brown that came right off of the microfiber Christopher dirknewitzki hollow pacers carousel overt wise camp dominators luke evan mobley cavaliers rated rookie a hollow sabonis and randall Davion mitchell that is a hollow rated rookie of evan mobley nice one cavaliers Nice mobley Jason Preston don't itching tray 75 years kawaii Leonard God jennith and deminga five of 25 rookie optographs nice hit dubs Heck yeah, there you go Grats warriors number to 25 five of 25 Get that mag for you and the rookies kade cunning am Brandon boston pistol p maryvitch Thailand In a lime green jonathan kaminga 140 of 149 Holy cow. What a final box here for the warriors gold state gold state Hey zoos t congrats. Hey zoos Sick hits. There's a moody base now to hollow luka donchage luka garza Make an inverter Brett marr on the cake on the off of the attempts Shengun rated rookie hollow denny of deal wizards Hollow reigning threes james hardin from brooklyn winded up devin booker jaylen sucks And wow warriors and orange rated rookie mooses moody now Seriously warriors 80 of 199. Let's do a recap. All right david johnson rafters optographs rookie auto 18 of 99 Base wizards auto is a otad optographs damien lillard nice hit blazers 96 of 99 Rockets redemption josh christopher rated rookie auto Hornets redemption rated rookie auto hollowed kai jones And for the warriors we had a lime green jonathan kaminga Number 140 of 149 and an optographs jonathan kaminga numbered five of 25 Now we'll do it. Thanks again everybody. We've got and see you up next


In order to strengthen the Benoist state chapter of the All Progressive Congress, APC, to further resist internal sabotage, the state chapter of the party has inaugurated a fact-finding disciplinary committee at a look into the suspension of some members for anti-party activities. The chairman of the party, Austin Agada, while performing the function in Makodi, charged the committee to unravel every form of anti-party activities in the party and anything that would bring this unity in the party while stressing that the party was totally committed to ensuring that its unity was sacrosanct. The functions of this committee is to unravel every form of anti-party activities in our party and of course everything that would bring this unity of our party. We have put that in committee in breaking our bonds in ensuring that the unity of this party starts and of course the survivor and the strongest of this party is made clear. Responding chairman of the fact-finding disciplinary committee, Chief Telum put to promise that the committees will be fair to all parties involved in accordance with the rule of law equity and ensure the recommendations at the end of the day. Hello, hope you enjoyed the news. Please do subscribe to our YouTube channel and don't forget to hit the notification button so you get notified about fresh news updates.


So good afternoon, everyone, and welcome back. So this session is going to be about Android SDK and how to build a viable app at SQL using the SDK. And I'm going to do this session from the user's perspective and based on the experience that we have acquired by building this application called DNMS, which stands for District Nutrition Management System. So this is a community application which where the public health midwives use this application to work from toe to toe, where there are children under age five and track their nutrition states. And then they use this application to report those information back to the main DHS2 server so that DHS2 users and people who are in the administration level can analyze those data to take decisions to improve the nutrition states of the children. So that's the primary use case where we had user Android SDK. So for this session, we also have some prerequisites if you are interested in following the hands-on exercises. So the first one is you might need to have Android Studio installed on your system. And the second requirement is to have an Android Emulator installed or have a supported Android device so you can test the application while we are doing some exercises. And this session is mainly is going to be about the DHS2 Android SDK, as I mentioned. And most of the exercises and the demos that are going to be shown in this session are going to be based on Java and not Kotlin. And I want to highlight that it's not a workshop about Android development. So it's purely going to be about SDK and mainly about the functionalities of the SDK. So Android SDK, if I want to give a short description about the SDK, it's a common good that allows you to work offline so you don't need to have an internet connection once you develop an application based on the SDK. And the SDK is capable of communicating with the DHS2 instance when you really want to synchronize data. And so obviously it facilitates the development of Android applications based on your custom requirements. So this is a high level overview of the SDK. So it kind of acts as an mediator between your application or the DHS2 core application and the DHS2 API. Basically, it allows you to communicate with the remote DHS2 server via the DHS2 API, but you don't have to really work on the DHS2 API directly.  So what if we simply use an HTTP library or a database? So this is how we kind of interacted with the DHS2 servers before we had something called Android SDK. So during that time, we kind of had to manually handle authentication and if we want to support multiple users with the same application, that was really, really hard as well. And we also had to manually manage the databases. Like we had to create and define the relationships, write queries to access data, and also manage the data states, especially if you want to synchronize the captured data with the remote instance, we had to keep those states, whether the data has been newly created, whether the data has been already synchronized with the remote server, those kind of states, we had to kind of manually manage them. And also, if DHS2 new versions come up with new features, then we kind of had to go through them, go through the documentation, and manually update the Android application to support those new features. And the hardest of all is handling offline online status, as I previously mentioned, so there can be many, many complaints in the data. Like if someone added something on the application and if the same thing has been edited on the remote server, so we kind of had to manually resolve those conflicts, which was not an easy task. And also, the last thing is we have to keep everything in sync with remote server because there can be so many changes that's going on on the remote server, like changing metadata and also changing data. So if there's no SDK, we have to write a lot of code to keep these two instances in sync. So let me quickly go through some of the key features of the Android SDK. So the first feature is the metadata synchronization. So metadata is what kind of defines and DHS2 instance. So it includes things like programs, program sections, program stages, and so on, especially track entity types, the program attributes. So there are many, many metadata in DHS2, which kind of uniquely defines and DHS2 instance. So if you want to work on the same instance, there should be a copy of the same metadata in the Android application. So this is kind of supported in the SDK, so you don't have to worry about calling hundreds of APIs to do the metadata synchronization. And the next one is about data synchronization, which is kind of an obvious requirement. So once we have metadata, so then we can create new data based on those metadata and those data should be synchronized between the remote server and the Android application as well, so that is also supported. And then Android SDK provides us a data access layer where we can use to access data in the local database that runs within the Android application as well as we can access data which are available remotely in server, especially when it comes to like track entity instance queries. We can instruct the SDK to query both local database and the remote database at the same time. And the last feature I would like to highlight is support for last latest DHS2 version, so you don't have to worry about manually supporting latest DHS2 features or manually changing your code to handle the complicated API calls, so latest API calls. So SDK is going to mask all of them out for you and just provide a convenient way to communicate with the remote server. So let me introduce you to the skeleton app, which we are going to use throughout this session. So the skeleton app is something that has been developed by the UI and Android team where you can use as the entry point to develop a new application from scratch. So I mean it has all the boilerplate code that is required to start with the new application development and also it has some branches that kind of shows you the features available in the SDK. So it is available on GitHub. So you could either type this URL or you can simply do a Google search for DHS2 Android skeleton app and probably it will come as the first result. So there are many, many branches in this repository and master branch is going to have all the boilerplate code that is required to start a new application development and then there are use case branches which kind of shows other capabilities of the SDK. So the first exercise that we are going to do today is cloning the repository and start the Android studio and cloning the repository and get the master branch of the application up and running on the virtual device. So I hope you already got Android studio installed and virtual device already in your machine. So I mean please, I will kind of demo how to do this but I am kind of new to follow the same. How many of you have Android studio installed already? OK, we have you. So yeah, so in order to start, let me first go through the GitHub repository. So then you can click on code and copy the HTTPS URA. And then in the Android studio you can start a new project from version control and paste the URA. For some reason it's the wrong one. So I hope it will work on your machine. So you simply have to paste the URA here and just click on the clone button and it will simply clone the entire GitHub because it tree onto your local machine and it will start a new Android project and it will probably start indexing the code and then you should be able to start the application as if you already have an Android virtual device. So I already have that step. So I will give you some minutes to go ahead and clone the repository and start building the application. If you need any help, please raise your hand so I'll be able to come and help you. So since we have a limited amount of time, so I will assume that you are following these steps and you have the Android application already clone. So if the application is properly cloned, you should be able to start the application by simply clicking on it's not clear. But there's a green run app button in the Android studio. So if you click on that button, it should build the application and start the application on the virtual device. Actually it will build the application and install that onto the virtual device and it will start application. So while it's building and starting, let me move on to the next section. So it's about the SDK instantiation. So if I introduce you to the workflow of the entire Android SDK, so the first step of using the Android SDK is going to be initializing the SDK. And then in order to use the rest of the features, you should have a user logged in properly to the application. And then there's a cycle of metadata synchronization, metadata synchronization, and then do some kind of work, maybe creating new track entities, such as events, and then uploading them back to the server. And the cycle can continue as long as the user is validly logged in. So when it comes to the initialization of SDKs, so in Android SDK, the entry point is going to be something called D2. So we have this D2 object, which probably stands for DHS2. And this acts as the entry point for all the modules and because it is in the, which are supported in the Android SDK. It is kind of the entry point for doing any operation with the remote DHS2 server, as well as with the local Android database. For creating the D2 instance, they have provided something called a D2 manager, which kind of accepts some configurations, which will be used to initialize D2. And it allows you to create a D2 instance in a synchronous manner or an asynchronous manner. So you can choose whatever you like, based on your requirement. So this is how you would use D2 configurations, sorry, D2 manager to initialize a D2 instance. So first you have to have D2 configurations initialized. So for that, you can use the D2 configuration builder and you have to pass a context object into the D2 configuration. So it will be used by the SDK to access device resources, such as file system or to create databases and all. And then you can provide an application name and application version. So these things will be useful if you want to do analytics in the server side. I mean, those analytics are not provided out of books from DHS2, you can use maybe your proxy server to analyze HTTP headers and generate a useful analytics because that name and that portion are going to be included in HTTP headers by the Android SDK with the every restful that it will be doing with the server. And then you can add some additional parameters like network timeouts and all. And then finally you can build the configuration object that can be passed into the D2 manager to create a D2 instance. And then once you have passed configurations properly, you can either create a D2 in a blocking manner or you can use an asynchronous manner where you can subscribe into the D2 creation event and then use V2 within your application. So the exercise two is going to be about initializing the SDK. And for doing that, I mean, the first step is really straightforward. I mean, the exercise one, it's just about calling the repository and starting the application which should work without an issue. So the second exercise, I mean, for the second exercise, you will have to check out this EX01 configuration branch. So if you are new to Android Studio and get support on Android Studio, you can check out new branches by, I think there's a slight delay. So you can, I mean, if you check the right hand bottom corner of the Android Studio, there you will find the branch name and you can simply click on that and search for the desired branch which is going to be EX01 configuration in our case. So I'm going to do that EX01 configuration. So you will get several branches with the same name but choose the latest one which is 2225 online. So that is the latest version of this exercise. And you can go ahead and check it out. And then you should get a Java class called sdk.java, which has some blank method where you will have to create and initialize the D2 instance. And also I want to mention that this D2 instance is the single term. So there will be only one instance of D2 for the entire lifetime of the application which is really important to avoid conflicts. So I'm going to go ahead and write that piece of board but I think there's a slight delay between my screen and the zoom. But I hope you'll be able to follow it. I mean, I think since large screen is not clear if you could join the zoom channel then it will be more clear for everyone. Some kind of a name, pass version.  So it is asking us to use the DD configuration builder and set the context and set your username as their name and then set the version. And then set timeouts, I mean, connection timeouts, read timeouts and write timeouts as two minutes. And when setting those timeouts, these timeouts are accepted in seconds. So we will be setting 120 as the write timeout. And then finally, once you are done with all the configurations, you can simply call build which will give us back a new configuration. You can return. And there are other configurations like adding network interceptors. So if you need to intercept all the network calls to DHIS to server by the SDK you know, use some kind of debugging or analysis, then this is where you can set them as well. So the skeleton application kind of has this already. So, I mean, it is using Flipper, it's a tool by Meta. Flipper, you can set that as well, but if you don't have Flipper on your machine currently installed, then you don't have to do that. I hope everyone is following. So since this one is really the simple one, I will just move on to the next section and this session is going to be recorded. So hopefully you will be able to follow the exercises data as well. So the next section of the workflow is about logging in. And now we have initialized the SDK and it is ready to use. Before doing any operations of data or Meta data or interacting with the DHIS to server, we have to log into the application with the value DHIS to user. And the good thing with the SDK is that it supports multiple user server combinations. So you can use the same application across multiple servers and multiple users can log into the same application. So how it handles that is internally it's going to have a separate encrypted database per user server combination. So once a user logging in into the application via the SDK for the first time, obviously the SDK has to be online when it's happening for the first time. And if that login is successful, SDK is going to cache that username password combination. I mean, it's not going to keep that in plain text. It's going to create a hash and it's going to persist that into the database. And then the same user can log in for the second time by the app is offline. The SDK is going to copy out the hash of username password combination locally and it kind of allows the user to log in if there's a match. So this basically explains what I just described. And yeah, the only hard requirement is that the SDK has to be online if the user is in. So that's basically working. And in logout SDK kind of disables any interactions with the local database and the remote server for that particular user. But once you log out, it's not going to clear any databases. So it's going to preserve the database for that user and server encrypted. And it could pull up the database if there's a subsequent login from the same user. So it's not going to clear any data. But it will just part of the user from any new interactions must the user is logged out. And logging in and logging out with the SDK is super simple. So I mean, compared to what we had to do before we had the SDK. So you simply have to get the d2 object which is the entry point of the entry point for any SDK related operation. And then get the, corresponding one module. So in this case, we are doing a user operation. So we have to get the user module and then we can simply call login and pass the username, password and the URL to the server. And then it would, I mean, as long as the SDK is online it will allow you to log in. And then for logout, it's simply calling user module that logout because at a given point there can be only one active user. So it's simply calling logout, it will allow them to use out. So the third exercise is around the user authentication. So it's available in this EX-02 login branch. So I hope you will be able to check out that branch and you simply will have to fill some methods in login-beam-model class and login-activity.java class.  You simply have to do a login and then you can show a toast message welcoming the user, maybe simply do a toast saying welcome and then use it. So I'm going to do the same thing and I hope you will be able to follow it or maybe follow the, maybe you will be able to follow the recommendation, whichever you prefer. So if you have changes in the changes from the previous branch, so since this is just for exercises, you can simply do a first checkout and it will discard all the non-popular changes and simply check out the branch that you will be able to do. So the first class that we have to modify is login-beam-model.java. And here we have an annotation explaining the exercise. So it is asking us to pull login method in your user module and it has provided us with the username, password and the server URL. So as usual, I will have to get hold of the E2 instance and then I'm going to do something regarding the users. So that means I need to use a module and there I can call login username, password, and server URL. And then the next class that I'm going to edit is login-activity.java where I will be doing a toast to the user. So this is an activity, so I can set the past this as the context and then I'm going to print the message hello user and I will just print the name and some exclamation marks and the left of the toast maybe it's going to be a long toast and then I'm going to show at the end. Now if I run the application, to start the application and give me a URL to enter this URL username and password. So this server is currently offline so we can probably use play instance. So I'm going to use the 2.37 instance here. And I will be logging in with the admin distributors. This IDD is successful, you should see this post as saying hello, John. Just following or do you need time to try it out or should I just press it? So then I'll move on to the next stage of the workflow which is about synchronization and when it comes to synchronization we have two types of data that needs to be synchronized. The first type is metadata and the second type is going to be data. So metadata synchronization is crucial before doing anything else on this instance or on the application. And before going into the more code level examples let me introduce you to the data access layer of the Android SDK. So it has two components, public and private. So public part is something where the developer can freely access, you can freely call these methods up to the repository. So we have the D2 at the top which is kind of like the entry point and then D2 exposes us to several modules and these modules can be user modules, track activity modules and event modules and so on so there are different modules. And then within those modules we have repositories which kind of encapsulates operations on these entities. And then if we call any method on these repositories then it goes to the private space where a valid user or a valid authentication is required. So it could be a database access or it could be an API access for both of these cases a valid authentication is required and it is going to be controlled by the SDK. And as I previously mentioned before you do anything with the SDK I mean anything data related with the SDK you have to have the SDK D2 instance configured and you have to have a valid user logic. So these three are the three or two steps up the kind of like the prerequisites for using the rest of the modules and because it creates the SDK. So the first thing that I would show you here is the metadata synchronization which is kind of like the third mandatory step after a login. I mean you can't do anything related to data without actually having metadata so we can consider this as the third mandatory step. So it's really simple.  And then with downloading data so mainly we have three types of data in any DHR instance or in an Android application so the crack net data and event data and aggregated data. So I mean it's simple I mean if you want to do something with the SDK it's simple to determine what methods should be called so you have to first start with the D2 and then realize what you need to do so if you want to download track entity data then obviously you have to select the track entity module so I mean that structure and intelligence by IDE combined makes it really easy for you to find the corresponding methods in the SDK without having to go through the documentation. So in this case if I want to download track entity data I will take D2 and then the track entity module and then the repository is going to be track entity instance downloaded and then it provides us some capabilities to limit the limit what we are downloading so we can limit the number of instances to 10 or maybe you can limit by program ID you can limit by organization limit ID so those kind of limits are provided by the SDK itself to provide, to avoid flooding the network and then you can see before download once you have all called all the configuration that's related to this download and same applies for events so if you want to download events you start with D2 and then we need to do something with events that means we need to get the event module and then what we need to do with events is downloading so that means we need to download the repository and then we can do the configurations like setting the limits and then finally the action module which is D2 and if you are not building an application with the SDK if we assume that you are using the REST API you will remember that with most of the data you have 10 points of DHIS2 it provides filtering and ordering so the same support is available there in the SDK so you simply have to call a combination of methods to achieve the same thing that you achieve with the REST API so for instance if you want to filter events based on the organization unit and the event date you can simply do that by again going through the same hierarchy so we are doing something with events so we need events for you and then the repository so we are going to do a read of the events so we are going to do the events repository and then we will be setting the filtering parameters so in this case I will be filtering with organization unit ID and that ID is going to be equal to some kind of an organization or UID and then I would like to filter that by event date and I want all the events that come after this particular date so it supports all the possibilities like before, after and things like that so then once you are done with configuring the repository you can simply call the action method which is in this case going to be gate previously it was downward and in this case it's going to be a gate same applies for ordering so it is also another kind of configuration that can be done on the repository so I can simply ask the SDK to order my events by event date and I can specify whether I need ascending or descending so it's really easy to use filtering and ordering with SDK I mean it's straightforward and then another important feature available on the SDK and especially the data access layer is requesting for nested fields so if you can remember how it works on the API when we call the event set point it's not automatically going to give us the data values instead we have to specify that we need the data values as well because otherwise the payload is going to be really, really huge and in this case I mean if you assume how the data is starting the Android SQLite database so there will be probably two tables unlike the HIs to database case so in order to prevent unnecessary joints we have to manually request for the nested fields so in this case if I need the data values included in the results set I will have to manually specify that I need the data values with the final results so if I can specify that by doing another configuration call which is with track identity data values so now it's going to do all these filterations and then do all this I mean do the ordering that I have requested and also it's going to join that with the data values table and fetch all the data values corresponding to the events and then build the final payload and final job objects and send them back so the next exercise is going to be about synchronizing metadata and data so it's basically implementing the same things that we just discussed and it's going to be available under exercise three sink and list branch so I'm going to go ahead and do that and hopefully we'll be able to follow and maybe later use the recording to complete the exercises and the exercise is going to be ES03 sink and list I'm going to check out and I'm going to do a post-checkout because I'm going to meet my previous changes and then I have this so the main edits are going to be on the main activity and the program's activity so if I go to the main activity I should be able to find my exercise here so the first exercise is to download metadata so for that I have to do SDK into metadata and I have to get the metadata module and simply do a demo and if I go back to just show you how these methods have been called so when the sink metadata is called I mean in the skeleton application we have these products for sink metadata, sink data and also for uploading data so once the sink metadata is called it's going to call the download metadata function that we just implemented and it's going to do that on the IO threads and once that call is done it's going to hand over the control back to the Android main thread and if there's an error in the metadata download it's simply going to print the stack trace for now and for now and if the operation is successfully completed it's going to start the program activity and show us a list of programs that were synchronized by the operation that we just did so similarly I should be able to go ahead and implement the tracked entity instant synchronizations so I need the tracked entity module and I can't go to download the tracked entity instances so that's the repository I need and I can see the code, the download function and same applies for the events SDK, need to, I need to give it and I need the human downloader and this is the code and also you should be able to add limits here as I mentioned, so you have multiple options you can limit, you can simply add a global limit or you can limit by organization unit or limit by program so if it is a global unit it's going to just download track I mean if you set the limit to 10 it's going to download 10 tracked entity instances but if you limit by organization unit it's going to download 10 tracked entity instances from each organization you need to access it with this user so for this exercise I'm going to set a limit of 10 as instructed and I will be doing the same for the human sensor and then I have to do the aggregated data and for aggregated data there's no such thing for the limits because it's kind of like I mean we can't define a limit for the aggregated data so I can simply get the data because it's free and simply download the aggregated data for me and now if I run the application it should build the application and start it so in this application I have when in the run configuration I have set this flag to clear up storage before deployment since we are doing multiple different examples it's easy to let it clear all the data when we are deploying the application otherwise we will have to manually go and clear the application data if we encounter any errors so I'm going to log in again to the play instance when the log in is successful I can simply click on sync metadata and it's going to take few seconds to synchronize metadata depends on the speed of your mentor so it's allowed to synchronization and once synchronization is done it should I mean based on what we have instructed here it's going to start the or open the program activity so now it has opened the program activity and the second component of this exercise is to implement or complete the program activity so that it will read programs from the metadata that we just synchronized and display them on a list but I will simply skip that step for now because it's really really straightforward you just have to take the program module and then you know just for it so let me introduce you to the data states which are being used to be Android SDK so this is something related to that I first described about handling everything manually so if you want to handle everything actually we kind of have to manually manage all these states within the database but at the moment SDK is doing everything for us so there are several states that are being used by the SDK to properly handle the synchronization between the local application and the remote server and the first one is sync so which stands for I mean which indicates that all the elements related to a record has been already synchronized and there are no local changes for that value for instance if it is a track identity maybe a track identity attribute then when you newly created it it won't have the sync flag it will have something like two post flag because it should be it is yet to be synchronized with the server and once all the data data related to that particular entry is synchronized properly back to the server and if the server acknowledges that the synchronization is successful then it's going to change the state back to the sync and the next state is two post which is added for the newly created entries which kind of indicate that this data is only available locally and this should be synchronized with the server and the next state is two update which is the state that will be used for the already synchronized objects but once the synchronization is done there has been some kind of an edit happened on that object so it can be like if there is a track identity attribute or name if it is already synchronized and if a user changed that name to something else this will be the state that will be used to indicate that change so this is kind of like the workflow of changing states within the database so if we create something new it will be two post the state will be two post and then when we click on the upload data it will simply go ahead and change the state to uploading which indicates that upload is still ongoing and if the upload is successful it will go to the sync state and while the upload is going on I mean it is also allowed to edit that record I mean it is imagine how hard it would be to implement this on our own so if I mean if there is an edit while the upload is going on the state is going to add the flag to update to that record and even if the previous upload is successful it's not going to change that flag back to sync because there are new updates on the on our object and then we have two other states to handle errors and warnings which are kind of like set up and these are the two most important states that I would like to show you today that's sync via SNS and sync via SNS previously when we were developing Android applications we kind of had only one option for synchronizing data from Android application to the server so what happened at the community level was the users kind of collect data within delay and then they come back to the come back to their office where they have internet connections and then only they could synchronize data into the servers so especially that was what we have been doing with the DNS application in Sri Lanka but now with the SDK we have the support for synchronizing data via SNS so SDK kind of use some compression libraries to compass data and efficiently transfer them into the server via SNS and also it relies on responses back from the server which indicates the success or failure of reporting those data and there are some cases when the SNS gateways are not configured or if there is no SNS gateway at all there are some cases where the server does not send any response so in that cases the SDK will simply have sent via SNS state and if there is a response from the server if the response is if it is successful it will simply add sync via SNS which is kind of the best state that we could have and synchronizing via SNS alright so the next one is about Tractive Fist Search I mean there are other search options as well like Tractive Fist Search and all but Tractive Entity Search is kind of special because it supports multiple modes like I mean it supports four modes so the first mode available is Hop-Flight Only so in this case if you do a Tractive Entity Instance Search it is going to search only the locally available Android Database and so yeah it will only include the locally available Tractive Entity Instances and then we have the next option Offline First and if we specify that and if the device is online the SDK is going to first search the local database and get all the TEIs available and then do an online search and then do some kind of duplicate handling to eliminate duplicates that get from both local and online and it is going to append that online result to the bottom of the offline results that present to the user and then we have online only search we will simply ignore the locally stored data so if the user has some non-synchronized Tractive Entity Instances on the device this search will not include them it will only include Tractive Entity Instances from the remote server and then same as offline first we have online first where it will include all the TEIs from the remote server first and then it will put in the local database and handle the duplicates and append that result back to the result from the online database and present that to the user so this is kind of like how that happens so I mean so if we kind of have request for ordering it's going to order within these some groups so this is kind of like showing the offline first mode so it's going to take offline data from the local database so DEI 1, 2, 3 are going to be from local database and then it's going to request from the remote server and DEI 4, 5 are going to be from that server and they are going to be in two different they are going to be in same they are going to be arranged in this menu so the so the example syntax for querying Tractive Entity Instances is I mean it would look something like this so it's same as before we need to do something with the Tractive Entity Instances so we start with D2 and we do the TractatedInModule to do a query so I mean with intelligence you shouldn't simply I mean from here you can simply search for query and it should probably suggest the method that needs to be called and then you can add all the configurations I mean if you want to filter by organization units or if you want to set some kind of an opening mode and also if you want to search for a program so those kind of configurations can be added here and then that is about filtering and then we can do ordering so you can order by attributes order by enrollment date and you can specify one of the four modes that I just described and then also you can add some pages if it is necessary and then it should you know do the magic pose so the exercise for is an exercise that is about coding TractatedInstances based on the syntax that I just showed let me see even though we have time so with D2 and now, we started half an hour late so it kind of depends on sharing or if you want to take a bit of a break yeah so yeah I have one more section to cover so I will probably skip this exercise because it was optional anyway and the last last part of the session is about data creation so data creation is required if you want to you know support a screen like this where you have a data interface and you want to create TractatedInstances and TractatedInstances attributes so okay it's when you are using SDK you really don't have to follow any documentation you simply have to rely on intelligence so we start with D2 and we can get the TractatedInstances module and then we want to create a TractatedInstance and that is the repository we need and in that repository we can simply call and add where you can use TractatedInstance create projection to you know set the configurations and then you can simply add that to the local database so it's not going to add into the remote database yet so it will first add that to the local database and when you do that it will upload stuff to the database so the next exercise is about about that actually TractatedInstances so if you have if you have time I can go ahead and follow maybe if I'm wrapped up in the next 15 yeah so if you want to follow with me so the exercise is going to be on EX-09 Tracker Data creation and go ahead check out that branch so the exercise is about so it says in the sign menu you can go to the programs and you can select the program and click on the last button we should be able to create a new TractatedInstance so if we run the application we can go to the changes just to show you how it works it works up to the point where we want to create TractatedInstance also I mean when you're trying these exercises offline if you want to use your own instance you should be able to change these hard coded values here in the section so search for photofill URL photofill username and photofill password sorry and you should be able to change these values so every time you run the application it will automatically fill those values for you so in my case it's going to be in the description and I will rerun the application so it has filled the form with the design of the metadata synchronization first design the programs if I want to add a TractatedInstance I may throw it that TractatedInstance into the program and while it's loading let me go ahead with the exercise the first part of the exercise is about creating the actual TractatedInstance so it's going to be TractatedInstanceActivity the synchronization is done so we have all the programs loaded so if I click on the child program and if I click on plus it's not doing anything because we haven't done the implementation so that's what we are going to do now so I have TractatedInstanceActivity so I'm going to do that exercise TractatedInstanceActivity so it says set any organization you need to capture scope set the TractatedIn type associated to the program this is what I'm going to do I'm going to take the ET TractatedInstanceActivity from the model I want to get the TractatedInstance repository and set the coordinate you can rely on intelligence to you know the rest of the recording and then I have the TractatedInstanceCreation TradeProjectionBuilder and I have set the TractatedInstanceActivity type here and then the organization unit then I'm done with the exercise9 behavior I have created the TractatedInstance and I have said that the local database when I'm done with these four lines of data and the exercise9 me is controlling this TractatedInstance into a program so it is available under the enrollment form activity so I'm going to go to the exercise me so it's the enrollment form service to create an enrollment so I can rely on the intelligence so this is what I need to do I need to create an enrollment form projection and set organization unit I mean I have to configure the enrollment with all the required parameters and TractatedInstance is going to be DEI UID and these are the these are the mandatory parameters for creating an enrollment so once it is done I mean the enrollment repository is going to point at that newly created enrollment so I can go ahead and set the enrollment date at incident date to the new enrollment that's done, exercise9 me and then exercise9 will be it's about attract entity attribute values so the exercise won't ask to save the value if not empty otherwise clear attribute value and delete the existing value just end so I mean I will first handle the empty case so I can simply use e70 utility function from the android native speaking and I'm going to check whether the value is empty if the value is empty I can hold delete definitely because I have already loaded the value I mean I have the code for the exercise has already loaded the corresponding attract entity attribute value so now the repository points at that value and if the value exists I can simply instruct the sdk to delete that value and if it is not I should be able to set maybe do a blocking set to update the value and I'm going to just do a print status if there's an exception so all the blocking calls I mean we should expect an exception with all the blocking calls yeah so that's all I have to do here so now I can simply apply my code changes without having to reload the application so there's an option or apply for changes in the android studio so if I click on that it's going to build the program and then changes now if I click on the plus button it's going to show me the environment form where I can set the last name first name and gender and save the attract entity instance as a bonus step in the in this exercise we have an automatically generated ID for this attract entity instance so let me show you how easily we can generate you know such unique IDs for for any kind of attract entity entity so that is available under environment form service as the exercise 090 so all the coding has been done for us we simply have to generate the value here so I want to do a I mean I want to use the reserve value so how this generation happens is it's going to you know with the devices offline it's going to request the remote instance for some values generated for this device let's say it generates 100 values for us and then when the device is offline it's going to use those values so that's how it was otherwise there's no way for avoiding the collisions so since this is a attract entity attribute I am going to use attract entity module and so I want to use the reserve value and I will do a blocking gate for that reserve value and I have to pass the attribute ID so that I can get from writing and also I need to pass the organization because these values are relative to the organization so for that one I am going to get the current enrollment and do a blocking gate and simply give the organization and that's all now if I read out the code click on plus plus button so it's going to give us a reserve value I mean we are going to use one of the reserve value and now we can simply fill in the form and click on save so this is something that I created so this is for the previously created one so it's anyway going to be an attract entity but once the enrollment form is paid or it's going to be an enrollment attribute so this is the one that we are going to just create so that's all I have for this session and some people have to go really really fast and not being able to allow you sometime to try the exercises and before I start conclude I want to especially thank Grecia and the way you are ready for providing us with this material and exercises and just to follow up on that as well if anyone's got any questions what's the best way to get in touch with you yeah you can send me a message cool sweet thanks we'll take a break now for 20 minutes and come back for the final session at half past