 That, even if foreign teachers left, right and center. Exactly. I know you. Anything to throw to other people? Steve, I have to admit that I'm sorry, I would not take this. What? Yes. I wanted to. You're the worst. No, I wanted to. I attended this year today. I don't care. No, no, I care. I don't care. I love to attend your session. I have my cousin coming here from Brazil. Yay! That's nice. Love the guy? Love the girl? Of course, the girl. The only woman here? The only woman in the session. It is not a marriage. It is not for you or for me. It's right. She's here with your cousin. So I wouldn't be going with them. So we're doing a network job here. Yes, sir. I didn't know that. So taking what I've learned myself from today, taking what I've learned myself from today, I've reached out to the Python user group in Sydney. I'm trying to try to line up. I'm trying to find you. You're not quitting me. I've been in Twitter so many times. Yeah, yeah, you just show up in my list. What? The GitHub page? Maybe because I'm offline. Well, the reason I did that is an experiment. Because if I get the tutorial at PyCon, that's what we really have to do it. I think it doesn't work for them. That's all. I remember seeing it before. Well, I sort of was optimistic that we could actually run it as a really short to follow-on experiment. Too many people left. So they weren't set up to do it. Thanks. Guys, I will be probably heading out of the conference. So don't wait for me once you go back. We never wait for you anymore. You're going to start the end party quick, early. The only thing is, are we going to the party tonight? The pee or whatever? Yeah, because they will be leaving today. They go to Friday night again afternoon. So I will be joining afterwards. Okay, sounds good. Thank you very much. Thank you, sir. That was a great time. No, the good thing. I mean, I was thinking that it was going to be a crappy talk and people was listening so carefully. It was not a huge charge. Yeah, yeah, good. Lots of good questions. The only thing I would say is the next version of it. Is talking about less patterns. Demo. Marek is demoing that. Of course. Even for you. No, about 40 minutes. I mean, you cannot do a part in some yes or one. Yeah, you can show at least one or two. Yeah, about two. You can show two. Here's what we're going to say. Yeah. But Marek is doing that in the workshop at home. I'm saying for the next time. You can take it once she's a little bit. Just show how those two can work. And then people will know. Yeah, the thing is that one hour talk, I do that 40 minutes talk. I don't want to cut down with the content because I know that people want to know all of this. And it's not the same when you do the talk and you ask questions and if you see the slides and you don't have anybody to ask. Right. It's true. Are we supposed to be starting right now? Okay, but are we supposed to start now or when do we start? What? Who said that? Jacob said that, right? Yeah. Jacob, you have to leave now. Fast. Security? Senator of the principal's office. Security? What are you talking about? Oh, that one. You don't know important stuff. He's our principal. Your life continues. Yeah. Jacob can't go? No. He's our principal. Yeah. Exactly. He's our principal. He's our principal. He's our principal. And most of all, we need to work like that that you are going to leave now. Yeah. This is the, the talk is being hosted. It's live on a website. So if you want to actually bring up the slides yourself, you probably want to do that because there's some links in it as well. So this is a hands-on workshop. We have an hour and a half, right? So it's two sessions, right? That's what I remember. Does everybody know that they've signed up for an hour and a half workshop? Yes. Good. So now is the time. This is the flight to the hour and a half session. If you've boarded the wrong flight in error, please make your way to the exit and board your proper, the appropriate flight. This is going to be hands-on. I'm going to introduce some concepts. And then you're going to do some very simple application deployment and configuration on OpenShift v3. Okay. We're not going to do actually any edit code changes, although you're quite welcome to do that later if you want, and I can show you how. We're also not even going to use the command line tools. We're going to do all of this in the web interface. Okay. So you do not, in the other sessions going on today, everybody had to use command line tools. Today we do not have to because we're doing a very simple app. Okay. So let's go ahead and get started. Let me ask some quick questions. Level set. How many of you've used OpenShift v3? Really the Red Hat people that are on my team aren't raising their hands. Nice. How many of you have done spatial work before? GIS, something like that. What have you used? Post GIS? We implemented our own GIS server. Fun. Nice. Yeah? What did you... Post GIS, leaflet. Okay. So when I do the leaflet part, you're allowed to check your email, but the other part, you're not allowed. Okay? Based on break-throughs. Oh, more than... Yeah. Move. Yeah. Anyone else doing spatial work? Nobody. Okay. So this is... I'm going to assume most people have not used OpenShift. Most people have not done spatial work. How many people have written a web application and used index like a JavaScript file? Okay. Good. How many of you are Java developers? Most? Okay. If you're not, I'm going to have to show Java code. It was kind of in the talk title, I believe, that I was going to do... No. Wasn't it in the abstract? If you really don't want to see any Java code, if it offends you on a deep moral level, I will understand if you get up and use that as well. And then we're going to show... How many of you used Mongo? Yeah. Only the people who did OpenShift V2 know Mongo. Okay. So I'm going to actually talk about all of them. Good. So the agenda is very simple. A little bit about MongoDB spatial, only the spatial bits of it. Some Java EE, and then... No. That's not happening. Ignore that one. Yeah. We're going to actually deploy some code. Okay. And have an app running. And then you deploy. Assumptions, you can ignore that one because we're not going to write any. And then you will ask questions. How many people have already gotten a beautiful scarf? How many people have already gotten a beautiful scarf? Only three. Okay. So ask a question. Get a beautiful scarf. And I give out multiple scarves to the same people. If you have a partner at home that needs a scarf or a doll, not for a cat though. What's the scenario that we're doing? We work for a vendor that sells beer at baseball stadiums and since it's... Well, in those other countries. Beer is at baseball stadiums in the United States. Does everybody know what baseball is? You throw the... It's like cricket, only just as confusing. Right? If you throw the ball, you hit it with the bat and you run around the bases. Right? And there's a lot of it in the United States. We're making a check-in service to help drive traffic to our crappy beer stands. We sell very bad beer. We want to try to get more people to come to the stations to hopefully maybe sell more beer. Okay? We want it free and open source on the whole stack. No lock-in. And it's due next week. So your product manager comes to you and says, this has to happen by next week. Right? So you have to do this actually relatively quickly. This is where I hate. Let's see if I can get this to go smaller. Can you read that in the back now, though? Kind of. The old men can't. But maybe the old men should all move up to the front of the classroom so that they can read this stuff on the slide. I'm here already. So there's a bunch of different type of NoSQL data stores. Right? So I want to put my MongoDB where it sits in the ecosystem. So I'm assuming everyone's heard of NoSQL. Is that about right? Yeah? NoSQL data stores? Okay. So I'm going to go through a bunch of different types. I'm going to give you an example and then usually they use cases that they're used for. So there's document data stores. And I'm not talking about like a Word document or a PDF. I mean like you're actually storing a data document into the database. There's too many types of that. MongoDB and Couchbase or CouchDB. Right? And they're usually used for document storage and search. So you put in a document of data and you store and you search it. Right? And we're going to cover Mongo more today. There's key value. And those are usually examples of that are Redis, React, Memcache. Right? And so that's usually caching or an object store. So you have a key and a value. And that's all you have in the table. Right? You have a key and a value. So this is really good for something like a webpage where the key is the URL and the value is the rendered HTML for the webpage. Right? Very quick and easy to pull out the webpage and serve it back up and it's just coming out of memory rather than having your server work out. There's graph databases. These are neat. The prime example I think of this is Neo4j. And this is used for storing relationships between objects. So if you think of something like Twitter or Facebook where there's a social graph, you can very easily do this in a graph database. It stores like, you know, prime example is they do like Star Wars and they say Darth Vader is the father of Luke and Leia. And then they do the reverse on that graph which they say Luke and Leia are children of. Darth Vader and then they have like trained with and they do the whole graph. That's what you do with graph databases. It's also usually very good for certain types of geographic data. Do you guys, is everybody here from the Czech Republic or most people if you're not from the US? Yeah? Poland? Anybody else besides the Czech Republic that wants to get a scarf? This is an easy question you just say which country you're from. Which country are you from? Russia. Russia. You already have a scarf. You're even wearing a scarf. It's good, but it's cold there so you should wear both at the same time. Okay, so in the United States and I don't know if you're having the Czech Republic but we have when they do the census does everybody know what the census is? You know when you go around and you count all the people they break that into geographic entities that nest inside of each other. So it's a hierarchical data set. Those work really well in Neo4j because you can walk the leaf down the tree all the way down back up and down the tree to find which geography you're in. Data processing is just things like Hadoop and Cassandra and Voldemort and these are large data processing and then there's Misk and this I put in things that don't fit into the other large categories. So examples in here are Lucene, Solar and Elastocerche that's kind of one whole thing. Lucene and Lucene is the basis for both Solar and Elastocerche and those are that's document in the word PDF document or Word document. It's a free text index for searching for things. It actually has spatial as well. This has spatial. Some of these have spatial. These have spatial. Voltini I put in there because I know it's made by Stonebreaker but I don't know what the hell it does. So I just put it in just because Stonebreaker has done so much before that I feel like he earns having me mention his database but I don't actually know what it does. Harrison, do you know what it does? Yeah, it's optimized for high volume input. So it's optimized for writes. But is it a relational database? It is. Yes. It is acid. Compliant? Compliant but it's really optimized for writes and you use something else to line the data afterwards. And then serve it back up for reads. Okay. Thanks. I still won't say that in the next show. I'll go to you because then someone will think I know something about Voltini. So that's the different types of NoSQL data stores and now I'm going to just talk about Mongo and now I can make this bigger I think. So a bit about MongoDB a document when we're talking about Mongo is just a bunch of values. So for those since I assumed you were Java developers that's like a hash map in Java, right? And in Python it's a dictionary, right? It's just hash value, hash value. And just like in both of those languages dictionaries can contain dictionaries, hash maps can contain hash maps, they can contain lists. The same thing can happen in a MongoDB document. So it's a JSON document is really what it is, right? Except it's actually B song, not JSON. So B song, B-S-O-N is binary script object notation, right? And the reason why they're using B song rather than JSON is they want the ability to actually store dates. Dates are used a lot in databases and if you put it in as a string you can't do as much in B song it's actually a date and you can do queries against dates like range, queries on dates and stuff like that. I already explained this it can be nested which helps to avoid joins. The main reason why people built the founders founders who built MongoDB in the beginning was they wanted to get away from MySQL and they wanted to avoid joins, right? And this is really good for something like a social check-in service where you have somebody checking in at a bunch of geographic locations you can actually have the person and store all of their geographic locations that they've checked in in their document or you can store the last three or something like that places they've checked in. So that way when you say hey, give me this in history it just pulls it does one query pulls back the document and can display all of it and you've never done a join. Does that make sense? Right? So everything that comes with this I'm going to give you the bad part about it too. Right? I am not necessarily like MongoDB all things. What's the bad part about this? I'm not going to give it to you you're going to tell me. What's the bad part about not having joins? What? Redundant data and updating of the but you're not getting another. Do you need another? No. You don't need another scarf? I have a bunch of them. You have a bunch of them? No. You're going to go sell them when you go back to Russia? No. Okay. You have two kids? Is that what you said? No. All right. Because I'll give you another one if you have another kid. So you're right you end up with redundant data so if you're if you're storing all the locations where the person checked in and somehow the title of that location has changed you can't update them manually rather than updating them in one table. So there's a really bad chance of getting data orphans in here. It's schema this and what I should say is the schema is free form. It has a schema but MongoDB never enforces its schema at all. So another thing that the people who were building Mongo did when they wanted to start was they wanted to aim it towards developers rather than people who have to deal with Oracle. So do you work with a company with a big Oracle schema and you have a lot of database administrators? Or is it just you? We have just two schemas. Okay, but if you want to make a change to the schema do you have to put in a change request? Yes. Yeah. And then how long does it take to get that change request? It's ourselves. When they don't let you do it you end customers. We don't have customers who develop something on top of our platform. Okay, but when you have to ask a DB admin for a schema change and you put in a change request how long does that usually take? If you can't do it yourself? It would be just a schema change it would be done within an hour. Okay, so when but you're still waiting to write your code for about an hour. Yeah, but if I have to write the code and do things more it's of course longer because we have to deploy. Okay, so you have to deploy and all that stuff. With Mongo as soon as you change your code it makes the change to the database. So if you say oh I changed this table you know I need another column which is great your product manager comes to you and say oh I need their identification or their passport number so when you modeled the user you didn't have that in there before and you put it into the same collection which is like a Mongo table and suddenly you have passport numbers getting inserted into the documents and they go in no problem. That's pretty nice, right? You never have to talk to a DB admin you actually don't even have to write any DDL statements, right? There's no writing any schema it just goes. What's the bad part about that? That's right. So the bad part about that is I write the name to be passport N-O and someone else writes the name to be passport num in their code and now we've got two different fields getting pushed into the collection and they're not the same right? And you don't and you have no way of knowing so there's been times when my code in one piece doesn't match the query that I'm doing or I'm inserting by hand and I'm like where did my data go? And what it did is it and actually with Mongo you can go all the way up to the collection level actually even the DB level if your code uses a slightly different DB name a completely new DB right? So you could be writing into two completely different DBs and you'd be like where's all my data? And you don't know or if you're putting in numbers into a field and someone doesn't get the message that it's supposed to be a number and they start putting in strings Mongo's not going to care it's not going to stop you from being stupid right? So basically what ends up happening with Mongo is all the stuff that we liked being baked into relational databases you have to move up that's what's happening it's really good at fast writes but you give up immediate consistency right? So you can you can tune it so that it actually does one phase transactions so it says I don't I don't want you to I don't want you to return back to me until you've actually written it to the database and it's been sharded out but at that point your speed is the same as a relational database right? So what a lot of people use Mongo for is because it's really good at fast writes it's you can actually tune it to say as soon as the network stack gets the packet saying they want the write not even into memory just as the network stack gets it return back to the return back to the client and say you got it right? So that's really great if you're writing some sort of like a logging application where you're grabbing log files where you don't pair if you miss a few here and there but you really want to make sure that you're not blocking on anybody trying to write you can basically tune it as soon as it hits the network stack it says great go back great go back so like that's why all the Node.js people loved it because with all that async stuff they could just return right back with the async stuff right away so everybody get that part the problem though is if that machine goes down any time after it's hit the network stack your data is never going to get written it works from the field about how easy that is it was built though at a time when the developers already understood that the new way of scaling is not vertical anymore it's horizontal so it is built in with sharding and a whole bunch of other stuff and you can do commands that just say shard away and it goes in shards but I don't know how reliable those are did we ever have any problems with that on the open shift clusters or anything with the sharding did we ever do sharding no okay so that's it for Mongo any questions about Mongo we're all good yes okay now some spatial so this is like in the world the spatial functionality Mongo currently has is very simplistic there's near so tell me things that are near me here's a point what's near this point this is a line show me other points or lines that are near this line right containment so containment says this is the city boundaries of Brno show me all the restaurants in the city boundaries of Brno show me all the post office codes that are in and their areas that are inside the city of Brno so does everybody get within right so the thing with containment though is it has to be contained what you can also do is intersection so intersection says are you within or do you cross the boundary of right so this is saying show me any postal code that may actually intersect the city limits of Brno boundary but for those of you who view well there's only one person here who's used a spatial database right is this is not have you guys entered post GIS it's Oracle Spatial on Postgres and it basically is like a complete GIS system and you can do all sorts of really fancy modeling things like buffering so you can say take all the restaurants buffer 10 meters intersect that with all the rail lines and show me all the rail lines that are actually close all the pieces of the rail lines that are close to restaurants you cannot do that here right because you can only you could say show me all the restaurants that are within 10 miles of this rail line or all rail lines but you can't actually then say give me back those pieces of the rail line that are exactly there does that make sense so it's really about querying is all it is you cannot do spatial operations you can just query in MongoDB but what that turns out to be is that for most that's about 70 maybe 60% of the spatial use cases most people when they're thinking about doing something spatial it's what's called trying to find things near the pins or something like that most of us don't do complex spatial operations so this actually worked great for this because I said this is up and online you can go back and read more if you want to read more about the details later about how it all works they're implementation and everything there's two types of indices there's 2D for flat surfaces and 2D sphere and this helps with coordinates on an earth-like sphere there is very different calculations for distance and area and all those things depending on whether you're working on a flat surface or you're working on a sphere most of the maps we look at are 2D but what comes out of these things GPS coordinates which are on a sphere latitude and longitude with some particular data I'm not going to talk about data today because most of us want to actually use code today but the idea is they have built this so that when you're getting GPS units you can do really different calculations right where you're near and within and all that stuff this can be any arbitrary 2D surface so we could actually map out this room give coordinates for everybody's position relative to that corner or that corner so everybody would have a position and then we could say who is the closest person sitting next to Mark right it would probably be the guy in front of you right but all we could say find all the people sitting within 10 meters of Mark or 10 units of whatever we choose to map the room in so people can also you could use this for things like electronic sports your backyard or if you get data that has already been projected and I'm not going to talk too much more about that so good to know it handles GeoJSON natively so GeoJSON is the JSON standard for handling GeoData and it has a particular format and if you work with latitude and longitude data and you're going to do 2D sphere you have to do GeoJSON okay you don't have to do it for 2D but for 2D sphere it's got to be in GeoJSON and by doing that though what are the units on here like what are the units what are the units for a position degrees right did you get a scarf yet yeah a couple of times people are stealing my thunder okay so it's degrees so if I asked you how far is 0.1 degrees from where I'm standing right now how many of you would be able to figure out when you got to about 0.1 degrees it depends where we are on this it also would depend where we are on the sphere even it's arbitrary depending on whether you're close to the equator or close to the pole so that makes calculations very hard if you're just dealing with these things if you put it in a GeoJSON mom goes smarter to give you the units back in either meters or feet depending on what you want rather than back in units of degrees over some meters sorry not it assumes when you're making the spatial index it assumes the coordinates are between minus 180 and up to 180 why is that somebody new who needs a scarf gets a first chance at asking why do you think they made the index range by default that somebody need a scarf you already have one too does somebody not have a scarf okay so one of you want to answer I'll be nice why do you think the index if you just even talk and give a guess as to why you'll get a scarf why do you think they chose this range for the index think about a globe exactly it's because the maximum degrees you can ever get on the globe of the earth is 180 degrees either east or west of the prime meridian right so if we actually did that 2D with the room and we were using centimeter accuracy it's much more than 180 centimeters to map out the whole room in east direction when you make the index you have to pass in the new range for the index okay and then just because the only person I don't want you going home without a scarf I'm just going to give you one anyway just for raising your hand saying you didn't have a scarf Maric what for the next session please there's one person left in the room who didn't have a scarf and not everybody has a scarf you don't? are you staying for the next session? okay well you better stay if you want a scarf and also there's also a a formula to convert to human readable units if you keep it in lat long it's called the haversine formula and that actually helps you convert from lat long to feet and meters so how do you make it work? so this is the part where the only person who's going to appreciate how simple this is is the guy who's worked with oracle spacial before because it's incredibly simple to make it work so if you're using you either make a field in your json so this is the location and those are the coordinates this is for 2D if you're going to put it in if you're going to use latitude and longitude with the default index put it in longitude and latitude first because that's GeoJSON that's GeoJSON format this is just straight you can just make it location 50-30 I think Brandon is that what we did in our example you just use the straight field like that not GeoJSON we should have used GeoJSON so we're not showing you best practices in the example this is GeoJSON it's very similar there's a field, location it's got a hash inside of it the coordinates with longitude and latitude first let me look we'll see later we have the source code so that's it, you just put your data in and remember, we did it right I love when we're good so with this you don't have to declare any of these fields there's no DDL to write which is part of the annoying in oracle spacial and then, after you've done that you just say DD, your collection which is your table Ensure index pick whatever field has the coordinates in it and say 2D sphere and it indexes the data with a 2D sphere index and you're done, your data is now spacial so put your data in make an index on it and you're done that is probably the easiest way ever to get spacial data in am I right, compared to oracle spacial yes thank you I know you were going to say yes so what they've traded is ease of use for power and flexibility right this is very easy to use but it becomes much harder to use if you move any way off the normal use case and you don't get what you normally want to do or you can make a 2D index which is db places and 3D index the field and just 2D and you're done so now I'm going to switch to JEE for those of you who are not Java developers you can kind of pay attention we're going to go through the code later our fewer Java developer have you used Jaxrs are there any Java developers who have not used Jaxrs you haven't I wouldn't consider myself a Java developer even though I've developed some small things in Java how about CDI so I'm not counting you anymore for those who have actually written like Java web applications how many of you have not used CDI you've not used context dependency injection I'm not going to go into it in deep now there's an annotation in the new Java EE where you can just CDI stuff and I'll show it to you later Jaxrs I'll tell you what it is Jaxrs is the anti-soap it was known for it's the anti-soap it's the rest making rest interfaces and it's super-duper easy to make it like when I actually started using it I almost felt as hip as lion or no JS developer like I was like oh I'm almost as good as him and I don't have the hat and the beard yet but I'm working on it so basically you do a bunch of annotations and you can expose a URL and you actually can do all the serialization and deserialization for the Jaxrs leaflet so we've handled the data store we've handled the app server and how we're actually going to do our business logic leaflet is what goes on the front-end to handle maps and so a quick intro it's a lightweight, very very lightweight JavaScript client-side library for doing great maps there's a couple of different JavaScript libraries the other big one compared to this one is called open layers where it was used for like if you need things like an editing toolbar if you want to edit features on the map and you want to do that stuff you're going to be looking at open layers leaflet is much more for that people who want to do pins on a map or heat maps and quick lightweight JavaScript on top it came out later than open layers which is to its benefit it works out of the box with open street map as well as others but do you guys know what open street map is open street map is here there's one guy shaking his head so that means that the rest of you don't know what open street map is correct? you do? because you've done this sample I have a question so the reason is one it's actually the community here even though you guys probably have less people overall than all of the United States you have way especially if you're just probably in Germany alone there's more contributors than all of the United States it came out of the guy who started it Steve Coast was in England and then some companies some countries have really gone on board it's the Wikipedia of maps basically people go out with their GPS in their phone or when it was first started it was little hand held GPS units would store a track and then come back put it up into open street map write the name on it and then you have a map of the world the Catastrophe office gave it up not when they started though so when the open street map first started it was very much this it then gained enough momentum from people doing things that now we have government agencies just giving their data giving it to open street map and it's free for anybody to download and use and you can go in and edit it if you want to so there's a lot of interesting use cases for this one is a newspaper back in the States and they hired someone to go out for every story and put a point in open street map where that story took place so then the newspaper could actually link back to that story and have people look at that location on a map and they were free to do that because it's an open database the other thing that this is really good for is humanitarian errors or humanitarian catastrophes so like you know what was the latest the tsunami in the tsunami in Thailand basically there was no maps really good maps of all the back or the ones that just happened in Nepal the earthquake in Nepal they put out a call for people to map, they divide it up and people just go in and start mapping all the roads and basically within a week that entire country is mapped just on volunteers so if you're just going to put pins on a map it's probably the best data layer out there because then you're not tied to putting things into Google if you're just putting pins on a map if you're going to be in Germany you can actually even do routing with it to route cars, Germans have put enough effort in to like have turn restrictions and speed limits and all that stuff most other countries in the world and Czech has too, most other countries in the world like the United States, I wouldn't use it for routing except for bikes and walking okay and you still might tell you to walk off of an on ramp or something like that to the road down below and leaflets mobile ready you can see today when you spin up your app you can go to the URLs with your phone and it'll work it has a rich library of plugins so it has things like heat maps so everybody know what a heat map is it's like when you have different colors on the map depending on the intensity of stuff so if you have points with values in them you can use the heat map plugin to change that into a heat map surface rather than a bunch of points with different colors which is sometimes better for visualization okay so that's it for the slides that's all the tech we're going to use today anybody have any other questions? I'm assuming you'll have questions as we start to do this and we start digging and looking at source code but if there's any others right now go ahead go for it yeah compared to cloud I haven't used cloud so I don't know it's very similar it's also very similar to couch base or couch DB they're both very similar you know it depends I think some of it is religious where people get in their head that this is the right thing and you must use it I think Mongo was very popular for a while it has become less and less popular over time is what I would say there's usually performance trade-off slight performance trade-off so like one example is between couch DB and Mongo couch DB you have to pre-define all of your indexes you can't make indexes on the fly you can't do queries off a random data at least it used to be in couch DB you couldn't just arbitrarily query your document in Mongo you could but couch DB actually started up an HTTP server so any queries to it were just made old rest calls so out of the box you could already serve up your data alright any other questions? so I don't know the exact you're gonna have to look for some blog post or some article that talks about performance benefits who's gonna actually do the exercises or try only four people five people okay ready for the rest of you you can just watch me because I'll do all the exercises too for the rest of you that doesn't mean you get to do YouTube and all those other things though if you're not following along open this repo this is the GitHub repo we're gonna use Mark are you gonna use this one later two in the next session? yes sir if you're going to do Mark session later are you gonna show webhooks? yes sir if you're gonna use Mark session go ahead and you've used GitHub before and I don't have to explain it all to you go ahead and fork this and make your own repo and then use that URL instead if you're not gonna be in Mark session later which I feel bad for you that you're not go ahead and just use this one open it up and then also open the web console here this is the instance that you're gonna use if you're gonna do the exercise please raise your hand I have to give you a number okay raise it high until I give you a number user 01 user 02 03 04 05 06 you're kinda jealous that these other people are gonna go home with working apps and you're not you're 07 anyone else? I actually see my best to start it you know there's this thing about like time is kind of linear in our conception and if you had actually told that to me before I started there may be a possibility that this already exists well I'll just have to make a new project good okay 0-0 alright I keep forgetting that I'm not so here's the g-shiply open shift okay I'm gonna start firing up the app with you guys and then we'll come back and look at the source code because it's gonna take a little while for things to get going so here we are everybody should be looking at something like this I want those who are following along to log in and it was devconf is the password for everybody so the password for everybody is all our case we care about security a lot and the password for everybody is devconf so don't hack each other's accounts there's no competition here it's not like giving you there's no best in app okay so please be nice to each other does everybody get that URL for the web console that's not my presentation where'd it go it's over here again do you want the link for the slides oh it's up there too yeah that's so much to type it's really easy to click on the link so let me just go back to the first page of the slide this is probably easier for you to type in talks.thesteedzero.com talks.thesteedzero.com jeemapv3 jeemapv3 and then go to the slides and then go to the slides that has the links to the various places hey Grant since you failed to tell me anything in a proper word can I ask you a favor please could you give me a glass of water or a bottle of water please I don't want any more Kefola I like Kefola the bomb no that doesn't need fizzy just anything to okay that's great fizzy water sounds great thank you it doesn't have to be I thought that would be harder oh I'll have one too right you can tell who the boss of the team is oh just get me one too you can even say that please has everybody gotten the link can I go back to the exercise now does anybody not have the link that's why I should just ask negatives does anybody not have the link okay I'm going back so go here your login is your user whatever I still don't have this plug inside it's slow as well as this oh it's the wifi the wifi is fine the wifi is fine everybody else is it really quick and fine same for certain people see that's because you're using a Mac actually it's a Mac is everybody working working for everybody else who's the lead but Harrison doesn't count I'm just going to go forward very slowly then user 00 or whatever user you are is there anybody else who's decided they want to follow along since it's going so well and then the password is devconf enter and you're in and you should see something that looks like this is that what you were seeing yes a new project because there is already the MLB parts in here if there is one in yours we're going to make it up in the top right there is this blue button that says new project click on it and you're going to name it you can name it whatever you want I don't care I'm going to name mine grant is rude and then you can put in a display name or my display name is grant was raised by wolves and then that's it and you say create and you should be looking at something like this is this what everybody is looking at it's still waiting get ready Mark are you hearing he's still waiting to log in he's still waiting to log in are you still waiting to log in too what can you stop and then restart reload you've done that 75 times hasn't still hasn't changed a thing 80 is the server actually slow I got that back up it's just the Wi-Fi the server seems okay no I think it's Wi-Fi because I'm working even for that presentation to load as well and it's just on certain people's machines and I don't know how that ends up I'll get disconnected and come back so sorry you can follow along I'm going to keep going because I've got to keep going there are some C sharp with people going here they probably have viruses all on their machine okay so the thing that you're going to search for here is you're going to search for in the filter by keyword EAP right and you're going to pick Grant have you tried it with 1.2 we're going to all be guinea pigs we're going to pick Jboss EAP OpenShift 1.2 so this is a Docker image built by the SCL and the developer experience team at OpenShift so it's fully supported it's EAP64 and the version of it is 1.2 it was built by the Jboss team not the SCL team so SCL team you can stop looking so smug what? exactly this is built by the Jboss this is built by like Bill DeCoste and his team I guess so we'll say yes so go ahead and click that so then the name this is going to be the name of your application or the name of your project it's going to create a label I'm not talking about those right now because all we're trying to do is bring up the spatial app so the name for this will be mappy you can call it whatever you want map, map that's my name on my map it's mappy map map and the git repository URL is the is this one right here you can use the one up at top but I'll use the one that they give me you're copying grants git repository if you forked it use your URL instead okay for those who actually can get to the page okay and then say create and that's all you have to do and so what we have done that image that we were talking about the docker image is actually a builder image so it has the functionality inside of it to say I'm EAP but I also know how to build if you give me a palm .xml and so what we did is we gave it a git repo that has a palm.xml on the base of it and now what's happening behind the scenes is this image the original image is pulling in that source code in a tar ball into the temp directory untarring it and then proceeding to run maven build against it and then when it's finished it's going to push it into the EAP deploy location and then save that as a new docker image and push it into our registry all behind the scenes so if I say it quickly and simply is taking source code in a docker image and creating a new docker image that we can run with the source code in it and that's what we're doing right there okay and this is the step that actually takes the longest so if we go back to the overview you can see that we have a build running you can click on your build and we can actually look at the logs this is new in 3.1 of OpenShift 3.1.1 or just 3.1 3.1 this before 3.1 you actually had the SSH into your builder pod and look at the log files there now we can watch the build happening so for those of you who are Java people please explain to the non-Java people what we're waiting for right now what does this look like to you you don't have to answer I'm not considering you on the hook come on some of you said you were Java developers you've used Maven right that's pulling some packages from Maven yeah it's pulling the internet using Maven exactly this is basically Maven downloading the entire internet and putting it into our image okay so that's why I'm going to start this first because this is going to take a while well it's already done mine's not done who's is done is mine done oh you're a pushing server you're watching me are you like the creepy sys admin that goes into everybody's project and looks at stuff okay so then once it did that building in OpenShift we run an internal Docker registry right and so when that image was built right where did I do this there was the building being done and it's pushing here into our internal that resulting Docker image into our Docker registry and so now if we go back and we look at our project overview again we should you know I haven't I have another feature request oh no there it is it's on the right side go to top you can go to overview again you can see we've actually this hasn't scaled up yet though we've got a pod now running the build is done we can actually go to the deployment so go to browse deployments so everybody see that left side browse deployment so we built this Docker image and now we've moved into the phase of deploying that Docker image into the infrastructure if you don't have your own run if you don't have your own build cycle so here's the deployment is it done it's running so let's look at that and we can look at the logs so it looks like it actually looks like it's deployed it and it's actually now doing a readiness check is that correct is that what it says it's doing here yep thank you me as a developer I understand that it has deployed the Docker image you can actually set a readiness hook for the Docker image to say hey when I return success that means I'm actually ready to serve up responses for those of you who are a Java developers and have used EAP how long does it take for EAP to start up no matter what the middleware team tells you it takes some time this is not starting Apache so we might actually be waiting but I don't know okay below 10 seconds okay then explain that it's running in Amazon oh my own laptop yeah yeah yeah it's running in Amazon does anybody else's here turn blue in the audience there's a blue circle around it so yours is working you may find that the push times out it hit me during mine awesome so for those of you who are already blue you can click on this link that's up on top that's your URL to your app we created a route to it and you should see a map is that true isn't that awesome great I don't know if mine is actually maybe I should just I have to wait for it to die or should I just deploy it again you can do the deploy no you will not show me what I would do again this is go back to my deploy and fire off another deployment just do the you say that's a good pattern see this is why we like having the devs here yeah scale down so when I scale it to zero that says get rid of anything that's running right now when I was hitting stop messing around with mine it's the push of the build what did you do nothing it's the push of the build it is timing out which means you actually got to time out and rebuild it it's really annoying you did actually scale down so but it's still saying it's scaling to zero I thought it was using web sockets you're the worst mascot ever okay I refreshed and it's still saying I have one pod I browsed deployments and started a new one that's worked for me in the past so there's my deployments and I'm just going to say no I'm not I'm not going to delete it okay usually you could click there let me see if I can kill this one can edit it where's the stop button there's logs there as well there's logs if you wanted to oh right next to the road you can sat it says cancel rather than stop okay Jacob another issue let's stop the deployment it's canceling roll back it's not rolling back it's just canceling the time to deploy kill it okay anyway I'm going to deploy again this part actually when it works is actually quite fast because all it's doing is reading out of a docker registry and deploying a docker image the part is when it works yeah so that's the old one that we cancelled no this is the one that we cancelled it's kind of hard for me to show the demo if mine doesn't work I'm glad the engineers are here Mike left before this right of course he did but anybody else's going to turn blue or are you facing the same issue I am so just don't do anything yet until we figure out how I'm going to fix mine every month yours is up okay anybody else is up who's not up you and me and you same issue no I'm in front of you the guy with the eyeglasses you're not as up and it looks like mine your page is refreshing awesome okay so I'm going to walk you guys, I don't want you guys to wait for now Mikel I give you permission to do whatever you need to do to make mine work looking doesn't really help so much I need you to fix it exactly should I just read it should I just read it anyway I want to keep you guys going so the next thing that we're going to do is we're going to actually and I can do this hopefully the next thing I'm going to do is I'm actually going to go back I'm going to click on the top right for those who actually have it working you're going to click on the top right and you're going to say add to project and you're going to say Mongo for today we're going to pick MongoDB ephemeral what it means is do you know about persistent volume claims in OpenShift? everybody kind of knew about OpenShift we're using Kubernetes under the hood in Kubernetes the systems administrator makes volumes accessible to the developers that's called a persistent volume when you spin something up you can ask for a persistent volume claim that claim when you say ephemeral that says make a claim to the disk space in the docker image docker images are immutable so if that image goes down any data that you had stored in the ephemeral one will go away if I said persistent it would actually attach to one of the persistent volumes that are available and store the data there for today we're just going to store our data inside the docker image so if your docker image dies or you restart it the data will go away so click MongoDB ephemeral you can name the service so the database schema name service name is MLB parks so are you sure? I think the service name is MongoDB grant I like grant was raised by wolves though that's why it's not working so here's I'll look at grants yeah it's just called MongoDB so you're just going to leave that name alone on grant was raised by wolves or whatever you named yours oh it's running did you fix it or did you just do it automatically I just I just scale it up fixed itself self healing self healing nice we did that on purpose to show the self healing properties on OpenShift 3 so leave it as MongoDB we're going to have it generate no, Grant did you set the username and password? no ok so then just leave it alone the Mongo user is MLB parks so change the username to MLB parks do you remember what the password was? MLB parks the database is going to be MLB parks as well what? oh it doesn't matter because it'll make a database on the fly the admin password doesn't matter let it generate it if it's empty there's nothing in the JSON template behind the scenes and so what you notice how this is generated if empty it says I can fill this in and provide it, everything is MLB parks won't you go to the next page? this should remain MongoDB everything else is MLB parks and you don't have to worry about the administrator password that will actually generate some random password that we don't actually care about because we're not going to use it but for everything else it's going to fill those values in and we don't do anything with the labels so go ahead and say create so if we continue back to the overview again how do we get rid of this one? delete not delete it and this one should actually be relatively quick almost by the time you get over the blue should come up is that true? anybody? did it come up or ready for you? since you're the only one brave enough to answer usually did it already work for you? yeah it didn't work for me what happened? okay so now we have a Mongo database running does everybody have that? no? what happened on yours? yeah it looks like it could be waiting for resources if there's already all the pods are already allocated it's waiting for enough memory to be advanced it could be waiting for the Docker image to get to the node that they're on the other thing that happens here because we're the first ones really using this cluster what happens or do we preload this with all the Docker images? it should be pre-populated but I don't know what's going on I've used this environment in this morning's workshop and I bet somebody scaled up like two or three hundred and I'm monitoring the pods in the nodes every node has like less than 30 pods so we have 15 gigabytes of memory we have ACPUs per node we have a capacity of 100 pods per node and on all nodes it's from 2022-2009 I've got a backup server as well but the resources aren't there so I'm just going to keep going forward sorry I apologize in advance for this so let's just keep going for those who do have it up you're going to be the last man standing you should get like three scarves I can give you something else that has nothing to do with anything that you actually did but just because you got lucky so if I actually now go to this pod for the I have to actually change something though what happened is when this one gets restarted it's going to actually automatically pick up some environment variable names for the MongoDB stuff what Kubernetes does is for every service that comes up it automatically and all the other running pods will insert environment variables for the service what it will not insert though is the username and password and so I now have to go into this is where I should bring up Grant's tutorial see it's something about it on your laptop the internet because it's really fast here we're going to have to insert these environment variables in the admin password doesn't matter though we're not going to use it oh no Grant we do use it the math app uses it no I don't think the math uses it I don't think it does okay let's just try it without it what we're going to have to do is insert these environment variables so when you want to insert environment variables into a service or a set of pods you need to do it at the deployment config so we're going to go ahead and do that now and the way we're going to do that is I'm going to go to my oh I finally cleaned that one up I'll tell you where I'll show you I promise to leave it before I sit safe so we're going to go browse to deployments we're going to go to the MLB parts deployments because we need to put the user names and passwords available to the the Java code and what we're going to do is edit do I really have to edit it raw use the CLI yeah I know I'm going to need to make this bigger is that good? yeah Mark the problematic application was my that was me that's yours? is the failing one? yeah it works it came up before what? okay so you see this where it says ENV did everybody get to this screen who's following along you scroll again I'll get there again you're at the deployment you're seeing MLB parts deployment you say these three dots on the right side are you finally up in the black shirt? I don't see MLB parts so go to browse again deployments I have the same issue I don't see MLB parts oh you named it Mac I think maybe in our case actually you should only have two deployments yeah pick the one that's not MongoDB okay did you fork the repo and change the name or something? no I forked it but I didn't change anything I love this whatever the one that's not MongoDB open that deployment then on the top right over here you'll see do you see them? click on that and say edit what now what? okay it should open up a YAML file is everybody looking at a YAML file like this? anyone else need help? no everybody's got a YAML file? okay you're going to scroll down in the YAML file you see this ENV where it says like OpenShift OpenLadles application equals MLB parts I didn't have it before can you scroll up just slightly so they know if they don't have an environment this should be part of the container spec you should see this look for the big long URL this is the three internal one and that's the Docker image right? it should be past that where it says ports it's always going to be in the exact same line number I'd like to put money on that one suppose according to the engineers you should be able to get to line 61 and that should be the ENV is that true? you're buying my Xperia tomorrow it's different labels though these are not the right names these are fine we're not changing these leave those alone don't change anything did anybody change anything? I have him adding an ENV section because he has no ENV section how does he have no ENV section? he did in your MLB parts one or whatever it was I have this I have this Steve just have him use the command line tool I have the instruction but then they all have to download the command line tool the hands-on part of this lab is officially now over you're going to watch me watch me do it on the stream and be impressed by how smooth and easy it is okay everybody ready? add some environment variables is that dash needed actually? you can just go there and add yep yes so you hold me wait what am I in? Grant was raised by Wolves oh I'm in MLB parks that was my fault there's the stuff so there's the name of mine which is your is called whatever I'm going to that deployment that's it I don't know you yet we'll see fine should be absolutely no environment variables anywhere in it how can that you didn't add any I guess I took Grant's code and used Grant's code directly where did Grant's come from I think he adds them in his he doesn't add that coo ping stuff and all that no no where did those come from love this stuff love my job java template it's from a java application template that's what we used as well application template doesn't know that you need manga I have the same problem I'm going to ping all the projects for users 10 and out just to ping other resources because the online the hands on portion of this demo is now over you can add in so it should be right here right I'd put it right above ports and just follow the same structure as ports that's what I was thinking too this it put me in the wrong spot really I love this typing it's YAML too right so indentation matters do you see where my cursor is can you see my cursor yaku do you see where my cursor is now watch when I start typing this is so actually the entire part of me showing this interactively is now done I'm going to go to Grant's demo that's actually completely running in finish and I'll show you what was in there you can just this is actually editing the YAML file how much more time do we have left can someone do a time check for me how much 30 if you guys want to follow along I think everybody has an MLB part inside of their users do not take a picture of this so if you want we're doing a panel tomorrow in the last session so you want to be a developer evangelist and then we're probably going to ask a question what was your most embarrassing moment on stage this will be in my top three 20 minutes I'm going to go back to the overview I'm going to go back to the project called MLB parks this one's already done and it's running for you but everybody has it I think everybody has an MLB part on the screen please you can jump right to deployment I'm going to go look at that now this is the deployment for MLB parks and there's going to be something if I actually look at it now there better be okay there you go which one did he use he hasn't gone all the way through so what we're going to actually do here we're editing it the MongoDB user that is awesome I can't use the should I open it, it's in Firefox should I try it in something else you guys test more in Chrome I should use IE where's those dotnet guys these dashes which dashes it should be in the MongoDB server there's a YAML file here let me just show you something if we go back to the MongoDB YAML file right and if I look at the you should be in the application that was the one I was telling you to be in but if you look here there's environment variables does everybody see those environment variables this one if you look in the MongoDB one this one he just he used the raw ones that were generated and he must have copied and pasted whoever did this but you'll see this has some environment variables if we had been able to do this properly and I was able to demo it we put the terminal into the MLB parks pod right so if I go to pods and I go to the MLB parks pod and I go to the terminal and let me see if I can make this bigger can you guys see that now in the back and I do ENV grep, Mongo if I had done this before I had set the environment variables in the application deployment config not in the database one but the application piece the ones where it's you would have everything the port the host but you wouldn't have the username and the password Kubernetes handles injecting the service IPs and ports and all that stuff but it has no concepts of usernames and passwords and all that so that is why we needed to go into the deployment config for the application and say hey you know what you need this environment variable for the username, the passwords and the database we're going to put those into the deployment when we save those changes it would restart it would redeploy the pod for the application and then insert the environment variables the way it did here does that make sense kind of Kubernetes can handle how things get plugged in together but it can't handle the pieces about usernames and passwords so we need to manually go in insert those environment variables to restart the pod and then once you do that your application should look go back to the if I go back to the overview it should look like this how much time do we have left 15 minutes I'll walk you through the code now which was the part I was supposed to do this part was supposed to go incredibly smoothly and then we could have spent our time looking at what the code did okay so here if I go back to the git repo okay so here I'm in the git repo actually it turns out if we really wanted this to work right there's actually the JSON file in the git repo this JSON file here this defines an entire application it defines the pods you guys fix it either whisper or wait until afterwards I don't care right now no not you Maric I'm not talking about you actually is the same as that YAML except for the entire thing right so it defines the services it uses parameters for the application name there's the route, there's the image stream there's the bilkin figs it does all that stuff you just run that JSON file and it would spin up that entire application so in the future if you want to see the whole application working that's a good way to do it now in terms of the code let's go ahead and look the code so I'm going to start from the beginning which is the database and if I go into here you can see so this is using the java driver for Mongo actually has its own connection pool I don't actually need to set up its own connection pool so basically all I'm doing here is I'm loading the Mongo class once and then I'm going to inject it and I'm going to hold it in the application context and then use CDI to inject it whenever I need it okay so here after I create this object I'm actually loading up the usernames and passwords in the host if they're in environment variable I load them up and assume it's on local host everybody got that you see what I'm doing there there I'm basically from the container I'm going to say hey go give me these environment variable information and I set it in my code and then I basically go ahead and look here we are the scope of the object we get the DB we already knew the DB was MLB parks and this is the interesting part he's calling init database what he's doing in init database is he's checking to see if the park collection already exists right so he's saying hey get the collection teams if the park list collection is less than one that means there's nothing in it that means we actually have to load the database and so what he does through here is he actually is pulling in the JSON file and then sending that directly to Mongo to insert all the objects that are in that JSON file looks like this so he's got the name of the team their payroll, the ballpark but then if you scroll over a little bit we are not doing it the right way we're actually doing it 2D we're just saying coordinates and then we just insert the coordinates in so everybody see that? that's all the JSON is if we go back at the end of this it's all finished all the teams are here it says another team is imported and then he's all done so now we've got the database loaded now we actually need to make the web services so if we go back up one more class go to MLB parks here's the rest interfaces so this is what Jax RS allows Java developers to do we're basically saying anything that comes into the server it's URL slash parks gets handled by this class then we're saying inject the database remember I said I wanted to be able to inject it wherever I'm using it so I'm injecting it here so now I've got the database connection and so this method will get called so it's saying when somebody comes in for parks it does get collections and it basically pulls back the entire collection and returns it to and it serializes it out and it returns it the other one I want here is get within so here we're going to use the intersection query from Mongo to get everything from the mounting box so if there's a get to the path parks slash within it's going to call this method everybody get how that works so with a URL the Jax RS router says hey if something comes into slash parks slash within call this method and it's expecting that there's going to be 4 different query parameters lat1, long1, lat2, long2 this is obviously not production code because what am I not doing here exactly I basically just assume you know what you're doing and you're passing in the latlongs that are expected okay and then what you're doing is you're making so here's the you get the parks collection and then in Mongo what you do is you make objects to make the queries so I'm making an object I'm making a list to make the box and then to the box list I add one corner in the other corner so basically what I'm doing is I'm making an array list that has two points in it one corner and the other corner and I'll show you where I get these corners from when we get to the leaflet code then I say box query, put a box and then I'm putting the array of those two corners so we're doing a box search with those two corners then I'm doing a spatial query put the coordinates equals to the coordinates coming in within the box query so I make a box then I say here's the spatial query that says where the coordinates are within the box query then it's just a normal Mongo search which is Mongo fine and I pass in that query that I've made and that's just going to return back all the parks and then we'll send that back to JSON everybody got that? that makes sense? I'm sending in two pairs of coordinates I create a box from that I then say this box is my spatial query and I want to find everything within this box it's basically what I'm doing in that code and then that just returns a bunch of JSON so the part that now handles all that is the I don't know it's going to be here in here can I make this one font smaller? tell me if this is okay still is that still okay in the back? yeah? okay now we're doing leaflet we're done with all our Java code we're done with all our Mongo code how do we display a bunch of JSON objects? so the only thing that's required I think there's actually any of the script links in the top the script link that I think is in the bottom no? where do I load it up? there right here the only thing that's required is we're going to load the leaflet JS so it's its own Java script library I'm pulling it from a CDN you can actually put it on the local machine if you want the only HTML is these two elements div1id and then the div that's called a map if I highlight it does it make it harder to read? yes? okay is that better now? is it yellow on the top? so basically what I'm doing there is I'm making a div that I'm giving a title to called map and the reason why we need this is because we need to be able to plop a map into a container that we can map into on the page so here we go let me find it so what we start what we start up with is we define a center point which is the center of the United States we set a zoom level so in most new web maps they have predefined zoom levels so we're setting the zoom level to 5 which is basically the entire extent of the United States okay? then we say hey we're making a map so L stands for leaflet map is here what container are we putting it in so that refers back up to this map the ID back up here everybody got that? we're basically saying what container to put that in and then we're setting the view we're saying it's center and the zoom level so now we've defined inside of that container we have a map, here's a lot long and here's the zoom level we want it yet though we want the tile layer to be underneath of it so we make a tile layer this is the well known URL in leaflet to represent tile layers coming from open street map coming from lots of places actually now we're setting on this map the maximum zoom level I can go in is till 18 and here's the attribution that I want you to put on the bottom right hand corner of the map so now we've made a tile layer and we add that tile layer to the map so if we stop right here this is what we get when we didn't have any pins on the map that's all the code you need to produce a slippy map that you can move around and zoom in and zoom out and center it in places but we want pins on the map right so what we do here down here at the bottom we say map when ready get pins, map on drag end, get pins and map on zoom and get pins so when I first load the map and if I drag or zoom call this get pins function and this is what get pins looks like get pins is very simple map so I'm talking to the map again, get your boundaries and what that returns is the bounding box actually visible on the screen which is then what we feed back into WS parks within, remember we needed WS parks so all we're doing is saying hey map tell me your boundaries so I can pass that in to the rest call on the back end so I do that and then I say that's the URL and I say I make an Ajax call to my rest service get URL and pin the map is what I want to be the callback and it's going to be in JSON format right that's simple jQuery everybody good with that so far have I lost everybody already kind of no, we're good we're almost done I don't know what this is because I'm ignoring that that's him dealing with dollar values and stuff not important only if you want to display terms yeah, which I never do because I don't care about money the function but remember I said on the callback the function is pin the map the first thing we do is we have a marker layer group that we remove so the marker layer group is a place where you're going to put all the markers on the map right so if it's already there if it's already there I want to clear them all out because I've panned or zoomed the map and I don't want to end up putting multiple layers of pins again and again all over the map I want to clear the one that's already there then remember the callback this is the data that came back from the callback I'm going to loop through it make some pop-up information some more pop-up information and then I make a marker and the marker is actually what is the pin so I give it a position I give it the x and the y and I bind the pop-up information to it so for those of you who finally got it did anybody finally get it to work I'll show you in a second or can I show you here did I already get it running no I never got it running either but you can have it running put it back to the bin oh yeah it was running I remember now if I click on this this is the pop-up information right so we bound that to the pin so that whenever you click on it that's what shows up there's a ton of other things you can do with it in leaflet and so then finally after we make one of those markers for each pin we put those into an array right so we're saying in the array list with that marker we take that array list of markers and we add that to the map and then automatically knows to just display them all and that's it so I know it took me a long time to talk through it all but if you actually look at this to add pins to a map that's actually not much code this is just an Ajax call this is just setting up the map these I don't know 10 lines is all it needs to put pins on a map with the pop-up information and still respect all the zooming around and all that other stuff so if I go back to my slides spatial is easy not necessarily with the open shift part thrown in but if this was in other ways it's really easy it's so simple even a marking person can do it so how many of you actually work at Red Hat who doesn't work at Red Hat okay so you won't know who Gordon is but Gordon is one of the people at our company who talks to analysts so he's pretty imagine if you think about people who speak to analysts they know nothing about code and they're usually pretty high level he wrote this app with that same infrastructure so what this is is river gauge stations around Boston he works at our Massachusetts office he likes canoeing and the United States Geologic Survey publishes feeds of all these monitoring stations on rivers so if he wants to know hey I want to go canoeing how's this river over by North Reading doing it's at 1.61 feet 28 cubic feet per second at that point in time and they actually put in a link to the river gauge information on the USGS site and he did that in about a day for a non-technical person people have actually taken this template of his application and like in Spain they've produced a map of all the national historic trees apparently there's big old trees in Spain and they care about them enough that they've mapped them all and they have a database of it and if we did that in the United States some hooligan would go out and kill all those trees almost immediately but in Spain that's apparently not the case you can make a map like that for almost anything you want to do do you talk about the template yes right guys I talked about how there was that JSON file that defined everything in the application and you didn't have to do all those steps manually when you want to do this yourself this instance you have your own instance so the doc I didn't put that in there because I wasn't I know I'm going to give it to you hold on here it is this is our roadshow information hold on I don't want that this is our roadshow slash what slash not roadshow slash dev comp there's a new version if you want to use the all in one vagrant image that Jorge was talking about or that you can download from openshift.org slash vm you can run through this using this training material except I don't know can you use the eap one I don't know if we've published that one and this should work with the ordinary you can use the eap file fly I guess no that was a good question you're saying this should work with are you talking about online the current version of online is running v2 so the version I do too there's a ton of repos of this and my repo is better because it doesn't do parks it doesn't do baseball it does national parks it does run on the all in one but the thing that you wanted to know the repo if you actually just go to not that but this and instead of saying it's just j e e map is it j e e maps no it's not j e e maps it's j e e map that is the example for v2 without the v3 and that one every single time yes did the v3 work flawlessly every single time until today yes we did a bazillion road shows using origin v I mean a OpenShift Enterprise 3.1 what and it worked flawlessly at every road show but there's something very interesting going on today no it's actually been released there's OpenShift Enterprise which is where you can install that on your own cluster either on Amazon or whatever and that's actually released GA you can pay for it and get support and all that other stuff online will be online later this year we'll be moving over it's not in development though there is a development version which is called origin yeah the migration part will be fun any other questions there's spatial data there's spatial maps Steve probably knows a lot more open source ways to get it but I always need actdata.com actdata aggdata they have the JSON data set for anything you could imagine they're like $20 for a full list what's the redistribution rights on that data I don't know so you may not be able to do any analysis with it you may not be able to check the right time thanks everyone sorry you have a very good damage control thank you at least you're on the wired network I've been fighting the whole weekend so far halfway through your talk I've been fighting with that as well