 All right, we'll go ahead and get started. How many people are actual developers in the room? Cis admins? No Cis admins? One Cis admins. Is that you, there is your name for Cis admins or developer? Oh, okay. No Cis admins. All right, great. So my name is Grant Shipley. I am a developer evangelist at Red Hat. I've been at Red Hat about seven years before Red Hat. I worked at another small next company called Novel on this, who's the operating system. And before that, I worked at a company called SCO, SCO, some people call in Santa Cruz Operations that had a unit here at an open server operating system. So I've been a Unix and Linux guy in my entire career, which has been about a great 17 years at this point since I graduated college. But you don't really care about me, so we'll move on. The slides aren't a little off-center, just a little bit because of the projector, so I apologize for that. So today what I want to talk about is developing mobile applications using MongoDB as the back end, all hosted in the cloud. Okay, a lot of buzzwords can be associated with that. But for you to understand the talk, I do need to take a couple of minutes and just go over some background information. Has anyone actually heard of Titanium Studio before? Okay, about four people, five people. So I started developing mobile applications when the first iPhone came out, which was on the Edge network. This was probably, I guess, five years ago at this point. And I have been a Java developer my entire career, and when I decided to develop iPhone applications, it was really hard for me because I had to learn Objective C and I haven't used C or C++ since my college days I went to university in Tennessee and I had to remember a lot of things that I had forgotten. Like when you allocate memory for an object, you have to de-allocate it. Are you gonna have memory leaks? I had to learn the Xcode integrated development environment. I had to learn to use the profiling tools because I don't care how great of a developer we think we are. If you're developing native mobile applications in Objective C, you are going to have memory leaks that you're going to trace down and try to profile and get fixed. And so, the first iPhone application I wrote was called Siding Time, and it was pretty popular back in the day. And it's a sign language application that teaches toddlers how to communicate via sign language before they can actually speak. And so, as a mobile developer, I knew that I could not create creative content that people would actually care about purchasing an app for. I just knew that I could. And so, I actually partnered with this company, Siding Time, and we did a split revenue sharing model because they had all the content, they had shows on Nickelodeon, they won any awards for the thing and mobile development was getting pretty hot. So, my idea was I'm gonna go around with companies and I'm gonna pitch to them that I'll write their application for free and get it out in the App Store and then we will do a 50-50 split of revenue. And so, for every dollar that I made, I would give them 50, no, I wouldn't. For every dollar I made, I would give Apple 30 cents and then we would split the remainder. And that worked out pretty well for me. And then I had this other idea that, you know, you're still capped by how many people are willing to pay for your application. So, I said I'm gonna go around to these companies and I'm gonna pitch them an idea that I'll develop their application for them, no charge, and we should give it away for free because it's a marketing effort for them, but they have to pay me five cents every time someone downloads it, right? And so, that's another model that I chose. So, the applications that I wrote, I was a pure objective seed guy. Let me log off of IRC as I'm a total developer because I'm still on IRC now with that. Start the presentation back up, I'm sorry about that. And so, to write that first application took me two months, working 40 hours a week. And then because the application was pretty popular, the company wanted me to write it for the Android SDK, which Google released a couple years later. And I was just doing this in my spare time and I didn't wanna spend the extra time to maintain two code bases and two code strings to learn yet another SDK to publish on Android devices. And I never did it, okay? And so, a couple years later, I thought I just signed out of that. Maybe it's a video memory buffer, I don't know. But a couple years later, I heard of this company called Accelerator who has a product called Titanium Studio, it is open source. And you can write native mobile applications using JavaScript. A competitor to Titanium Studio would be PhoneGap. A lot of people probably have heard of that or Cordova, Adobe just bought them about, I don't know, eight months ago. And so, they're very similar. I'm not saying one is better than the other one, I just chose to use Titanium Studio. So it is an Eclipse-based IDE, it's open source. You can build and test your mobile applications from right inside of your IDE. You can set breakpoints and actually debug your code on the device and emulators. And it gets compiled down to a native executable using Xcode for the iPhone or the Android SDK for Android devices. They also support laggering, but we all know where that's going, right? I mean, people are using laggaries anymore. They are backed by the company Accelerator. Accelerator makes their money and why this is open source is they actually have a marketplace to where developers can submit their own models for you to use. If I was wanting to write an iPhone application or an Android application that scans barcodes and look up information, I could write that myself. It would take me a long time. Or I could just buy a barcode scanning module through the Accelerator marketplace. It's like $4 a month. And just integrate that directly into my app. Yep. Are there limitations to this approach? Absolutely. You wouldn't want to develop graphics, intensive game or application using Accelerator and typing. So it's because it's more like content-centric. Yeah, I would recommend using this. Even though Accelerator says you can use it for everything, even including Angry Birds if you want to write an app like that. I personally use it for productivity-based applications and not games. Is that, I hope that answered your question. Yeah, okay. But Tycachmium Studio is actually all JavaScript. It's not really HTML5. And I'll show you some code and say we'll walk through an application that I wrote. So the next bit of background information is MongoDB. Hopefully most people have heard about MongoDB, but it is a perfect fit for mobile application development in Tycachmium Studio. So what do I say then? MongoDB is a document object store using JSON. And because you use JavaScript to write these mobile applications, you can just send the JSON object down to the mobile device without having to basically do anything with it. And then just JSON.parse it on the inside of Tycachmium Studio. So it alleviates all of those, used to be concerns for me using my object relational mapping software like Hygremate or something like that to get a dataset back, map it to objects, package it up in JSON send it across the wire. And so it saves developers a lot of time in order to do that. And obviously MongoDB is actually built with scalability and performance and high availability in mind. All right, the next part is cloud computing. Yeah. So I asked you this a few minutes ago. Isn't doing a lot of practice to actually have your data entities to actually get all the information that you have. There's a lot of data that can be very internal to your system and you can not want to expose it. So you want to be a mapping virologist, right? Yeah, sure. When I was talking about mapping later, I was talking more of like mapping results from like a traditional relational database into objects and then passing that across the wire. But yeah, you're right. Like if you have a huge document and depending on how you have your data schema for lack of a better word defined. Yeah, except for lack of a better word. You may want to do some modifications to the JSON document before you pass it back. Absolutely. All right, the next part is cloud computing. So everyone's heard of cloud computing, right? We all sit in our cubes all day long. Our manager, our CIO comes by and says cloud, cloud, cloud, cloud, cloud, cloud. We have to move everything to the cloud. We got to move to the cloud yesterday. It's the future. Why aren't we there yet? And there's all these promises around cloud computing and it's all just a bunch of BS. It's all just a bunch of hype, right? But there's some very real benefits of using cloud computing. So cloud computing is not gonna solve all these problems. It's not gonna save the world. It's not gonna fix your terrible code or my terrible code. And hopefully you guys have seen this commercial by a popular bidder where there's a family sitting around looking at vacation photos and they're not very great photos and the wife says to the cloud and suddenly the cloud fixes these vacation photos, right? So, you know, there's a lot of promise behind the cloud and it reminds me of the Gartner hype cycle. Has anyone seen this before? So the Gartner hype cycle is a graph for any new technology that comes out. And it basically says that when a new technology comes out everyone's gonna be talking about it and it's gonna solve all of your problems. And then people realize, well, it's really not. It's just a bunch of hype but over time they start to see some real benefits to it. And then the second curve is where people actually started talking. We went through this as an industry not too long ago with virtualization. Everything we heard about and read about as an industry was virtualization. We're only getting 50% server utilization. We've gotta get up to 100% for whatever reason. So virtualization, virtualization, virtualization. That's all we heard about. And today we don't really, you know, talk about it that much because we're basically all using it, right? Most data centers are virtualized. Amazon EC2 is a virtualized environment. We're using virtualization even on our desktop to take snap shots of our development environment. So things like that. And every technology goes through this and this is what cloud is going through right now. It's at the top of the hype cycle in my opinion. But there's actually three parts to cloud computing. So if someone comes up to you and starts talking about cloud computing, unless they're talking about one of these three areas, they have no idea what they're talking about in my opinion. And the three areas are infrastructure to service, platform to service, and software to service. So the first piece is infrastructure to service. The most famous infrastructure to service is Amazon EC2, has everyone heard of it? Anyone not heard of Amazon EC2? Okay. So Amazon EC2 is probably at the far right because it seems half the internet is using Amazon EC2 today. When they have it mounted, like they did a month ago in their US East availability zone, probably an hour went by and my cell phone rang and it was my wife. She was like, I think you forgot to pay the cable motor bill. I can't get on Pinterest. Like what? I forget to pay the cable motor bill. What are you talking about? And then my son calls me when he gets home from school and says, hey dad, I think you messed up the computer. I'm like, what are you talking about? He's like, I can't get on Netflix. I can't watch Netflix. And so we're, as an industry, almost dependent on Amazon EC2 and infrastructure to service today. A lot of the big players, Netflix included Heroku, a lot of people are on EC2 today. And we can say whether that's good or bad, Amazon at this point probably has more control over the internet than we ever thought any government could possibly have, right? They basically own a good portion of it. And so there's some open source projects that we should look at as an industry and some competitors. Google just announced their Google Compute Engine. VMware just announced an infrastructure service as well. And then in the open source world, we have open static, eucalyptus, cloud static. So there are some alternatives. You just have to look and see what best fits your needs. Did you guys see they just announced Glacier? Yes, they're like, that is really cool stuff. So Glacier, not to sidetrack too much. And this is not a cloud talk. I'll skip on a second. But Glacier, they're basically allowing people to store long-term data or backups or whatever data. Similar to S3, data objects. A gig costs one cent, one penny per month, a store, right? How much is S3? S3 is quite a bit more expensive. I don't know the numbers off the top of my head. But I know I pay about, I think it's like $21 a year for my S3 storage and it's like two or three gigs just that I back up my pictures on maybe it's five. And I can do the same thing with Glacier for like, I think less than a dollar per year, right? And it's redundant. And so there's some really cool stuff going on with that. Sorry to sidetrack on that. So that's infrastructure service. That's a very common software as a service. Real quick, this is when you have no control over the infrastructure or the applications. The most popular ones are Google applications like Gmail, Google Maps, that software as a service for businesses like Salesforce.com. How many people are using Salesforce.com or want to admit they're using Salesforce.com? Really? Are you guys just kidding me? They own like 99% of sales automation tools. But that's a popular one. And then the next one is platform as a service. That's what we're gonna be using today. And it sits in between infrastructure service and software as a service. You don't have to manage the servers or the operating system. You just have to deploy your code out. And there's a lot of benefits for mobile development with the platform as a service. Because as we develop new mobile applications, we don't know if our application is even going to be downloaded or if it's going to be very popular. And so with the platform as a service, you can actually auto scale your application. And so if it does get wildly popular, you'll be able to scale as it increases in popularity. So we're gonna be using OpenShift today, which is actually the open source project that I work on. It is a part of Red Hat, where I'm a Red Hat employee. It is an open source community project though. So with OpenShift, it is fast because we actually do run on EC2 as our infrastructure. It is free, we don't charge for it. So what do I mean when I say free? The source code is free, you can download it. And to use the service as free, including the infrastructure behind an EC2. So basically when you sign up, we let everyone get three servers in EC2, 512 megs of RAM and a gig of disk space each. So it's typically the Amazon micro instance and the Amazon small instance. We don't monitor or meter bandwidth or anything like that. And the reason we do it is just to foster open source development and to help startups get created. And it'll be free forever, we're committed to that. There's no like bait and switch that we're gonna start charging later or anything like that. It will be free. So it is fast deployment and we'll do that today. We'll spin up some servers for our mobile application that we're going to work on and create all those scalable applications. So what can you write your back ends in? Pretty much everything. The only language we don't support is .NET for obvious reasons, because we run on Red Hat Enterprise Linux. I guess you could get mono to work, but we haven't put any time or effort into that. So all the big players in town like Java, PHP, Roombie, Python, Perl, Node.js works out of the box. We support all the frameworks on top of that for databases. We are huge partners with Tengen, MongoDB. We feel like we have a great place for people to try out MongoDB, get it all out of running, instead of having to download it and install it yourself, download drivers for your language and get everything set up. And we can spin up some Mongo databases as well today. So when we were developing this, and it's been around for about eight or nine months now, we wanted to create an environment for developers so that they can work the way they wanna work without having to worry about system management configuration. So we do have plug-ins for your IDE. We have REST-based APIs. We work with a lot of the public cloud IDEs like Cloud9. Have you guys heard of Cloud9? c9.io? You should check that out. It's really cool. They actually use OpenShift for all of their back-end services as well. If you spin up application in Cloud9 to use their IDE, you're actually using OpenShift without knowing it. We have command-line tools. You can then have shell access into the servers, and we do everything via Git. All right, I'm almost done with the marketing slides. I promise I hate marketing slides. MongoDB is actually really good on OpenShift. We get the largest free MongoDB instances out there. You can create these, and we have Mongo2.0. We don't support 2.2 yet, but when that's GA, we'll support that. You can take snapshots of your database. You can do log-telling. We have RockMongo. Have you guys used RockMongo before? It's like a PHP MyAdmin type of administration web tool to administer Mongo databases written in PHP. We obviously allow you to use MongoShell, and we tie in directly with Tengen and their MMS support. So if you want to monitor your database, you just say you do, and then you can log in to their MMS dashboard and look and see how your MongoDB is going. So like I said, OpenShift is completely free. It's open source. If you want to sign up for it, you can. Just go to openshift.com. I did create a promo code. If you want to use it, it's no simple noun. And if everyone stops by the booth that I'll be at, I'll give everyone a cool, let's see if I had one, a USB bottle opener flasher, right? I think I'm right. And this will make a lot of sense to you when I show you the app we're gonna talk about. Maybe, all right, here it is. Stop by the booth. I'll give you one of these after the talk. They're metal, very sturdy, four gigs. They're blank, so you get the trouble of formatting them. Now the thing is, these open beer bottles very well. I've opened hundreds with this little guy. I haven't put a single document on it, so I don't know how well the file storage capabilities are of the bottle opener, but I'm not too worried about that. So stop by. So that's the background, so let's put it all together now. We're gonna talk about an application I wrote just for fun that is on the app store. If you want to download it, it's called Bearshift, okay? The reason I wrote Bearshift is I was going to Belgium, I guess about four months ago, and I enjoy drinking beer. Obviously, if you can't tell if I look at it in that man, I probably drink a little too much, and I didn't want to look like a tourist over in Belgium going into a pub, ordering a beer, and having no idea what I was ordering. So I was talking to some of my friends, and I was like, you know what'd be cool is if we wrote an app where you could type in a beer name, search for it, read about it, who brewed it, how much alcohol content it was, and they're like, yeah, that'd be cool, you should do that. So they're like, okay, I'll go do it. I wanted to learn Accelerator anyway, so I said I'm gonna do this. So I spent a weekend writing it, and then I met my friends again and their software developers, like we always do, were really excited to show off what we spent all this time on, and every single time that happens, they're just not satisfied, right? So I went and I met with my friends, I'm like, here's the app, it was pretty cool, and they're like, yeah, that's kinda cool, you know what'd be better, is if I could track that I drank a beer, track where I drank a beer, look at where I drank it on a map, see what my friends are drinking, rate the beers, see what everybody around me was drinking. And so I'm like, okay, fine, so feature creep started setting, so I went back and I added all of those features, and so that's the app we're gonna look at today. It's called Beer Shift. And so I'll exit out, and I'll start up my IDE. Can you guys see the source code, okay? Good enough. So I'll show you the application real quick, and then we'll spend some time walking through the source code. And this is not going to work because I have the wrong endpoint in here, so let me fix that real quick. Let me reset my device, so that it caches the endpoint, and then we'll recompile, and then we should be good. And I'll also start it in the Android emulator, so you can see that the same code base runs natively on all devices, okay? The Android simulator or emulator does take a bit longer to get started on my machine, so we'll come back for that, okay? So here's the application. The first thing it checks to see if I already have a username and password cached on the machine, but because I just reset my device, I do not. So I'll go ahead and log in here, say OpenShift, I'll type in a bad password or not. Let me reset it again. These emulators are very finicky, I'm sorry. I switched my servers around so much when I'm coding, so one second. And I promise we'll be good to go. So all of this source code is available on GitHub. It's open source, if you wanna download it, muck around with it, get started. I also have a blog post series that I wrote that's basically how to get up and running with mobile development, MongoDB, and Titanium Studio. If you wanna read that, it's on MongoDB.org. It's on at AppCelerator.com and on Red Hat.com. You can read it in any of those places. So let me log in here. There we go, now we're in business. Sorry about the hiccup there. So when you first log into the application, you get dropped to the search screen. So you can search for a beer. So let's search for Westmall, which is a German beer, or not a German beer, a Belgian trappist brewery. It's a Belgian beer. And so these are the beers that either contain Westmall in the name or is brewed by the Westmall brewery. And so when I click search, that actually made a REST API call up to the cloud, Opachift in this example, and returned the JSON document back to me. So then I can click on a beer, Westmall trappist triple. I can read about it. I can select to drink the beer. It'll add it to my drink tab. I can click on a beer and see when I drink it. I know it's black right now. I'll actually come in and add geolocation to it in just a few minutes and we'll add a mapping component to the application as well. I'll click on kickstand. You can see what everybody around you is drinking. And that's basically the app. It's a very simple app. So let's go through and look at the source code. Actually, we only have 20 minutes left. So you guys tell me, do you want me to go over the source code for this application? Are you more interested in spinning up some new cloud servers and switch the back end out for this? Let's start with the fresh Mongo database. So whoever wants to walk over the source code, including geolocation, raise your hand. One guy, two, three, four, 50. You want me to split it? How many people want to see the server creation deployments? Okay, more people are interested in that. All right, so let's do this real quick. So you create new servers with OpenShift, which again is just running on EC2, one of three ways. You can go to openshift.com and do it via the website if you're not a command line guy. Let me log in here. So I could create an application. And this is, you know, we have these instant apps you can specify. Like if you know you want to do a spring app running on Jboss, EAP, you can select that. If you want to know you want to do a KPHP app, you can do that. Or you can specify just a language or application type. So that's how you can do it on the web. Inside the IDE, you can go file new, other, and you can create OpenShift prospects inside of the IDE. But I'm a command line guy, so that's what we're gonna do. So I'll clear the screen. Okay, so first thing I'm gonna do is create a new server. I'll do RHC add create. We'll give our application a name. We'll call it noSQL now. And the back end that I'm gonna use today is actually written in PHP. If you're not a PHP developer, I also have a Java back end and no JS back end, Ruby back end and a Python back end. So you can use whatever language you prefer. And it's all on github, github.com, slash beer shift. So I'm gonna create a PHP 5.3 application. It enter on that, I'll authenticate. So what's actually happening right now is it's talking via REST APIs to spin up a new EC2 server for you if it needs to. And it's going to create a user account for you on that EC2 server. It's going to install or configure the SE Linux policies and Linux control groups. That's what we use to give you quota and tie your processes and threads to a specific amount of memory or a specific number of CPU cycles. It's going to ensure that Apache, my PHP is installed, all the latest Red Hat Enterprise Linux, six security Arata updates have been applied. It's going to set up a private repository for you on the actual remote server. And it's going to propagate DNS out worldwide. So your application and server will be available instantly to the entire world. And normally that takes about 30 seconds. We'll give it just a second. Okay, that's done, right? So we now have a new server spun up in the cloud. No, my username, if I go into my home directory into the .openshift directory, I have an express.conf file and I set my default username. Yeah, and so we check for this config file if it's there, you don't have to pass it in, otherwise you do. So no SQL now was the name of the application week. Yes, for that creation, you do. Yeah, there's some ways around it, but we don't recommend people doing that. But yeah, there are some ways around it where you can pass in dash P on the command line and just set it as an environment variable or something like that. So there's no way. We do use SSH keys for authentication as well. It's, we do two different types of authentication. And I'll show you that. We'll SSH into the box in just a second. So here's my application we just created and this is gonna be just a stock application at the beginning. No SQL now dash on pass dot rhcloud.com you can pull this up if you want to and see that it is a real application deployed out on the cloud, out on the internet. So now we have our stock application up. That doesn't do us much good. We want to actually take our existing source code for the REST-based web services that we develop for our back end and replace this application with it. So what I'm going to do, excuse me, yes. I already have some code to move that. Yes, and it'll be this exact same process because I have my source code already out here and we just created a new server with this stock template source code. So what I'm going to do is we've created our app instead of Meershift, we called it NoSQL Now. So the next thing we want to do is add MongoDB to our application. So I'll do that real quick. And to add, to the database to your application you can do rhc app cartridge add that's in the cartridge name which is MongoDB 2.0 and the app name which is NoSQL Now. And again, you can do all of this from inside the IDE and the web browser just by clicking a few buttons. I'm just a command line junkie I guess. What did I tie from? I spelled cartridge wrong. So assuming I typed it correctly that time, what's happening now is this is the exact same thing that it did when we created our initial application called NoSQL Now, except in this case it's going to install and configure MongoDB for me. And it is a private MongoDB, no one else has access to it, it's not shared. You get the admin username and password to log in and do whatever you want with it, right? And so that's done. Now we have a MongoDB server up and running and here's my root user, root password. It created a default database for us but you can obviously create any database you want and here's the connection you are up for it. So now that we have the database created let's pull our source code in. Yeah. So can you control how many secondaries? Or how many posts get created or how many processes? I can't hear you. Can you control how many processes are running like a number of secondaries? Not today, we are working, like today with this implementation, this is a single server. We don't support shards or replicas yet. It is coming very soon. So we're going to be working on this. We're going to be working on this. We're going to be working on this. It is coming very soon. It will also be free. If you want to do a three-node, I don't know why you didn't want to charge a three-node but you could, right? Up to three servers is free. Yeah. What do you mean free? So there's no cost per host? I'll show you what free means. To use this all you have to do is come over to openshift.com, click on sign up and enter in the email address and password. Like we don't even ask for your first name. Don't ask for your dog's name, your cat's name. What kind of car do you drive? We really don't care. And we provide everything for free including the EC2 instruction on the back end. Yes. Yep. We do support people using their own domain names. So if you have MySuper, also in app.com you can absolutely use that for your application. So where do you make money on this? Where do we make money? We don't. We don't. We don't. We don't. So where do you start in charge of people? It costs us for each one of you that signs up. If you were using free service it costs us about $11 a month for the infrastructure to support it on the back end. So do we charge for this? No. Do we even have a way to accept credit cards? No. And this is typical of Red Hat's business model. We like to engage developers and get them excited about open source tools and technology. So we provided a great platform for developers to do that with the hopes that they will fall in love with how easy it is to spin on servers and want to do the same thing at their day job and their company, right? And then they'll come to Red Hat and say, hey, you guys have this great cloud hosted service called OpenJip. We want to run that internally in our own infrastructure so that the IT operations team could set up 100 servers and say, okay, developers, just go do whatever you want to do and stop bugging us. So it'll be services? It'll be support. I mean, it is open source. You can download this and do it in your own infrastructure today. But large enterprises want to pay for a throat to choke at the end of the day. And that's where we'll link our money. So there's no limit or use one for it? No. On the free hosted, you get three servers. Number of applications really depends, like, there's no segmentation or context in a lot of languages. Like, if you're doing a PHP, you can throw as many applications out there as you want. If you're doing a Java, I guess you could. The Java's more like context oriented. And so you'd have to know Jbalt's pretty well to set up the different context for your war funds or your file. But yeah, there's no limit to that. But anyway, it's just me not addressing password to sign up. All right, so let's pull the source code down for Beershift. Let me go back to github.com, slash Beershift. Beershift web is the PHP one. There's also a jQuery and Fungac version of this app. If you just hate titanium studio, I've written a jQuery one. Java API or the API. So let's pull this one down. So, so far we have created the application we've added MongoDB. So let's pull the source code down. So all I'm doing is with the first command, I'm saying add a remote source code repository. And then on the second command, I'm saying now take whatever is in that repository and overwrite what I have locally. Okay, so that's all I'm doing is pulling down the source code. It's going to pull that down. And so one key thing about OpenShift it is completely non-proprietary. We do not have any proprietary API as well. So if you have existing source code, it'll run as it is. You don't have to change it. We don't have a specific API to talk to a data store like some other companies do. We're just stock open source databases, stock open source languages and frameworks. So let me add a merge here. So now I have the source code locally. Now to push it up to my OpenShift server, all I have to type is get push. And if you're not familiar with get, it's kind of like a subversion commit. I'm just taking those changes I have locally and pushing them up to my repository. So that's done. We're waiting for my application to restart. Let's see if our Android emulator actually started. Yeah, there it is. So this is the same source code running on the Android device. And notice it does look a little different. On the iPhone device, the tabs are at the bottom. On Android, they're at the top. And I don't have an Android phone myself. I don't know if that's normal for Android applications to have tabs at the top. But I assume that's why they did it that way. It is not. I guess I should have put it out there. It is no reason why I couldn't. Yeah. Oh, does it? Yeah, maybe, I'm too cheap for that. No, I'll probably add it. But again, it's just a fun app just for people to learn how to do mobile development with MongoDB backends and stuff. And everyone's welcome to work on it. I have a lot of contributors that's sent in various source code packages and things like that, translations, because the app is localized in different languages. Okay, so our application code that we committed has been pushed up to our server. So let's hit our server again. It was called noSQLnow.johnpaz.rscloud.com. So you can see that that templated website has been replaced with my PHP application. So let's take a look at the Mongo database on that thing. So I can actually SSH to my server that we just created. And this is where we do use SSHPs for authentication. I didn't have to type in a password for that. So I'm logged into my server running in EC2. I could type in Mongo. So now I'm running Mongo Shell against the Mongo database we just created. I can use noSQLnow, which is the database that we created. I think, I'd have to look at my source code. Let's see. Show DBs. Okay, so we have a noSQLnow, but what I want to do is switch the backend out for the mobile app and then we'll look and see that it's used now. So I can use noSQLnow and do dv.train.file. Nothing there, dv.users.file, nothing there. So let's go back to our mobile app and I'm just gonna change the endpoint here to be noSQLnow-onpass.orhcloud.com. We'll save that and we'll run our simulator and I have to reset it because the endpoint is actually cached on the device and then we'll recompile the application and let's log in with noSQLnow, password of test. We'll log in. We'll say that user doesn't exist yet. You want to create it. I'll say yes. So now if we come back over to our server, if we do dv.users.find, excuse me. We should see that that user was created. So it is in fact using this now. I know the password's not encrypted. That's intentional on the production app but it is encrypted but just for testing purposes it's not so people can't see. So that's how quick it was and I can do it in like a minute flat if I wanted to create a server. So let me show you one other trick. I want to create a new application, rgc.appcreate, we'll call it JavaTest and I'm gonna create a jbossas7 application and I'm gonna add dash s on the end. So what dash s does is it tells OpenShift that I want this application to be scalable and so that changes the state of the application just a little bit and instead of just creating a server it's actually creating two right now. It's creating a HA proxy, a high availability proxy and it's gonna create my jboss application server underneath that and it's gonna load balance just to that one node, right? And so when I add that dash s that's what happens and then we actually look every 20 seconds at your number of concurrent HTTP requests. If you have more than five concurrent HTTP requests at any given time, we actually spin up a separate server for you whether it's jboss, NodeJS or whatever and add it into the HA proxy load balancing and we do section affinity to each server and then we recheck every 120 seconds and we'll keep adding servers or we'll remove them and then we wait using section affinity or sticking session some people call them for the connections to bleed out and then we actually remove it from the load balancing and the wifi fell on me but that's the difference between dash s and just creating a normal application. We don't have any time, two minutes left. Any questions for two minutes? I'm sorry I didn't go over the source code that's one of my favorite parts but there's just not a lot of time and 45 minutes to go over a full mobile application. The source code is on GitHub. If you're interested in looking at it more like I said there aren't blog posts and OpenShift is completely free to use. Yes. So you said it's open source that means I can deploy it from my own server. Yeah. With that default application of resources on ECU? No. If you want to run it on your own servers you can use any infrastructure that you want. By default we can't even provide you a ISO image that runs on top of Fedora and we use KVM for provisioning but if you use VMware or even if you just use bare metal or rev or whatever the case is we do not care what hypervisor or how you provision systems we just care about having a Red Hat Linux distribution available for the system to use and how you get to that point it doesn't matter to us. So the part where you allocate the DNS that's not part of that? It is. We actually ship our own bind server with this to handle that but if you have your own DNS you would want to switch that out to use your real DNS server that you're running or if you're paying for a DNS server. So I could still use it on ECU? Yeah. Absolutely. Yeah, and people are using it on ECU. We have EMI's which is the Amazon image available for people to use as well. I don't know why, I would just use us because we're free as opposed to paying ECU but unless you're doing large supply. So if I wanted to use arbitrary domains? You mean domain names? Domain names. I can show you real quick. So I have my personal blog which doesn't have anything on it. It's actually gshiplyonpass.rhcloud.com but it's grinshiply.com but if I go to you know ...grinshiply.com it's the same website and the way we do it is we have what's called an alias. So if I do RHC domain show which lists all of the applications I have running one of these will be gshiply which is my application name and I have a sign that alias to it ..grinshiply.com and then I go into my PNS registry and I create a C name record and point it over to this host. So yeah, you can absolutely do that. It's getting show. Sorry, where do you see that entry? Wherever your DNS is hosted. Yeah, you have to have control over it. Yeah, it's a good place. Yeah, and then you just point a C name to so my C name will be pointed at any other questions, Jeff? Does the open source version of OpenShift include the auto-conditioning set as well? Mm-hmm. Awesome. Yeah, and you can run it. I run it locally on my laptop. I mean, that's just how it works. I just send a jproxy and you send it? Yes, it has all of it up there. Yeah. Is one of these owned in different ways? You know, we actually support traditional relational databases, MySQL, MySQL, anything on how you say it, Postgres. What's really cool about OpenShift is that we also have what's called a do-it-yourself cartridge. And so if we don't support something out of the box, doesn't mean you can't use it. A do-it-yourself cartridge, basically just spends up a server and gives you SSH access to it. If you want to run MintHatch or Redis or Reoc or whatever, as long as it runs on Linux, which they all do, it'll run on OpenShift or whatever you want to call it. But for tie-ins to monitoring and management, today in the NoSQL space, it is just MongoDB that we officially support. Do you have Jboss or Tomcat for Java? The question is, does it have to be Jboss or Tomcat for Java? No. I mean, we are agnostic, right? Like, obviously Red Hat owns Jboss, so we support Jboss. I also just wrote a blog post and I have a quick start. Like, it's a click of a button. You can get Tomcat deployed out on that, Jetty, you know, whatever you want to run. It'll work. Yeah? Does it work with resource allocations? What's the end of, what's CPU around is my application? So memory, you have dedicated 512 megs around for your application. If you need more, just be knowing that it'll increase for you. It's just arbitrary limits that we chose. CPU, I don't know off the top of my head. I would have to look and see. But you are guaranteed some CPU, let's say it's 10%, but you can burst above that, but you're always guaranteed 10%. So that means that it maps to EC2 micro instances? No, not really. I mean, it's above a micro instance because what we do is buy extra large reserved instances and then it's a multi-tenant environment and we'll put, say, 10 people on one extra large. And so it sits in between a micro and I forget how big or small it is, but I know a micro is like 300. It's 600. Oh, I thought it was 300 or something. Well, maybe they changed it. So if micros are 600 or something, it's a little smaller than that. It's 512 things, I'm right. Any other questions? All right, stop by at the booth, pick up your key, just say I told you to come up there and get one. So they won't make you sign up. All right, I appreciate the time. Sorry I went over. Sorry, we need to go into more detail as well. But thanks. Appreciate it.