 All right, let's get started then Okay, my name is Alan Ho. I lead our developer relations at Apigee. I'm Sabha Parameswar I'm with the platform engineering from Piotl. I work with partners and customers and we're gonna talk a little bit about graph Databases we're gonna talk a little bit about microservices. So To give a little background on Apache user grid, which is a back-end as a service I want to talk a little bit about microservices We all know that kind of the goal of a microservice is to break big monoliths into small services But going a little bit deeper There's two types of microservices that are that you can break them up into one is business logic services And the other is data services now business logic services. We hear a lot about business logic services And creating new apps And these are supposedly our Stateless services, but what about services that need persistence, right? How can we do that a little better? Well regardless of whether it's a business logic service or a data service two things need to happen for microservices they need to be isolated from each other and They need to have an API. You don't want to have any database connections You don't want to have any like direct socket connections. They all should have a API So kind of like like kind of like the the the pensia for deployment and management of business logic services is Okay, let's just put it. Let's let's let's put some let's put a contain Let's get to lightweight scripting language or Java something of that sort put in containers and we scale up the number of containers That's kind of like the the way that a lot of people are thinking And then for data services kind of you can the question is can you extend that same approach? especially Data services that need web scale Well, so a lot of people we see is that they try to put Cassandra in a container They put a lightweight and then they put a lightweight scripting language in a container and then put the lightweight scripting language to call the NoSQL database There's a problem Containers solve nothing Right because at the end of the day NoSQL sucks and it sucks only when you're doing it at web scale This is what I'm talking about at a thousand TPS Even though it was designed for that and what are the common issues? So, you know developers are not very good at doing indexing and when you get up to You know the thousand ten thousand TPS level having the developer learn how to index their databases is very hard The second is for a lot of NoSQL databases Taking advantage especially of the you know taking actual advantage of the NoSQL database optimizing it for Parallel for parallel calls is also difficult and last but not least When things go wrong when you have latency especially it is extremely hard to debug a NoSQL database, right and Web service like microservices makes it worse because what you're doing is managing You know hundreds of not thousands of instances of both databases of these NoSQL databases And and you know for all the things I just talked about it just gets worse You're not really solving the problem when it comes to data services So, you know What's in a different approach right the different approach that Apache user grid uses Is that it's a radically new way to create a multi-tenant data service on top of a single Cassandra cluster It has an out-of-the-box API for it, right? So you don't have to stand up in another You know a lightweight scripting language in another container It has a bunch of Kind of out-of-box capabilities Especially for mobile like push notifications and as SDKs for Android iOS and JavaScript So what is a mobile back-end of service? Well simply these are Not just a data store but also out-of-the-box back-end services that are needed to build common apps So, you know, this is like geo location users push notifications Etc. And The the key of what's different about user grid is that it's open source. So who here heard about Parse Anybody heard of a parse? Yeah, Facebook shut that down earlier this year. Anybody heard about Stack mob Stack mob. Yeah, when PayPal bought that they shut that down, too Anybody here about Firebase? Google I was talking a lot about Firebase. I Don't know if Google's gonna shut that down, but if your software is not open source, you just can't afford To to have a vendor lock you in so the great and the nice thing about user grid is that it's open source So no matter what you no matter what your vendor is doing, you know that at least your data is not gonna get is not Gonna go away So what are some use cases? Well? for the case of Pivotal, you know, this is really Back in the service is really a part of a bigger story of a mobile reference architecture So you have the back in the service. That's great for storing like location data user preferences, etc You have an API gateway for managing legacy Applications as well as new services and then you also have streaming event engines for capturing things like analytics of that sort This is one use case that we have this is our customer This is a this is a customer that's using this called Burberry And they're using it for customer favorites So this scenario they need they have millions of customers and then favorites is one of those things where they have you need Scalable rights because lots of people might be adding things to favorites But you also need scalable reads and what I mean by that is you know If you have a favorite list from a famous celebrity that gets shared out by everybody a lot of people are reading that One particular or reading that one particular list They also needed an idea of graph queries as well And I'll get into a little bit more because every user has a has a list of Favorites and you know wish lists, but being able to query sub query items on that is very important But most importantly is that it's the provisioning time They didn't need to actually spend a whole lot of time Standing up another Cassandra database standing up a front a API front end to the database. It just happened automatically So I'll kind of give you a quick demo to kind of show you what it's like Before getting into some of the technologies use cases So this is the UI to it now all these API calls I'm going to be making by the UI can be done also by a command line And so to create a new application It's simply you would press a button and you would create a new application and this application is going to be isolated from all other applications Let's take a look at some of the Let's take a look at some of this data here So I type get users and it gave me a list of users I can also do searches over here, too So it's not a simple key value pair store, but there's actually indexing going underneath the hood, too Okay, so in this entity over here, you can you can put any kind of data you want You can put in JSON blobs as well And then you can also do other things too. So you can actually it supports the concept of graphs So I can I will drill down into this particular user and I can look at the activities Related to that user, too. Oh Sorry, I got this wrong here. Oh Thank you Okay So this is what what I'm showing you here is this user Jenny I've got the list of all the activities they had that she has done and these activities may include things like likes It could be including things like Put adding to cart things of that sort There's a graph database underneath the hood and you could even do sub queries on that graph So for example, I want to find all the items that Jenny had liked That's under two thousand two thousand dollars. Let's let's do that and see what happens Whoops This is a copy and paste issue. Oh two LT's Okay, so you can see here I just queried on this item and then I could see that Jenny may be a like they a camera that is under two thousand dollars. Oh This is okay, there was a little error here Okay, so let's kind of go back to show the underlying technology about it So under so inside it's a combination of Tomcat talking to Cassandra and elastic search So we use Cassandra for storing the actual data As a source of records and the reason why is because Cassandra gives you the ability to do multi data center replications And it's very very scalable with shardy And then we use elastic search for doing all the indexing because you could throw any kind any kind of thing inside And we wanted to index all the fields Having a doc having elastic search which really just focuses on indexing Allowed us to get the best of the best from Cassandra and get the best of the best at elastic search So from a graph data structure perspective You can see here we can show you know There could be an app and app has multiple users and User can own multiple lists and each list can contain one or more products So this is a very very rich data model. It's not your just your your basic key value pair data model Again it was built for web scale and I got to put a little caveat here, right? Obviously if you use hand-tuned Cassandra and your hand-tuned elastic search You're gonna get much better performance But for majority of the web scale use cases, which is in between the thousands and ten and that tens of thousands of scenario Request per second you really don't need to do any of that tuning besides your developers are not going to know how to tune that anyway, right? Okay, next part is sharding. So we've spent a lot of time Sharding the data and we started every connection at each level so that whenever we're doing any queries It's it's uniformly making queries across all the Cassandra Across all the Cassandra instances, so you're not getting this hot spot of data for a particular shard And the other part that makes this very scalable is the indexing So what happens that when we do a right to the system? It hits the Tomcats We immediately write it into Cassandra, and we also write it into a queue the queue that then we have the Tomcats asynchronously pull the pull pull the queue and read and the and read Cassandra and push it into the elastic search And so what this means is that from an eventual consistency perspective? Yes, when you for you can write very quickly and almost immediately get a response now It won't show up in any of your queries immediately It takes a little bit of time because we're doing this asynchronous indexing But for many use cases, especially web scale use cases. This is totally fine from a user experience perspective so I'm going to hand off to Sabu and talk a little bit more about how you can actually get this running on cloud foundry Welcome everyone so what we Okay, to tell you the truth. I don't really know anything about Mbass or user grade or any of that Their team came over to the industry day Wherein we had different partners come in and try to help build service blocker or applications or tiles for PCF and we were able to also accomplish The tile construction for user grade all in two days time Essentially what we did was we created a boss release that encompasses the Cassandra the elastic search and then we had boss errands that pushes a user grade application as an application to the cloud foundry and we created trial around it and In the interest of time we actually went with the Docker images of Cassandra and elastic search rather than full-blown boss So in terms of the standalone deployment what you might be having is a tomcat server running the user grid application and Separate insults of Cassandra and elastic search, which you'll have to manage. You'll have to scale up things like those And if something goes on you're on your own You need to make sure the thing is up someone has to monitor it Someone has to scale it up someone has to portion the VMs do all the stuff that you might have heard all through these days And it's not cloud native you you will have to do all the heavy lifting So with the PCF deployment Essentially the the cloud foundry portion of PCF takes care of the app The user grid app and boss takes care of the elastic search and Cassandra And now like you have a cloud native application running you can scale up Whenever you want to you don't have to worry about the underlying cloud and the VMs the health everything is taken care for you along with scale of scaling and load balancing any question so far so So this is a tile that we created What are the benefits of you are running on PCF? You basically get the four levels of HA? I'm pretty sure everyone knows about the four levels of HA You get the VM resurrection from wash you get the multi-cloud capabilities You don't have to worry about the scaling or load balancing or HA and of course there is persistence for these ones and Since we went with Docker we could do it very rapid prototyping to get the thing out In the future we plan to do a full-blown Bosch release for both doc for Cassandra and elastic search So you can provide the parameters whatever you need you can customize it and Build it to your own satisfaction And there might be also a service broker integration We already have a Cassandra service broker So we would be able to let the user grid consume the Cassandra services through a service broker rather than doing a hard-coded End-point integration. So here's the tile It basically has very few configurations exposed to the user So there is a like a user grid cluster name the administration credit and shields the SMTP server for now we had a dummy data, but This whole tile creation was like less than a day getting all the parts working together was two days two to three days and We can go into the apps manager and we can scale it if anyone wants to see that so we can say start Earlier it was with one instance. It's kind of starting up But does anyone want to see ops manager scale up the VM instances? Like yeah, let's do it. Yeah, that would take a little bit of time. So let's do that The ops manager kind of does certain other Housekeeping tasks so it might take a little bit of time. Let's apply the changes. We will come back and test it Okay That's one of the things if you skip it, it's just a Z Okay, okay, let's go back to the presentation We will kind of check it at the end of the call So this is the plan for it like depending on the user preference probably we would inverse our time and efforts to build a Full Bosch release for these two and what are the benefits? So I think I don't really have to reiterate it like All the benefits that PCF brings to the table we can because user grid is a straightforward application And we were able to use a Docker Bosch release you are able to create all this underlying Bosch releases create the tile with it and All the benefits that PCF brings to the table so we could get the user grid out there as a tile right away Probably we might be working more with Apigee for other other products to edge gateway or others in the future Okay So yeah, so I you know I would you know There's a one takeaway that one you have is that if you're building micro services and you really need to build a micro data service You don't want to be managing Thousands or thousands of no sequel databases Check out user grid because it allows you it allows you to have one large no sequel cluster But let your app developers be able to provision Data services themselves without having to go through all the pain of provisioning Provisioning no sequel or managing no sequel databases themselves And you can just get use a go go to github you can just download it from github clone it from github And try out the tile on on pivotal Cloud Foundry marketplace. We got some time for some questions Not really because almost they are on the same network It won't really be much of a difference performance might be difference, but not the network. I don't really think so But but you do you do raise a point right like whenever you're running Cassandra in it when you're running any database in a VM There is concerns, right? And so one of the nice things about running, you know running in your database on bare metal Is that you and you could still you can still run on bare metal if you want you don't have to run in a VM And then you can actually still have that multi-tenancy on top of one large Cassandra cluster Yeah for now like yeah, we were able to do a fast prototype using the Docker images of Cassandra But our plan is to actually build proper Bosch release using full Cassandra Not the Docker image That allows you to actually deploy it onto bare metal very easily So you can see we are kind of creating the VMs for the elastic search through Bosch It's like you go into ops manager. You say I want to scale up and you're done any other questions So the tile. Yeah, it's a custom tile We created for user grid the user grid Yeah, it basically pushes an application of the user grid into CF through Bosch and and it also creates Two separate set of jobs one file elastic search one for Cassandra Does it answer? Sorry Compared to other embassies or well User grid is the only one that's an Apache Embass is Apache project. So it's the only Apache licensed one and we I don't know of any embassies that are open source and have a lot of adoption especially from enterprise customers So That's maybe a that's maybe one difference I do know that there were some embassies that were based on top of relational databases But honestly they didn't go very far because why use an embass when it's so easy to deploy when most developers know How to use a data a relational database, right? So that that's what I that's why no so far No, no, no we can create a full blown bar Cassandra Bosch release But it does require some time because we were able to get a Docker image of Cassandra right away We just downloaded it. We rubbed it with the Bosch release In like a half an hour. Yeah, we also have a partner offering data stacks There is a data stack style if you want to use the proper commercial one You so you can consume the services of data stacks from the marketplace. That's another option or if you want to bring in this one the Whatever custom build one. Yes, that's an option So we chose the reason why we chose Cassandra was because of its multi data center replication And just the fact that it's of all the no sequel databases out there. It was the most hardened for enterprise use cases But you know, you know, it it's on github and you can fork it and then put in things like Mongo DB I know some people in the community were trying to think about using Dynamo DB instead of Cassandra and still leveraging index Elastic search for the indexing So it but we haven't you know Cassandra is pretty darn good for enterprise So the question is is elastic search part of user grid. So it's we we Yes, so it is a core part of user grid 2.0 You download you download user grid and elastic search at Cassandra our dependencies for It's an external dependency, but it is required for user grid to function So we have got the three VMs now from one instance of elastic search. Now. It's three Bosch took care of it. All right Thank you very much