Spatial Data Application | Spatial Database | Spatial Data | Spatial Data demo

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] you're pretty excited about us you know adding the spatial capabilities to um to cockroach tv as we did last last fall in fact i will tell you um it was the most requested feature uh for really quite some time and so i think it's you know it was it was a lot of work by our team to get that incorporated but we'll come back to kind of what's in there and what it is but just so we can level set i mean we're going to talk about spatial data here like how do you define spatial data michael i just define it as um is kind of where you know where is something um and that could be just a point and in this demo it's really just points like where is this pub or where am i located or but it can also be a shape you know it could be the boundaries of a body of water or a county or a country it could be the path that a road takes you know so something that can be located in some space and usually we're talking about on the surface of the earth so which is kind of like a sphere but not really we it's kind of a flattened sphere so we call it a spheroid so there's all kinds of nuance to this sort of thing right and so why are there separate libraries for spatial data versus you know i'm just going to use some floats and you know kind of sort it out myself what what is it what is you know when we started to add these capabilities to cockroach right we look at post gis what's in that what is what's in that package and kind of what did we add in the cockroach i mean so in cockroach db we basically um tried to be as com you know we typically try to be compatible with postgres right and so we continued in that same vein and post gis is the spatial library for uh postgres and so we just started from the ground up and said you know we need to add these things that are points uh lines line strings polygons you know all these different types of objects but then we also had to add operators like how do i create a point or how do i can take from a point how do i get its latitude and its longitude so i can you know maybe i need to work with those discrete components how do i find objects that are within some distance of other objects or how do i tell if these two shapes are overlapping or this shape is contained within this other shape completely you know there are so many different relationships that people need to check for you know in their code depending on their application so we and then one of the important things is to index you know this data so that we can speed up these operations and to index it like you mentioned cockroach being distributed obviously we want to index it in a way that we can do in our distributed environment that we operate in right so what did we have to do that was different i mean i mean i guess we had to basically rebuild what right because we built it from the ground up right michael and so what do we rebuild then to to make it you know amenable to this kind of distributed sql execution layer that we have i mean you know the way cockroach operates is it breaks down uh the data into what we call ranges which are you know these chunks of data that we can push around and they we can house them on different nodes and and we can replicate them and so every bit of data that we have including the spatial data has to be you know capable of being broken down in this way and when it comes to the index i mean the index was a really it's a really important piece and we had to choose an indexing strategy that would enable us to do that so we did we did find an approach that was basically decomposing the space in such a way that we can easily parallelize those indexes right yeah so it it's not just taking the the libraries from postgres and porting those over it was basically i mean we had to make it work with the underlying architecture of cockroach i think it's phenomenal the work that the team did it didn't take too long i mean we got this done relatively quickly i mean i think i saw a first version of this you know less like probably a year ago or a little bit shorter than that right so um i think kudos became a lot of work right michael oh it was it was a huge uh a huge amount of work that was undertaken in a short time and then in release 20.2 is when we finally you know released it to the world and and i started playing with it i think really in earnest at that time and basically you know you you've got these kind of function prototypes you know what does the function look like what what's the name of the function and what are the parameters and what when we've implemented these functions we've made them identical to the ones that you would see in post gis so that means if you were familiar with post gis you would immediately be familiar with doing spatial within cockroach tv which is was really the goal right awesome so i you know i was going to ask you kind of some of the use cases in fact somebody was actually already putting some music on somebody was talking about you know where inventory lives in a warehouse it's a good example of spatial data let's talk at the end a little bit more about like other use cases i think i like your use case and your app michael honestly like i could have used that i i lived in london at one point so i i don't want to like i don't i don't want to like you know break your what you got going on but let's get some hands on some keyboard so y'all uh michael has a demo that they wanted to walk through an app that he that he's built using cockroachdb um that explains some of these concepts again you know please do ask some of the uh any any questions in chat i'll try to lob them into michael along the way so floor is yours buddy great can you see london jim there yes i can so you can see that that's our tourist and you know this was really kind of motivated by the lockdown from covet and the fact that i'd like to travel and i can't do it now so i can do it kind of vicariously and by making an app so that all this is is a very simple one-page web app so it's a combination of html javascript some libraries and then on the back end of python flask restful service that serves up this data that we render and then cockroachdb is obviously the data store that was used and really when you the way the app works is you refresh the page and each time we choose from a random collection of what we'll call amenities which could be a pub a cafe a restaurant or a bar and we position this tourist at a random choice of location from amongst uh you know this set of locations uh where this enabled flag is set to true so right now the only place the tourist is is in drift alger square and this is kind of really it's very simple like i said one page of html it uses leaflet javascript library it uses jquery as well mainly to just do the kind of ajax request to go and get data so you know as i said you can kind of show these different types of amenities and then when uh you know you see show me the closest pub or whatever when we load the page that's where that's coming from there and you can see that these objects are being reloaded pretty you know really quickly so every time i move the position of this tourist by just panning the page around you know you can see i get a different collection of amenities of pubs and it shows the name when you click it of the pub and it shows the distance away from the tour so that's what's going on um and i i could go through kind of more of this this is really just um there's not that much to it you know there's some icons we're getting the base map layer from mapbox and that provides you know this entire map view and then we're just placing objects on top of that map when we reload it the back end is this python flask application and you can see here where you know this is part of our connection string if you're familiar with postgres i think you'll have seen these you know pg database pg user and pg password so these things are passed in through the environment and here you can see that this is the first rest service that the app provides and this is really the one that shows you or that the the application asks uh this this endpoint you know where should i position the tourists so that tourist is positioned at any one of these these points that i showed you here so like right now that tourist is there if we update this so i can get my uh so now we've updated uh that list so now there are several other positions within london where the tourists might show up so maybe the british museum near the tape modern or near the barrel market first now you just michael is is i'm sorry but is that logging where you dropped this guy or is it basically you're this is this the default where he's going to drop in when you open what this is just some some subset of points that i decided to put as interesting places where the tourists might kind of show up and so if it's set to enabled as true then that'll be a point that when you reload the page the tourist can be you know can appear all right and then also if you note now this time um we chose uh bars so this is the icon for a bar okay cool so you know the tourists can be positioned in different places and then you can have different types of amenities and a bar being one of those so that's where you know that tourist location is we're just selecting the latitude and longitude from that table i showed you and we're ordering it by random and just taking uh one row so uh another thing that we're doing is um we are the main query is we're going to try to pull um the end point is features so this is the one that's going to show you these amenities so what what the app is doing on from the front end is it's passing in some json that contains these three elements lat lawn and amenities so latitude longitude and you know is it a pub cafe or whatever and so what we're doing then is we're taking that as input to this spatial query and so we're selecting uh from the database the name of the amenity which when you click it it pops up we're selecting the distance and we're using so we're using these spatial functions st distance st make point we're casting that as a geography type because that's the type we're using for all of our points point is you know the point of that amenity uh as represented in the database this is just a cast to a numeric type to limit the precision just because i wanted to show that we're largely you know we're very postgres compatible so you have all these functions available to you so we get the distance in meters and then we're um also getting the uh latitude and the longitude out of that point using these sty and stx and then we're getting you know this key value item which is how we can tell if it's a pub cafe or whatever right um and then there's another function that we we use is std within so we're just saying show me all you know we're constraining it in the query predicate to things that are within five kilometers of our reference point and ultimately because we're doing a limit we're ordering it by distance ascending and then we're just taking the top ten that's how we get that set that we're showing here you know we're just taking the top 10 closest ones that are within that distance so so all that functionality is part of the spatial development that we just you know released in 20.2 so in the fall as you said uh yeah so the distance the the geometry type and all that stuff that's all part of what was delivered right yep so michael did you implement any did you use any of the spatial functions in this at all or no yeah yeah yeah these so these are all spatial functions here yeah right so we are using anything that has an st that's right um i think st basically stands for spatio temporal um in some standard that was defined at some point so all these st things are the spatial functions that we're using and then geometry is one of the types a spatial type and so is geography right you're just passing in and and michael i mean there's a bunch of functions that come in like post gis right i mean there's yeah 300 or something like that isn't it it's a fair amount right and i think we've implemented what 80 of them in cockroach is that is that a fair estimate something like that i think we've implemented some somewhere around two-thirds of them so far but i think we've chosen the ones that are the ones people tend to use most frequently and obviously now we're asking people to to start using this to get us some feedback of what about what they think is missing and and what we should implement next right right right let's see what else we have here um this is just an example of the data that i pulled in the data came from uh the openstreetmap uh data collection so it's a set of you know data that's curated by you know it's kind of crowdsourced data looks kind of funky um you know it's got uh date time and then here it's got uh position you know uh the name of the amenity uh this i only show them but and then you know various other metadata about each one so it's a really rich data set but you know we're just exploiting just a couple of pieces of it here you could have gone much further what's that you could have gone much further yeah yeah yeah there's so much more um there and then there's also so this is all within just to show you if anyone's curious there is a github repository out here with this all this code and it's got a really detailed explanation of the spatial functions that we're using uh kind of the scope of the data set and that's this this chunk of the world here um the ddl for the tables and some you know some further explanation here um michael can you can you just take a uh just a just copy paste that into the chat just in case people wanted to go check it out absolutely yeah so our field org builds a bunch of different things for customers to demo lots of different things and so trying to get as many of these out here as possible for everybody to use so uh thanks michael for doing that so absolutely yeah so we have go on sorry i just wanted to mention that um this is the db console that comes with cockroach tv so it shows you all kinds of information about the cluster one of which which which is interesting it could be interesting if you want to talk about it is the version we're running and the fact that we could do an online upgrade during this demo if we want to jim it depends on how i always like seeing the online upgrade dude so like i got to tell you so i am a uh i'm a little bit of a kubernetes freak too and i was at a company called core os and core os you know had container linux which was able to you know update like you know update linux like your phone updates you know like ios uh which i thought was really super cool and when i first found kubernetes the whole concept of rolling upgrade just was the coolest thing to me uh if you want to go through a really an upgrade i i would love to see it michael okay so we just uh started it uh running um and i'm just kind of refreshing our app just to show you yeah the app is available so we have a three node cluster currently we only have two live nodes because we're what we're doing the reason we call it a rolling upgrade is because we do one node at a time and we're going to upgrade each of the nodes to version 20.2.3 i think right so um that's happening right now i think you can see now that that node has been upgraded to 22.3 and all the while you know um we've got an app that's responsive and users just don't know that we're upgrading so we don't have to take any downtime right which is great and we can do this also with schema changes i mean there's a lot of things that were i mean this this capability is actually pretty astonishing uh and with how backwards compatible how many different how how many versions back can we have running in a single cluster across all the nodes microsoft one or it's two right or i think it's two yeah now that the thing that i unfortunately just showed you is um that i don't have a load balance connection to our db console so whereas the app is load balanced it's all running through the load balancer so it's only going to direct connections to live nodes right and it can direct a connection to any of the nodes in the cluster which i think is actually a pretty important point what michael's talking about is michael was connected the db console the you know the the web app that we have to investigate what was going on in the in the cluster itself you can access that from any node in cockroach um there isn't like an admin node in cockroach it's like any one of those three nodes would actually be able to to serve that up to you uh in queries on the other you just put a load balancer in front of a bunch of nodes and it'll just distribute load and no matter where the data lives in that cluster but it'll find it right so so i was just kind of trying to talk like you do your work in the background yeah yeah so i just had to reset my port forwarding which is how we get access to this console and um so now if we look here the entire cluster all three nodes have been upgraded to 20.2.3 without any downtime which is what we wanted to show yeah and then we can also you know look at the sql statements that are being executed which is primarily this one that i showed you in the code which is how we pull out those nearby amenities so that's that's it cool um there were a couple questions in chat along the way i'm gonna i'm gonna do the spatial ones first you know you got a couple people asking about kubernetes they're asking about migration why my sequel postgres well i'll come back to some of those um that were in here i think jim has been doing a great job answering some of these things in the background but um there was a question here i'm not sure how this actually i don't know your knowledge of this but can you set the result set limit to be within the viewport sort of like search here as google maps may do it i mean i guess that could have been an upgrade to your app this was just kind of a simple app to show off the spatial right but you could have said like search within this constraint correct um well that's that's kind of really what we're doing in a way um right i got the wrong piece of code up there but we're sort of constraining it to be things that are within five kilometers and and i did hard code that here but you could do it you could parameterize that um so and that's a function that's using this std within function that hits our spatial index right alternatively you can also use a geo hash and i think in the github repo i talk about geo hashes and i do use those here too because i'm kind of doing this both ways and i select a box of like 20 kilometers on a side uh to kind of um constrain my search uh so that's that's another thing you can do so i would say yes you can do that yeah so in in this example michael everything's kind of going through the sql functions um today is there an api that we can actually access these things via you know restful api or something like that or how would you do that with the database i mean i guess you could use yeah come on sorry and in this case i did the easiest thing that i that i know of to do that and it's to take and and put a python flask app out front right and actually the app runs two instances of this app and it load balances between those as well and those are connected to the database so and then these are the end points and you know this is a post method because i'm posting json to it this is you know kind of the default route which just renders our template which is the html file and then there was the other one here the sites which is just a get and that's where you get the possible positions of the tourist so i would say that the this approach is relatively painless and there are examples and there is the example here which is in the github repo if anyone wanted to take it and build on something like that right yeah we are kind of doing the original i mean it's basically you just use the radius of a kilometer or whatever you know what i mean like yeah you kind of fencing it so so in the back end i mean we basically i think the other thing that we didn't touch on when we first explained what we've actually done in building these libraries we've actually coded all this and go right i mean it's not like i think you know in post gis it's you know it's it's it's that's for postgres we've redone this though it's completely and go correct yes well almost all um we did lean on a couple of spatial libraries that we bundle and we ship with so cockroach db has one big binary it's called cockroach and it provides the database and also you know all this console functionality in one binary you know it exposes two ports one for this and one for the the nodes to talk to one another and for your sql clients there are two additional library files that implement some of the functionality for spatial so when you're installing it if you want spatial you need to install those libraries as well if you don't care about spatial then you don't need to install those right and the other thing is you know given we're running in kubernetes here um we have docker images all ready to go on our our releases page and so you can just you can see where that is in docker hub and just use it from there yeah somebody was asking we actually posted that fabio from the team actually helped me get that link so we posted that uh docker hub too oh okay great yeah yeah and so michael there's several questions in there i'm going to merge some of these questions together y'all um you know they were talking about you know using post gios and migrating the cockroach you know and and you know how hard is that i think number one um let's just leave it at that i'm going to come back to the benchmark side of it and i don't think we have a great answer for that but like you know how close is this from a migration point of view if we want to go from post-gis libraries into cockroach so like i i said um all in this code all of these spatial functions are exactly the same as they would be in post gis so that from the if you were using these functions that i'm that we support um you would have no trouble at all we also provide a way to open you know import data efficiently into cockroachdb you can import even the openstreetmap planetdump or chunks of that and then import in right well we have a way um i think it's osm to pgsql or something in the binary and we on our website under spatial we show you how you can do that and lots of other things but essentially this is exactly how you would do this query in a post gis world right this code would run there no problem yeah exactly and it's it's it's almost one-to-one it just and we like you were saying before we have i think about 62 thirds of coverage of all the functions and so we're really and it is the most popular functions which i think is like a key thing and i think you know as with any of these things our documentation goes a very very long way and i love that you bring up our docs michael because somehow magically every time i talk to somebody i end up talking about our documentation because it is very verbose it's great it does a really good job explaining these things i think you know look at this this explanation of how the indexes work i mean it's so deep and detailed so yes i agree with you a hundred percent and i you know it's just it you know for us as a company it's one of the proud points that i have in terms of working here i don't think i've ever worked for a company that had such good documentation uh i think it's you know as an open source person i found this stuff to be really really important so you know one of the questions here was also um you know do we have a benchmark comparison between you know postgres and aunts doing you know some of these some of these uh type of you know spatial applications uh i guess we we haven't done that yet right michael no i mean a lot you know we publish tpcc results all the time and but we haven't done that yet so absolutely yeah and then cockroach demo which is a nice kind of feature of cockroach if you check out if you just search out cockroach demo in our docs um you know you can actually run your own benchmarks against the database we haven't done this spatial stuff yet i mean it's still relatively new to our database and we're looking for people to use it and give us feedback and if there is issues with it we we want to fix them as quick as possible um and i think you know i i speak for andy and a lot of others it's like yep we just want to see some workloads out there using this stuff to see where we can improve it um there's no i mean there's no reason to think there's going to be some huge bottleneck or anything in this benchmark but you know it's you know there's always something right especially as you as you rework like this isn't just a port of post gis again there was a couple of questions of this this is not simply a port of libraries into cockroach it's a rework it's a rewrite of all the functions it's a rewrite of everything because of the distributed execution layer right michael and that's what's critical here yeah no that's a good point you you can't just take um kind of postgres and just pop it on to some parallel infrastructure and expect it to behave absolutely i mean you have to fundamentally understand that this is a cloud native cockroachdb is a cloud native distributed sql database you know from the ground up and so everything that you do has to be done with that understanding and that includes spatial that's right so the great thing is if you have spatial data and you [Music] um you want to scale out that's the next thing we can do with kubernetes here right um is you can just add nodes you know and this works just like anything else in cockroachdb so i just asked kubernetes to add another pod so soon if you know if we look at this we should see this number here go up to four more right and so you know that that means that okay you want to take the entire open street map data set and and run it on cockroach well we can just scale horizontally to accommodate that and it was really as simple as you just did you just added a new pod in kubernetes and scaled the database now what it's also doing underneath covers michael is redistributing that data across evenly across those four nodes now right and so both reads and writes are now going to be serviced by four nodes and you're going to have equal of you know residency of data across each of those nodes right which is that's pretty awesome yeah and the the demo gods as usual my forwarding setup is of course bogus yeah but yeah and somebody was asking about staple sets in here and stuff so so the the for the kubernetes people we've done a couple different sessions on kubernetes you know thank you michael for running all this on kubernetes i think it's kind of one of these things that's kind of to me one of the reasons i joined this company is i you know if i think about a database running a database next to kubernetes is one thing you know if you want to run a single instance of my sequel or postgres that's that's the thing it's just the connection string internet i think running something on kubernetes is is really quite different and not just from the scale point of view not just scaling up and scaling down it's the aha it's the disaster recovery it's how do you do backup and restore in that when you're doing multiple regions and all these kind of complexities of running the distributed databases the stuff that we've been working on for years you know when you're doing a backup in the store of a database then you're in a you know like you know if you have some sort of you know regulation on where that data lives and you're in multiple different regions and you're tying data to location which we can do right like backup and restore has to be distributed there there's so many complexities underneath the covers and that's why when we add libraries we add them and we build the distributed execution layer and that is it's all part and parcel so it fits this whole this architecture yeah yeah for sure and obvious and one of the other benefits you get is the parallel you know the ability to parallelize the backups and restores which is pretty brilliant in terms of making those faster and whatever i did on the back end with my kubernetes which i am not the kubernetes expert i um i messed something up i think but nonetheless our app is still running well that's why you have people like jim hatcher around and help you do these things in our and by the way why we have our community slack channel so michael no i'm joking yeah actually also i wanted to just show you here now you can see that we have the extra pod and i think now i can get my port forwarding running again so let me just show you what i wanted to show you earlier which was murphy's law is correct patrick by the way um somebody's like murphy's law demo this is exactly what's going to happen and so actually somebody else was asking are we going to put our um are we going to submit our spatial functions to ogc for testing i don't know the answer to that but i can actually work with our product managers to get a better sense of that that's a great question but now we have four nodes and so we have more capacity to run more queries and you know house more data so that that actually did hey it worked worked all right as expected so uh and the app didn't take any down time during during that year and you scaled and everything was resharted and distributed across more different nodes and yes so we again have a better disaster recovery so one of these days we'll talk about ranges and what they are and replication but maybe not today yeah cool um let me look through some more of these questions michael yeah let me just i want to pick off this one too it was somebody's asking about can we survive multi-region failures absolutely it just depends on how you partition data data when it gets written to cockroaches actually written three times i just look what i just did michael i put four fingers up actually data when it gets written gets written three times um and depending on how you want to what you want to survive a region whatever your failure domain is it could be a node a rack a z a region a entire country whatever you want you basically uh configure each table to survive whatever what whatever you want it to survive so you can actually write data across multiple different regions three copies one in each region in which case you can you can survive that because in cockroach as long as we have two of three of the copies of the data uh we're good because we can get a quorum right at that point right yeah you can actually change replication factor as well if you want to go up to five so it would be three of five right and so there's lots of different things you can do to uh to survive regional failures in cockroach for sure yeah and and also the thing is is you would typically run your clients uh regionally so that the client for the you know the eu region those clients would run within the eu and then the um within the same database if you have you know you'd have regions in the us maybe in your us clients would run in the us as jim said you could you can pin on a row by row basis your data to the appropriate region which is right great for minimizing latency that's right and and somebody else is this is there a master node and four worker nodes it doesn't work like that in cockroach every node is the same every node is possible of what every other node is capable of doing and that's a core kind of primitive of systems designed when you're building distributed systems right michael i mean you want you know like each you know the signal i always talk about that what is the single atomic unit of cockroach it's an instant cockroach there's no special admin node and transaction node and there's none of that this is the cockroach note as a cockroach yep and and here you see on our dashboard for the sql connections metric um you can see that uh we show connections for any all of the nodes node you know n ones two and four so any of them could be connected to two apps uh it looks like uh node two is the only one right now that has a connection but so uh michael how do geospatial indexes work ah that's a complicated topic uh and um uh i will you know kind of we're gonna do this so basically um how cockroaches spatial indexing works is so typically you know you think of an index and um a lot of the time you can do this kind of divide and divide the objects approach which is like a traditional archery index which is how post gis does that you can also do this this approach called divide the space so you decompose the entire space you're indexing into different buckets cockroach takes that approach and then the reason is because we need to scale this horizontally just like we scale cockroach and it has a lot of other benefits and i think i'd refer you to this link to really dive into that more i will say that i am that's a half hour conversation in itself it's pretty complex right we do have a blog post on this too so i think if you googled um cockroach db spatial indexes i think samir wrote that and it's fantastic and then somebody was asking are the spatial posteriors you know these these features they are are they available oh my god are they available both in the open source community version of cockroach and the enterprise version yes yes and in fact i think that one of the great things about the you know cockroachdb is it has a really viable energetic open source uh group of contributors and as i understand it those folks are taking on uh adding spatial features right you know independently i mean and they're getting you know we're getting prs from them right so you know where i think i said we we had about two-thirds coverage of the post-gis functionality i think that's gonna increase you know fairly rapidly right um let's see here yeah there's a lot of questions about kind of core you know uh cockroach stuff you know how we reclaim and do garbage collection across dead rows and that's all automated in cockroach y'all um a lot of this kind of resilience and stuff is stuff that we we talk there's one here though i don't know if you can answer this or not michael i'm not familiar with the answer to this so i you probably are but um on your roadmap is it on our roadmap to implement spatial predicates in pure go versus using gos bindings um so [Music] i i don't know i think that right now we found that this library that we're using is really excellent and so i i think that um we may just stick with that the downside is it requires us to you know ship those two additional library files but i don't think it's a significant downside if you don't need spatial also you don't need us those libraries right well cool i think we have answered a lot of the questions um let me just come back to kind of one of the things you and i talked about beforehand michael before we kick off like um what are some of the applications people use spatial data for like you've been around spatial data for a while like what are the things what are the workloads the apps you've seen people i mean in the kind of businesses that i've worked in it's really um part of it's kind of wanting to know uh what went on or what is going on where and by whom and you know who's involved how far away is it or if you know i have a path from this point to that point and this you know a starting point in a destination and i'm going to take a certain route um show me interesting events that have occurred along that route say within maybe five kilometers of it over the past 30 days for example or i need to optimize and find the shortest route connecting all these different destinations you know it's like the traveling salesman problem because i have you know delivery people who are going to start out in the morning you know at whatever eight and finish at six and they need to hit all these different places and we want to find the most efficient way to route them i mean a couple of examples but obviously finding pubs is really important um you know if i you know i'm a tourist and i'm in a certain area where am i and then i want to know where are things that i'd be interested in relative to my location uh yeah and i think one of the things here too michael is like spatial data i think we always think about like maps like i think that's the easiest way to think about this right but it's not just like lat lawn right i mean there's there is a bunch of other things right like i think if somebody was talking about inventory that could be shelves and rows right like there's lots of different things right oh yeah i mean i think like if i go to um to lowe's to shop for some home improvement stuff the store is enormous and i don't know the layout but if you you know project you know you've got this xy you know this this plane and you know you know where i am and so really it's just in that case you'd just be using the um geometry types rather than geography because you're you're just dealing with a flat surface but you know ideally it would be neat for me to almost have like a shopping list and when i when i go to the store it just shows me the most efficient path through the store to get what i want obviously i can't do that now because uh you know i don't shop that much these days i think that's a great uh a great application yeah we're just we're just starting to scratch the surface on all the different ways in which we can use anything and it's going to get more and more interesting over time so oh yeah um so i'm going to ask you this my and michael and i'm going to say it's probably going to come back to the docs but since you're using hilbert curves for indexing is there a limit to the dimension can i have lat launch altitude and time as indexed so i guess are there limits with with our implementation for index um so altitude or the like the z coordinate z we are we we don't have that now but we are um i think we started to work on that um time is another dimension that that's handled in a totally separate column i think in this i don't know if i have a time column in this one in this table but i think i do in my osm table so that's just a separate uh feature that would be indexed separately i don't know the answer that one anything i can't talk let me see uh so do i have a time yeah so right there so that's just a separate column that that isn't indexed here but you certainly could i mean you know cockroachdb is an oltp database that loves to use indexes so um you can index that and yeah and we've done a lot of work to make sure those work well across the distributed environment so and you can see here that the spatial index just since i'm here it's considered to be an inverted index type yeah cool well michael i mean we've hit a lot of the questions um i think there's there's a couple more but i think well i you know actually you know somebody's talking about if we have a multi-tenant cluster which actually we have a single cluster single tenant cluster we don't have multi-time for customers yet right i think we're working on that now correct yeah we are i mean through our cockroach cloud efforts i mean multi-tenancy is definitely a big focus of that so we aren't there yet so you can't really do multi-tenant clusters right now but i think yeah you're having a cluster that's running spatial data and other data uh depends on your implementation and how heavy that workload is uh in terms of how you want to segment these things out but you know we we hope it all works in one cluster right so absolutely yeah and i think with you know our ability to scale out horizontally and also to pin data um you know between the the two of those features you can accommodate uh mixed workloads and i think it's one of these things too and you know there were several questions about performance and you know one of the like highlights that cockroach is this is a scalable database if you need more performance simply add more nodes and it takes care of all of the rest like it's spin up a node pointed at the cluster and it's going to take care of that and because we've actually reworked the the execution layer for for for all this spatial work um that load's also going to be distributed across all those nodes right michael i mean and that's like that's one of the key benefits it's not like you're working the spatial in in the stovepipe in the cluster it's not like like it doesn't you got to divorce yourself from those concepts when you get into a distributed database because we're talking about distributed execution as well as distribution of the data right i mean it's a big deal yeah and you could also use our ability to tie data on a row-by-row basis to a geo entire spatial data to the geo it belongs to if you wanted to right right so we could have a we could have spatial data that lives in london only live on london service if we wanted to if you wanted to and i think that's what's cool about cockroach it's such a unique feature the geo partitioning feature and again i think that's what helped us deal with latency it helps us deal with you know residency of data where it lives all these you know those types of things so well buddy um listen thank you um i think when i wrap it up here i i'm exhausted i don't know about you but it's weak you know well thank everyone who who joined us i think there yeah great questions yeah really really good questions so and and just super super engaged like i said before we love it when there's lots of chat and lots of uh lots of lots of qa you know we want to make these things as valuable as possible but jp was monitoring questions i'm sure we'll give water bottles out to several people today for sure because gosh there were a lot of good questions right jim i'm not jim michael jim hatcher also answered a bunch i think so i know he did thanks jim thanks for all your hard work in the background buddy it's awesome so you're very welcome so hey was that the voice of god the voice of jim jim i like to calm so we'll answer all your questions now awesome all right well everybody thank you for taking the time you did today i know it's a it's a lot to you know carve out an hour um but i hope this was valuable to everybody go out and use cockroach crackers tv use core all these capabilities here go start a cockroachdb a cockroach cloud cluster look for a free version of that coming out at the end of this month in beta we we're excited about that uh and so but you'll be able to use all of this uh in there uh today and so um uh mike will thank you so much for um for all this hard work getting the app together and answering all these great questions my pleasure thank you jim yeah and then jim thanks so thanks for your help on the back end um answering all the chat in qa but thanks to everybody uh please do take the survey um again we just want to get better and better in these uh we get some really good feedback so um thanks to everybody if there wasn't a question that was asked uh if you're looking for a demo whatever just reach out to us info conference live.com is it really easy to do so sales of course cockroach labs email uh but but our but our public slack channel is is really the best way to engage with us we're on there all the time our community slash channel so uh we we would love for people to to enjoy uh and engage in the conversation there too so with that thank you everybody thanks jim thanks michael uh and everybody have a great day see ya
Info
Channel: CockroachDB
Views: 512
Rating: 5 out of 5
Keywords: Spatial Data Application | Spatial Database | Spatial Data | Spatial Data demo, What is spatial data?, How to build a spatial data application, What tools do I need to build a spatial data application?, What database should I use for a spatial data application?, Spatial data application tutorial, What is the benefit of running a spatial database on Kubernetes?, How do geospatial indexes work?, What applications do people use spatial data for?, Spatial Data demo, Spatial Data Tutorial
Id: yN_xwwKFHKA
Channel Id: undefined
Length: 48min 21sec (2901 seconds)
Published: Fri Jan 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.