I'm Mike. I work for Tengen. Tengen is a startup company in New York, and we sponsor the development of MongoDB. So for those of you who aren't familiar with MongoDB, what MongoDB is is an open source, high-performance, schema-free, document-oriented database. And what's really great about that is that I get to get all of my buzzwords out of the way on the first slide. But hopefully, by the end of the talk, I'll have given you guys an idea of why these traits combine to make something that should be interesting to you guys. So can you guys in the back here? Okay. Okay, good. So what I do at Tengen is I work primarily on the Ruby and Python client libraries for MongoDB, so that's a little background about myself. And the plan for this talk is really going to be to introduce MongoDB sort of by way of comparing it to some other things in the data storage space that you might be familiar with already. And then we'll sort of get right into code examples, sort of how does MongoDB work? How does the API look from Ruby? How do you interact with it? What types of queries can you perform? And if there's time, we'll get a little bit into the auto-sharding and how that works, because people tend to have a lot of questions about that and be interested in that. One note before we go on is that if you guys have any questions throughout the presentation, feel free to throw your hand in the air and I'll try to get to those rather than just drag right through to the end. So to sort of introduce what the goal is with MongoDB, we'd like to show this chart. So you can see on the x-axis here, we have depth of functionality and on the y-axis, we have scalability and performance. So all the way in the upper left-hand corner, we have things like memcachedd, which are incredibly fast and incredibly scalable, but they might not have the functionality that you'd expect from a general-purpose data storage. So with memcachedd, for example, you basically have put and get on a single key and data can get evicted without you knowing it. So in terms of a general-purpose data storage, we might expect some more functionality. So key value stores are another sort of hot area right now, and those tend to provide a little bit more functionality than something like memcachedd. So there, a lot of times you can expect persistence. And also some of them have some more interesting query capabilities than just put and get on a single key. So with some of those, you can do things like range queries and that sort of stuff. All the way in the bottom right-hand corner, we have the rdbms. So the rdbms supports everything about the kitchen sink, tons of functionality, but they're not that scalable. And I'll talk a little bit more about that in a minute. And for some cases, they're not as performant as some of these other things. So with memcachedd, really what we're trying to do is sort of take the scalability and performance of a key value store and then just sort of push out to the right as far as we can here. So basically any functionality that we can add without degrading performance below or too far below what you get from a key value store, we're going to add. So we're really trying to sort of bridge the gap between the traditional relational database and what you get with a key value store. So I think as we go through some of the query examples, you'll see how the APIs and the types of queries you can perform aren't that different from what you're able to do with a relational database. So again, by way of introduction, I think there's a talk tomorrow titled Death to Sequel or something along those lines. And that's not something that we're advocating. So I think that the relational database has been around for the paper that introduced the relational data model was written 40 years ago in April or something. So this is well-studied technology and it's great for a lot of different applications. So we're not advocating that this be thrown out and not used for anything. We just think that there are some cases where you can get gains by moving away from relational models. So I think that what we'll see over the next couple of years is less of a one-size-fits-all approach to storing data and more of evaluating your problems and picking a data store that matches an individual solution to those problems. So some of the shortcomings that you see with the relational database are in scalability. So with the relational database, it's really easy to scale out vertically. So you can throw more power at a single node and scale that way. But that quickly gets expensive. And so one thing that a lot of these solutions are trying to do is allow you to scale out horizontally easily. So with the relational database to do that, you sort of have to develop your own sharding scheme. Things like distributed joins are really tricky to do properly. So that's one reason why we don't see these massively scalable relational databases. Also complex transactions across nodes is another really difficult problem. So with a lot of these non-relational systems, you're giving up some of those abilities to do things like joins and complex transactions. And the reason is that so you can gain some scalability. And there's also some gains, I think, in terms of flexibility for developers. So again, I'll get to in a couple of slides how something like MongoDB could give you a little bit more flexibility than you used to when working with a relational database. So to continue introducing what MongoDB is, I'm going to sort of talk about some of the features that sort of define it. And in some sort of separate it from some of the other things out there. So the first really important thing that's sort of essential to understanding MongoDB are these JSON style documents. So basically everything you store in MongoDB is a JSON style document. And that's also the way the query API works. So they're really essential to using it. And I say JSON style because we don't actually use JSON. So the stuff that we're writing to disk is actually a binary serialized version of JSON that we call bson. And that's extended slightly to add things like date-time support and regular expressions and some other things that are important if you're writing a database which aren't supported in JSON. So that's called bson. And that's actually a useful thing to look at, even if you're not enthusiastic about the whole MongoDB thing, the bson encoding and decoding would be applicable to a wide range of projects. It's sort of an open format and we've implemented it in a bunch of different languages for all the different drivers. So that's definitely worth a look independently. So yeah, another cool thing about using these JSON style documents is that we can have nested documents as well. So you can have sort of arbitrary hierarchies of documents. So by doing that, it's possible that you can eliminate some places where you would normally need to do a join just by embedding documents directly into a parent document. And I'll show an example of that later on. But that's one of the ways where you can really see some extreme performance improvements over using a relational system and doing a join across tables by embedding documents directly inside of a parent document. MongoDB is schema free. So there's no defining a table and saying this column is an integer and this column is a varchar or whatever. Basically, you can insert any document of any type or any shape into a collection. So this is more of what I was talking about when I said that there's some gains to be made in terms of flexibility versus a relational database.  Programmers who are used to developing Ruby are sort of already used to this schema free mindset.  And one really nice thing about this is not only does it make for sort of quick development cycles because you can, in your code as you're developing, change your schema on the fly without having to worry about doing a migration or rebuilding a table or whatever. It also makes for doing migrations on a production system. Maybe like 90% of migrations in some systems that we've run for a couple of years now have turned out to just be sort of small changes adding a new field to a table or whatever. And by doing schema free approach, you can basically do that on the fly. So no migration and it's totally trivial. You sort of handle the case and your application logic. And I'll show another example of that later on too, but that's really nice. Dynamic queries. So those of you who are coming from an RDVMS background are probably sort of used to dynamic queries with SQL. So this might not seem like too big of a deal, but some of these other systems use various other approaches of querying. So with MongoDB, it's a little bit more traditional. So we have traditional dynamic queries with, you know, you can manually specify indexes and we have a query optimizer. And this turns out to be really nice. So in terms of just administration being able to run queries on the fly and inspect the data in your database. And also it's sort of familiar to all of us. So this is the way we do development now and it's not this huge jump. So this is sort of one thing that separates MongoDB from CouchDB because that's a question that a lot of people end up asking. So with CouchDB, you define these, it's actually a really cool mechanism. You define these basically custom MapReduce functions that are basically custom index building. And then you do queries on that. So it's sort of static and predefined what your queries are to generate these custom indexes as you insert data. And with MongoDB, again, it's totally dynamic. It's a little bit more like what you're used to with SQL or whatever. And if you define your indexes appropriately, it's basically equivalent what's going on in the back end. So one thing about MongoDB is that we've really focused on performance from the very beginning. So there's a lot of decisions that have been made, which you'll see as you sort of go through docs or whatever, that have been made specifically for performance reasons. So single node performance is definitely a target of MongoDB. So things like we don't use a REST protocol for talking to the database by default. We have a binary socket protocol that speaks Bson, which is this binary JSON format that I talked about earlier. So there's a bunch of decisions that have been made for that. And what's sort of cool about it is that if you have really great single node performance, it sort of opens up opportunities to use a database in places where we might normally consider a database to be too heavyweight. So things like logging, writing logging directly to the database or session management or all sorts of stuff like that where normally you might not think that the database is applicable. Here you could consider writing directly to the database. So replication MongoDB supports replication out of the box. Master slave replication, any number of slaves. You can have a slave be a master to other nodes. So sort of daisy chaining. We also support this mode called replica pairs, which is a little bit cool. Basically you can set, right now the limit is two nodes, but we're playing on extending that in the future. But basically you can set two nodes such that they're master and slave to each other. So at any one time one of them is master and the driver's talking to that. And if the master fails, the slave automatically promotes itself and the driver knows how to talk to that. So basically you get automatic failover. And so that's really cool. Auto sharding is sort of our path to infinite scalability and hopefully we'll have time and I'll talk a little bit more in depth about how that works in MongoDB later on because that's something people tend to be pretty curious about. So the last sort of defining feature is that it's well supported across various different platforms and languages. So you can run the server on OSX, Linux, Windows, FreeBSD, Solaris, all of these 32 or 64 bit. And there are drivers written for Ruby obviously, Python, C, C++, Java, Erlang, PHP, Perl, you name it. So you can use it from a lot of different places. So to sort of summarize what we've talked about so far, what are some things that I think MongoDB is good at? I think it's good at the web. So this was actually originally developed as sort of part of a full stack cloud computing platform and we sort of ripped the database out and made it its own standalone product. So basically it was developed to be the backing data store for web applications. And again, this is something that sort of shows throughout a lot of the decisions that have been made. So that's something that it's very good at. It's good at caching. So a lot of people have found that there isn't a need for putting something like memcache in front of MongoDB. So it uses memory map files and it tends to be really performant in that regard. But also you can use it as a caching layer in front of some other processes generating data. So you can sort of have your caching layer be able to do some of these complex queries that I'll talk about in a bit. And there are people using it for that sort of thing as well. So it's good for high volume data, things like logging, things like analytics. That sort of stuff it tends to be really good at because of the way that inserts and updates work. And it's good for scalability and that comes back to that sharding thing which I'll talk about at the end. Things that MongoDB is less good at. So if you have a highly transactional system where you really need complex multi-row transactions, MongoDB is probably not an option. So basically there are no transactions in MongoDB. There's no rollbacks and there's atomicity but only on a single document at a time. So doing sort of these multi-document transactions is really not possible. I haven't found that there's been too much of a need for that with most of the people that are using this now but if that is something that you have a need for this probably isn't a good solution. Ad hoc BI. You could certainly use this for BI but it's not a target of the system. So like I said, we've really focused on sort of as a web backend and we haven't, you know, there are specialized solutions for BI so if that's what you want to use then I would probably recommend looking at one of those.  So now we'll talk a little bit about some basics of working. This is going to be more at sort of the API level. So the first thing I already mentioned is the unit of storage is a document. It's stored in this BSON format which stands for binary JSON and from Ruby basically you can just think of it as a hash. So the Ruby driver takes hashes and encodes them to BSON and then takes BSON and decodes them back to regular hashes. So that's really all you have to think about. And a collection. So a collection is sort of like the schema-free equivalent of a table. So a single database in MongoDB can have any number of collections and basically they're logical groupings of documents. So since it's schema-free you might be thinking well I have no need for different tables then because I can put, no matter what my documents look like I can put them all in the same collection and that'll be fine. And that's true, you could sort of do things that way but by grouping things logically it gives you better performance on disk but also things like indexes are defined per collection. So even though it's totally schema-free you're generally going to have an idea of say a user's collection and all of your users might not be identical but you have some sort of underlying schema there. So that's sort of where our collections come in. And this is sort of a little bit of a side note but I think that in my example code this underscore ID thing pops up so I just wanted to explain it beforehand. So underscore ID is this special key that's present in all documents in MongoDB. It's unique across collections. You can either use your own underscore ID so if you have some unique key you can use it as underscore ID or the driver will insert one for you. So to sort of go over how queries look and how the API looks we're going to do a simple sort of blog back end. So I'm just going to show you how you could represent posts and how you might do some queries that you would use to implement a blog. So here's a simple post. You can see it's just a hash and we can take advantage of some, you know, Ruby data types like a time instance and that will automatically be converted to a BSON date. We can put arrays there. We can embed documents even which we don't do in this example. And here's a comment. So the comment is again very similar just an author, date and text. So to create a new post basically what we do is we take this post hash and we just save it in the post collection. So this DB post thing is the post collection and when we save this it's going to automatically insert it and add that underscore ID thing so this is a little bit more of a complex example. So here what we're going to do is we're going to take our comment and we're going to embed it directly into that post document. So this is what I talked about way at the beginning. Now we can avoid doing any joins by getting our post and getting all the comments with it. So in a relational database you'd probably have a separate comments table and a separate post table in this example. And so one way to do this would be we could go get our post from the database. We could insert the comment into our comments array and then we could save the post back and that would work fine but one cool thing about MongoDB is that there's a bunch of these sort of atomic update operators. So here what we're going to do instead of doing that sort of two round trips we're going to just send an update message and we're going to update the document where underscore ID is the underscore ID of that post we just inserted. So that first hash is sort of selecting which documents we want to update and then the second hash tells us what the update is going to look like. So the update is going to be a push of this comment C into the comments array and that will automatically append the comment to the array or insert or create a new array if it doesn't already exist. Collection identifier. The question is post to collection identifier. Yes, so this post thing is the name of the collection. So then we can do some queries on that. So here we're going to find all the posts where the author is Mike. So basically the way the queries work in Mongo is that you give it a hash that shows you sort of what you want your resulting documents to look like. So this is pretty similar to how queries work in SQL, say. So here we're just going to do a find where author is Mike. We can also do some more advanced queries. So here we're going to do a sort ordered by date descending and limit it to 10 results. So this is an easy way to get the last 10 posts. And since you can have indexes and stuff, you can make queries like this efficient, range queries like this efficient. So here is another example of sort of a more complex query. So just like we had this dollar sign push operator for doing updates, we also have some dollar sign operators for doing queries. So here we're going to do a query to find where posts where the date is greater than this date that I constructed for last week. So we use this dollar sign GT operator to say greater than. There's a couple other operators, too, which I'll show a partial list of in a bit, but if you want to know what all the possible operators are, you should probably just hit the docks online. We can also do regular expression queries. So if we just say we're text and we give text as a regular expression, that will automatically get encoded to BSON and sent across in the database knows how to understand it. So here we're going to find the post to end in Ruby. If we were doing a prefixed regular expression, it would actually use an index, too. So that's sort of cool. I mean, it's not general purpose, but for some types of regular expressions, we can use an index. So here we're going to find tag, a post with a specific tag. And if you remember that tags feel was an array. So here was MongoDB in Ruby and if we just search for where tags is MongoDB, that's going to reach inside that array and look at every element in the array and find the posts that contain MongoDB in that tags array. And sort of a cool feature is that if we create an index on tags, it's actually going to index that document on each element in the array. So we call this multi keys.  And that's how some like blogs that are running on MongoDB now, that's how they do their searches using this multi keys feature. So there's counts. You can count all the posts in a collection in the first line. You can also count posts that match a certain query. Here's basic paging. So we have limit and skip. So you can visualize and skip over end pages of results. So here's an interesting example. This is what I was talking about, how migrations become trivial. So here if we decide, you know, we've got this blog running for a couple weeks. We've got a ton of posts in it. And we realize, hey, it would be nice if we had like a title for all these posts in here. So we decide to add a title field to our post documents. And basically it's as trivial as just starting to add new posts with a title field. So your old posts, when you get them from the database, won't have that title field. And you handle that case in your application code. And your new posts do. And so the nice thing about that is that let's say you roll out this new version of your application that starts adding titles. And you realize something's broken and you need to roll back. So not only was the migration, forward migration trivial, but you can also, if your application code is implemented you can also roll back your application code and continue to use these new documents that were inserted and just ignore the title key. And your old code will still work perfectly fine without doing any sort of schema migration or anything like that. So again, it's not fully general-purpose migration proof. If you need to do some, you know, complex transformations and things like that you can get yourself in a situation where you need to run some form of migration. But in the general case we found that you can avoid a lot of that stuff because it's schema free. So this is just a list of some of the more advanced query operators. So we have all sorts of different inequality operators, greater than, less than, greater than or equal to, not equal to. We also have some that operate on lists so you can say, I want only an array that contains all of the elements in this array that I'm giving you. In and not in are sort of cool too. That's basically a way that you can fake or. So if you have two authors and you want to get all the posts by either author, you can pass an array of authors and say in this array. So you could say give me all the posts where author is in Mike or Elliott, for example. Where? So this is another sort of interesting thing about MongoDB is that it's got sort of tight integration with JavaScript. So there's a JavaScript interpreter embedded in the database and you can run arbitrary JavaScript expressions as queries. So here we're going to do a where clause and we give it this JavaScript string and basically this is going to get evaluated against each document and only return the documents where it's true. So the downside of where is that you can't take advantage of indexes because basically the database has no way of knowing what your random JavaScript function is going to be doing. But it can be very useful if you're able to sort of use some of these normal filters and then sort of tack on a where in addition. So you could use post where author is Mike and that will take advantage of an index on author and then you can use a where clause in addition to sort of filter that down at a more fine-grained level. And so that's very cool and there's also JavaScript appears in several other places. So we have this eval thing where you can basically run arbitrary JavaScript that's not even a query on the database and we also have a JavaScript shell which I'll talk a little bit about later but that's very cool for doing sort of administrative stuff and just playing around with the database on your machine. So in the Ruby world there's some more interesting things to look at which is a variety of sort of higher level projects that have been implemented on top of this driver that I've been talking about to give you things like validations and models and that sort of stuff that you might be used to. So three of the projects that might be worth a look are Mongo Mapper, Mongoid and Mongo Record. So this is an example of Mongo Mapper and you can see that you have things like validations and associations and models and that sort of stuff. So I would actually recommend that if you guys are playing with this for your own applications start out using the Ruby driver directly. A lot of people have found that once you get used to that API it might not be totally familiar to you coming from Active Record or Datamapper or whatever else but once you get used to that API it can be pretty nice and lightweight and if you decide that you need validations and you need this stuff that these are providing then you'll only be a leg ahead because you'll know what they're doing underneath and you'll be able to sort of jump down to that lower level if you need to. So that's my recommendation but these are cool projects too. Other cool stuff to look at if you're playing with MongoDB are aggregations. So there's sort of some built in aggregation basically sort of like a group by and also MapReduce. So in the most sort of most recent development versions we have MapReduce support. This is different from the MapReduce that you might expect that you hear about with CouchDB. So with CouchDB again MapReduce is sort of treated as custom index building. Here it's more like a little bit more traditional MapReduce and it's basically used for things like aggregation. So the nice thing about MapReduce is that it also works in sharded setups. So you can do some complex aggregation that way. Cap collection. So cap collections are a really cool feature. Basically you can create a new collection and say I want to limit it to 50 gigs or to 50,000 documents and what will happen is that as you insert data once you hit that limit it will just wrap around and start overwriting the first data that you inserted. So this is really cool for implementing things like logs that have an integer and we use it actually internally for replication. We store operations in an op log. That's a cap collection. But that's a cool feature for a lot of use cases. Unique indexes. So the index on underscore ID that I told you about is unique but you can also create general unique indexes if you know that this is a constraint that you want to apply when you're creating an index. If you try to insert a duplicate key the Mongo shell like I talked about is this JavaScript shell that comes with the distribution and it's really nice to be able to sort of programmatically interact with the database and it's real quick to start up go through the tutorial using that but also later on to do administrative stuff. So like I said I do a lot of work on driver development and there's a lot of time throughout the day that I fire up the shell to do some quick queries see what's in the database writing a script to do the same thing. In GridFest GridFest is another cool thing that's sort of worth a look. Basically what it is is a specification for storing large binary data within MongoDB. So what we do is we sort of the Bison thing supports storing binary data but documents are limited to a size of about four megabytes total. So with GridFest basically we chunk up your binary data into several documents using a spec that we've come up with and the nice thing about doing it that way is that then there's a whole host of drivers and tools that know how to interact with this data stored in this spec. And cool things about GridFest are that if you store files in GridFest and you've already got replication setup for your database or sharding setup for your database you can sort of leverage that for your file storage as well. So that's worth a look as well. So if people don't have questions now we've got a couple minutes left so I can dive in a little bit on sharding and tell you a little bit about how that works. So sharding is sort of our path to infinite scalability and basically what it does is split up your data across several different nodes. So replication we treat as a path to failover so there you're replicating the same exact data across nodes whereas sharding you're storing the same data on different nodes in order to scale out. And so before we get too deep into it I'll introduce some terminology that we use and it can be a little bit confusing when you read a bunch of papers about this stuff because people use these terms in a lot of different ways and we're just as guilty of that as everybody else but this is how I'm using them for the rest of this talk. So a shard key is basically a single key in your document that you're going to split up chunks by. So in the example of the blog post maybe we'll split up our documents by date so we would set our shard key as date and so then all of the documents in that collection are going to be split up into ranges based on their date and those ranges are called chunks so you can think of a chunk basically as just a range of the value space for a single key in a collection. So a chunk could be represented by a tuple that looks like collection name shard key minimum value and maximum value for that chunk so basically every chunk your entire collection is going to get split up into these chunks. If it's a small collection maybe to start with you only have a single chunk and what auto-sharding does is take care of splitting up those chunks of data and distribute them to different shards. So a shard is a single node or several nodes here it says replica pair but the model going forward is that you're going to be able to have sort of n nodes per shard but basically every node in a shard is going to be responsible for a set of these chunks of data. So given some value it's going to live in a single chunk some value for a key in your collection it's going to live in a single chunk and that chunk is going to live in a single shard which could be multiple machines and probably should be multiple machines for failure or sake. So to sort of diagram this out because that doesn't help too much this is the way it looks in terms of like a process diagram. So we have a single client and it's talking to this process called Mongo S. The S stands for shard and Mongo S is basically a lightweight database router it's pretty stateless and it basically gives you the same API that you're used to working with when you're talking to a single node or to a replica pair or whatever. So the client code doesn't have to really change it all to use sharding. And what Mongo S does is it handles when it gets a query it knows which shards might contain that query and it handles routing out your query to all the different shards that might have results for you and basically it's sort of like a merge sort engine as well. So if you're doing a range query Mongo S can send out the query and then merge back in the results. And so this is where it becomes important what your choice of shard key is. So if you choose your shard key as the date and then you do a query on date that's going to be really fast because Mongo S knows where that chunk lives and it can route your query to a single shard get the result and give it back to you. If you choose your shard key as date and you do a query on author without including date at all Mongo S has no idea where the documents with matching authors might be. So it's going to have to route that query to every single shard and merge back in the results. And you can imagine there's all sorts of different combinations of how many, depending on your query how many shards might have to be involved. So the key when you're when you're setting up sharding is choosing a shard key that's appropriate to the types of queries that you're doing. Such that Mongo S doesn't have to distribute your query across you know tons of nodes just to return your result. And for, you know, smaller setups, four or five shards it might be fine to do a couple of these distributed queries. But for larger setups thousands of nodes obviously that's going to be a huge performance bottleneck. Yeah. Let's say two, three sets of referee clubs that has different shard keys and Mongo S can decide which shard key to use. The question was could you have different replicas that are sharded on different keys and let Mongo S decide which shard key to use. So that's a good point. So basically you can think of the sharding as like a distributed index. Just like you have indexes on each of these individual nodes, you have sort of this distributed index in Mongo S nodes where that data might live. The answer is that I don't think we're planning to do anything like that currently. I mean there's no reason you couldn't do it yourself in your application code. You could have multiple collections each of which is sharded on a different key and insert into both of those collections manually, which is pretty much what this would have to do at least the way the setup works right now. So yeah, so again, Mongo S can talk to any of these different shards, each of which could be multiple nodes so that you have failover on that level. But the cool thing is that, like I said, Mongo S is pretty much completely stateless. So it's not like this single point of failure down here. You can have multiple Mongo S's as well. So you can talk to any of these Mongo S's and any of them know how to route your results or how to route your queries appropriately. So there's really no problem if one of those Mongo S's failed. You can just go talk to another one. And another cool thing about that is that there's lots of ways you could actually set this up in terms of physical hardware. So one setup that we think is interesting and that we definitely want to experiment with is having a Mongo S per app server basically. So if Mongo S lives on the same machine as your application code, then all that communication is going over local hosts and it's only these remote hops that are actually going out on the wider network. So the question now is if all these Mongo S's are completely stateless, where is sort of this configuration information stored? And that's where these config servers come in. So these are basically like a special separate set of Mongo D instances that store configuration information and that information is basically a mapping from those chunks that I talked about to shards that own those chunks. So you can think of the data in these config servers as just a list of chunks with a shard identifier saying which shard has them. And the thing about these is that all of the basically metadata changes that go on here are done using two phase commit. So this is actually like synchronous replication just for this config server part, whereas a lot of the rest of the stuff that goes on in MongoDB is all asynchronous replication. And so sort of to give you an idea of how failover works here. So like I said, any of these Mongo S's can fail and you can just talk to another one and that's fine. Shards any single one of those Mongo D's can fail in this setup because we have a replica pair and then we can just talk to the other one and that's fine. If all of the nodes representing a shard fail then we lose access to those chunks that that was responsible for until we bring one of those back up. And config servers are sort of special because we need those to know where things live. And so the way it works is that if a config server is down we can't do any metadata changes until we get that config server back up. So we can continue to do queries, we can continue to insert data, but we just can't change where a chunk lives. So what happens is that as a chunk fills up there are two operations we perform. We perform a split which basically divides the chunk into two chunks and we perform a migrate which can move the chunk to a new shard. And that's how we achieve load balancing basically. And so if a config server is down we won't perform either splits or migrates. And that's so that we make sure that we have a consistent view of what lives where across the whole system. And that's not actually too big of a problem because if you imagine a production system that's been up for a while the chunks in these shards are going to be pretty well balanced already. So going a couple hours without doing any of these sort of rebalancing operations is not too big of a deal. And so yeah, so MongoAS basically just caches that information that lives in the config servers. Okay, so what I would like for all of you guys to do who are in the audience if you haven't done it already is download MongoDB. It's really easy to install. It takes like two minutes to download. We have binaries for all these different platforms so nothing stopping you there and try it out. So try it out from the shell install the Ruby driver it's on, gem cutter play with that and let us know what you think. So write a blog post put something on Twitter, email us whatever. We really just want to sort of continue to build a strong community. There's already a pretty strong community, especially in Ruby but that's sort of the goal so please do that. And the website is MongoDB.org. We're on IRC all the time. We have a Google group. This is what we use for basically most of the interaction in terms of within the developers but also what users happens on that list. We're on Twitter. I'm on Twitter if you want to ping me directly. That's my personal email if you want to ping me directly as well and this slideshow will be up there at some point. It's not up there right now but next couple of days. Questions? You mentioned using this for sessions. Is that something that you've actually implemented? Yeah, so I've used it for sessions in one small app that I've written that isn't really deployed anywhere but people are using this for sessions and there are some there are some nice wrappers that people have written around other session libraries that will basically persist the data in MongoDB. I can't remember at the moment if there have been any of those written for Ruby sort of hard to keep track of all these third party packages that are going on but that's definitely a great use case for it. Yeah. Is there any way to query embedded documents? Yeah, so the question is is there any way to query against embedded documents and I probably should have had a slide on that but yeah, there is. Not only can you query against them but you can also build indexes on embedded documents. So the cool thing about this BSON format is that the database knows basically completely understands the format so the database is sort of able to reach into your documents and get at sub documents and all that sort of stuff. Posts.comments or comments.author in that example and then we have an index on the authors within those comments and you can do the same thing with queries. You could query on comments.author or comments.date. Yeah. And the scalability is one of those selling points. How big? Okay, so the question is how big are the current deployments? So we maintain a list of production deployments that we know about and that's on the website. If you go to modernity.org and you do a quick search for production deployments in terms of absolute size so this sharding thing is actually under really active development right now so I don't know of anybody using this on a large site in production right now the sharding layer. Everything else, the replication, the core server all the querying, all the index building that's all very stable. That's been used in production for like two years now. So one of the bigger sites that's using this right now is Sourceforge. I think their setup is that they have not too much data on the order of say two terabytes of data and they've got it in a replicated setup so they've got a single master and maybe six or seven read-only slaves so they do all writes to the master it's like most web applications it's very read heavy they do all writes to the master and all reads distributed across these slaves and I think the way they're using it is they store basically a document for each project on Sourceforge and so when you hit a project page on Sourceforge it's pulling a document out of MongoDB, again no memcache or anything like that and basically all the information for that project is in those documents so I think about 90% of Sourceforge traffic hits MongoDB now at some point. Yeah, in the back. I was interested is replication always like a pull replication or can you support parity and that sort of thing? So the question was is replication always pull or do we support parity and that sort of stuff so right now replication is basically completely asynchronous pull only this is something that we're actually actively thinking about especially in terms of the way sharding works is possible different setups but right now the thing that's production ready and really the only thing that's in active development is pull only. So it uses basically an adaptive mechanism so when you do a pull the master keeps a log of operations that is performed in a cap collection and the slave every couple of seconds to start with does a pull and gets all the operations that have been performed since its last pull and applies those but then the way it works now is we use sort of an adaptive timing so if the slave pulls and a ton of operations have been performed it will stop pulling a little more frequently and if the slave pulls and nothing has been performed it will stop pulling so frequently so it's sort of adaptive but yeah it's totally asynchronous Yeah Does it cache any parts of the database in memory or does it keep it all on disk or how does that work? The question was does it cache any parts of the database in memory does it keep it all on disk, how does it work? The answer is that basically all of the files so we sort of let the OS handle it everything in the database lives in memory map files indexes all the data and the OS is responsible for when that gets paged out so this is why we can maintain the performance of close to things like memcached because if all of your data is resident in memory then basically what you're doing is memcached with some nice query mechanisms on top of it so one thing that we're working on right now which I think might be in the latest latest tip is an operation to perform a guaranteed full f-sync and then lock the database so this is very useful for things like Amazon EBS you could do a full f-sync, lock the database, take an EBS snapshot and then come right back up within the matter of half a second or something like that so that's something we're working about on disk durability there hasn't been too much of a focus in terms of traditional acid durability and the reason why is because that we're really treating replication as our path to failover so the idea is get it on a replica somewhere and if you get it on enough replicas it'll get to disk yeah the question was why not use something like a distributed hash table to store configuration information for the sharding it's something again this is something we're thinking about doing so the sharding layer is really an active development right now we're hoping to have a beta out for sharding by the end of the year so again the production stuff, the really stable stuff is the non-sharded stuff but things like zookeeper other distributed hash table type things are definitely an interesting approach to storing that configuration information so it's something we're thinking about to own our own stuff for that Is there any plans to have a hotspot to be able to tell his peers when we have to take the shard off the question is basically how does load balance work in the sharding setup the answer is it has to be the only sane way to do it is to use some combination of data size as well as load in terms of queries per second or whatever so that's how it's going to work in terms of rebalancing if one shard is getting totally hammered that's a huge signal that we need to rebalance some of that data the exact mechanics of how we decide when and what to rebalance is still a little bit up in the air the model that's implemented now is pretty simplistic anything else I have some longer to be stickers if people want some of those come grab me also if you have more questions you want to ask me in person please pull me aside thanks


Hi, I'm Sarah. I teach Cuban piano here at Salas.  Well, in Cuban music, what the Cubans have done is they've taken the piano, which is, I suppose, a Western classical instrument and use it as a percussion instrument. And salsa piano is great fun to play because it's dance music and you're in your part of the rhythm section. So I teach the students I have, maybe they played classical music, maybe they've played some other sort of music, or even some of them haven't even played piano at all, but we start very much from the rhythm. So the basic rhythm in salsa and Cuban music is the clave, which goes like this, one, two, three. And all the other instruments fit around that. So what I do is I start my students off looking at the basic groove, because really once you've got the basic groove of it, you can play salsa piano. So the basic groove, if we just were to do it on one, four, five, let's say, in F, so I teach them this, and it fits in with the clave going like this. What I teach them is when you're playing the song, it's a dance song, tracks you tend to go on and on and on like that, but you might change it. So we start like this. Really, that rhythm fits in so much of the music. So I also teach, I mean, that rhythm is in what's called son, is what's in what's called salsa. I also teach people a rhythm called cha-cha-cha, which you can play the same rhythm but slower. That's exactly the same rhythm, or you can play it old style, which is quite nice. And all this stuff, we work on songs.  That's it really. I could show you another rhythm. Another one that I really like is it's slow and it's easy. It's called wahira, and it's meant to evoke the spirit of the countryside. And it's very simple, and it's lovely. When you play that with Latin musicians, you know this Carlos, you play this with Latin musicians, they love that, because it's a fantastic thing to solo over, and they'll join in with all the different instruments, the congas, the weirdo, and yeah, it's great.  So you're part of the rhythm section, and then it's your turn to solo, and you can just take your space and do what you like. So I can recommend salsa piano at Zoas. Okay, let's play a bit of a Montuno, why not?


Go, go, go! Before the sunset! How you can hear them all? Hi, I'm Lavi. And I'm Oli. And this is our hero, Bumblebee. Together we are attempting a Guinness World Record to become the youngest pair to circumnavigate the globe by motorcycle. Join us for season three, here in South America. Cappuccino's in the morning. Thank you. It was not too good night, but... No, there's a lot of trucks.  So that's to be expected. Exactly. But for this morning we have some nice coffee to wake us up. Actually, we're forced to have nice coffee because we're at a petrol station so we can't use our stove for fear of exploding the whole place. Big chocolate ball in mine. Look at that. So the... Epic breakfast this morning. I have some boiled eggs, tomato and of course some cheese. Yes! Good morning world! Welcome back to the channel. It's day number 238 on our circumnavigation around the globe by motorcycle. We're here at a petrol station where we camped last night just near the town of Colonel Pringles.  No, we didn't but I would like to. We made a massive distance south yesterday and today we're going to be continuing that journey south towards Patagonia. So let me show you guys where we're headed today. Awesome. So I've drawn now our line that we took through Brazil, Uruguay, our four days in Buenos Aires and our massive distance yesterday to reach where we are now in Colonel Pringles. And today we are going to be continuing our way down here through there's a town called Bahia Blanca here in the city and then making our way along this peninsula all the way to the very very very south just past Viedma. So this place that we've seen on eye overlander looks really really nice. It's like a little camp on the edge of a cliff where apparently there's a colony of parrots or a whole load of parrots that you can see and apparently it's an amazing sunset over the ocean. So that's going to be really really exciting and it's going to be quite different to where we camped last night. So that's going to be cool. We have about 250 miles which is about 400 kilometers today and it's already nine o'clock so better hit the road let's go. With our helmet microphones down for the second day running we have to look once again to an informative voiceover to fill us in. We had a slightly shorter distance than yesterday to cover but ahead of us still lay many miles of flat hot and windy Argentinian countryside known as the Pampas. So with the cruise control set to 60 we powered on through and let the miles roll by. As we made our way further south it soon became clear that the wind would be our biggest challenge of the day. The wind turbines were loving it though. It's being slowed down so much by the wind and it's so windy at the moment. Hold on I'm just going to come down. So we've positioned the bike blocking the wind a little bit and we've just come off the highway. We've got a bit of shade from these trees but it's like 33 degrees at the moment. Yeah I think our bike recorded even 35 degrees so it's really hot, it's really windy, no nice views, pretty hectic. Yeah it's been pretty tough so far compared to yesterday. It's just a completely different day. And we just passed by Bahia Blanca. We just went on a ring road around Bahia Blanca the city. So now we've just joined the Ruta 3 and the Ruta 3 is pretty much the same road that we'll be taking for a long long long way south into Patagonia but hopefully it's not going to be this windy the whole way down. Fingers crossed! So apparently we still have around 160 miles to reach the town of Viedma. So yeah it's not over yet. So we've decided that this place is just too windy.  We've had a look on the map. There's a petrol station coming up in about a mile so I think we're going to go for the safety of the petrol station. I thought we'd have some protection from the wind from the trees but it doesn't do anything. Insane. All right we'll have our break here instead then I guess. So we've been looking for a map for ages all across Buenos Aires looking in different shops bookshops and everywhere and I just asked in this petrol station here and he's like oh yeah we've got a map of all the roads in the whole of Argentina and then I was like that's absolutely awesome and then he said to us and you can have it for free. It's a gift for you. What? Look at this. It's our kind. It's like the whole of Argentina. This is perfect. So now I can show you guys the route properly. It's awesome. We have to activate our air condition. Yeah we did this in Morocco. Wet the t-shirts for a nice cool ride. It's fully saturated. It's cold. That'll be nice for a bit. We were just about to leave and this guy comes up and just gives us some alfajores. This is like a traditional Argentinian cake, shortbread cake. This guy here gave us them. Refreshed and fueled up on Alfa Hores we hit the road with a second wind. No pun intended. Another £1.50 down but we're feeling pretty tired today after last night's sleep. It's not too great and there's crazy wind and everything so yeah coffee's good. Coffee's good. Just allowed 96 miles to go as well so. Finally after nine hours on the road we pulled into the small town of Balneero El Condor, our rest stop for the night and the deputy mayor of the town was waiting for us at the entrance. Well maybe he wasn't actually waiting for us but he was there when we arrived at least. He welcomed us to the town and told us that the parrot colony we were about to visit was actually the largest colony in the world with more than 37,000 breeding pairs. The pairs are monogamous and stay together for life but the population is under threat as their food source is disappearing more quickly than the Amazon rainforest. An incredibly unique and special place. We couldn't wait to see it with our own eyes. Good, happy and alive. A little bit in rush. Yeah we're here in this town Balneero El Condor is the name. We just put up all the tent, we got the camping area set up, we covered Bumblebee but we had to do everything super fast. Because we need to get down to the beach for this spectacle which is about to happen which is the returning of the largest colony of parrots in the world to their nests on the cliffs just next to the beach. It's pretty much the reason that we wanted to come here to begin with and we spoke to the mayor of this town which is crazy. He's the one who told us that this is actually the largest colony of parrots in the world which is absolutely insane and he said that this town is just filled with parrots like it's just the parrot town. Yeah exactly you can see them everywhere, you can hear them everywhere. Really special birds. Yeah it was a really long day right at the end. 250 miles about 400 kilometers so pretty tough. Yeah we've done like 600 miles in two days that's insane. Wow we've really smashed some distant south which we needed to do to get back on schedule so. Go, before the sunset. Oh you can hear them all. Nice, I can see them. Look up here, can you hear that? That's crazy, they're so loud. There's like hundreds of them along the cliffs here. Yeah they've all found like a little hole in the cliff and they're all flying into nest. Wow the mayor of this town told us that they nest along 30 kilometers of this coast. Wow that's just magical. Yes and look we can see all the eggshells here. A little baby. Ice-cooked dinner, it's a nockies with broccoli and tomato sauce. Dinner with a view. Successful day and that's it from us today we hope you enjoyed the episode if so please give us a thumbs up, subscribe to the channel, share the video with your friends and family, comment below and we will see you next time.


Hello, what's poppin'? We are on Twitch, we are live. So you can come join us if you want. If not, that's cool. Just leave a like, comment, subscribe. Turn on your post notification bells. Let's continue to grow the family from Chicago to the UK. As some of you may or may not know, I do live in Florida right now, South Florida, Miami. You'll soon see why I've mentioned that or you probably know by the title of this. Don't forget we also got the Patreon. Here's a light list. This is not accurate, all the thing. There's more stuff. And we also got the Discord. Now this is, how you say his name? Michael Massentry. This is his documentary on Miami. I'm curious. He is an English man. He does documentaries. So it fits, you know what I'm saying? Let's get into it.  But I'm going beyond the glitz and the glamour to try and uncover reports of a notorious underworld. All I do is kill, that's all I know how to do. Scared mother. Serious underworld. All I do is kill, that's all I know how to do. Apparently you know how to be a father as well. You got a kid. All right, let me just watch. Scared mother. Oh, it's McIntyre, Michael McIntyre. I don't know why that was so difficult for me to pronounce, McIntyre. This is a place where nearly half the males are arrested of traces of cocaine in their system. 5,894 grams of cocaine. And some parts of town have seen a 40% rise in the murder race. Are each of you prepared to kill? Prepare to kill. I'm in Miami. All the zoos out here is sleuthing. USA, one of the world's toughest towns. World's toughest towns. Miami, a picture postcard tourist destination, famed for its beaches and its nightlife, a mecca for entertainment with a personality to match. Scratch the surface of Miami's blitz and glamour. And it reveals a much done.  Only thing that looks different from this, and now is the cars. Cars are better now. Everything else the same. Darker picture. You'll never have a club where nobody's doing drugs. It's a fact. It's not possible. Anyone that's looking for drugs in South Beach can find the drugs. Facts. Over the last 18 months, there's been an upsurge in gang violence. Giving Miami a higher murder rate than New York and LA. I'm here to find out why. That is a spectacular sight. That's Miami. That's Miami that we all know from Miami Vines. And you talk to the old guards, the old cops, who ran the beat then, and they say that an awful lot of what you see here, the shiny buildings, the great con... Okay, the skyline is a little bit different than now. There's new buildings and those. But an awful lot of that, more than anybody really wants to admit, was built on drug money. I'm on my way to meet someone who knows all about how this city's drug trade operates. A man who single-handedly built an empire from the profits of cocaine. John Roberts was once one of the biggest importers of cocaine in American history. In the 1980s, he imported approximately $20 billion worth of drugs. Damn! Would it be true to say that a lot of the Miami that we... Oh, this guy, okay. See, the glimpse and the glamour, the tourist side of Miami, the beach, was built on cocaine. I would say... And on your business? 80 to 90% of it was built on cocaine. When I came down here, and I used to go to what's now called South Beach, there was nothing but lines of old people and rockers just sitting there waiting to die, you know what I mean? Until God, whoever controls whatever it is, say, your turn to die, they die and the next old person will get in the chair and they'd rock back and forth. So this town was, it's fair to say, was built on cocaine. I wouldn't like somebody to argue the other side and tell me how else it was built because there's no other way. There was no industry in Miami back then. You look back then, you didn't have what you have now. There was no industry. There was nothing back then. Miami was the South. Miami wasn't far from Mississippi, you know? It was really... You see, it's been facts. That's why if you talk to Florida natives or Miami natives, they tell you, I'm not from Florida. I'm from Miami. I'm not from Florida. I'm from Broward County. They don't associate themselves with the rest of Florida. And I kind of get it from being here like a year. Like it ain't the same. Miami and Ivory days is not the same. Like, this is just not... I mean, it's kind of the same but a better example is like Miami and... South Miami, Miami, Miami, and Central Florida, not the same. The southern, southern... It's actually pretty racist here. I ain't even allowed it. Rednecks back then. You paint a picture of the lifestyle that this southern, southern rednecks back then. See what I'm saying? You paint a picture of the lifestyle that this incredible, huge, incredible billion-dollar business gave me. There was nothing you couldn't do or you couldn't buy. We used to eat in a restaurant called The Forge. What we had was our own room. I'd go in there with my friends.  Excuse my English. Drunk. Destroy the room. Throw drinks against the wall. Have parties with girls on the table and under the table. Destroy the place. They'd send me the bill the next day. They'd fix the room and I'd come back a week later. We did it every week. It is what it is when you got that much money. The good times and easy money didn't come without its fair share of extreme violence. Cocaine, everybody's nervous. Everybody's uptight. Everybody's looking at everybody's strange. The people I was involved with, unfortunately, Rafa, he would take a mound of coke, he piled it on the table and he'd have one of his guys empty the cigarettes out and he would load it back. So this man was a paranoid schizophrenic. I mean, you could be sitting at dinner and the table next to you would look at you.  That's how paranoid the man was. Yeah, at a certain point, when you empty a cigar out, cigarette out, the tobacco out and refill it with a white substance, class A, and then you put a light to it. That's a different drug now. You're on a different level right now. I think you knew that he'd be shooting everybody at the table next to you and you'd be going out the door. You know what I mean? You didn't know it was gonna happen. As cocaine became big business, so did the violence. As Colombian drug dealers, high on their own supply, shot each other up on the streets of the city. This was the era of the cocaine cowboys and it made Miami the murder capital of America. Keep in mind, YouTube, I'm here for educational purposes. This is a documentary. I do not condone. I'm not pushing an agenda. I'm here learning and I'm here taking it in like anybody else and giving my life experiences. But in the 21st century, there are new rules of engagement in Miami's drug trade. Turning parts of the town into a war zone. You take me here.  I don't need my child living and dying by this. I'll tell you what, you figure it out. After New York and LA, Miami is the most popular American tourist destination. Not bad for a city that arose from a swampy flatland, a little more than a hundred. Okay, yeah, now this is looking real. I don't think this part of the skyline has changed much. I think that maybe there's a building right here now. Yeah, no, there's a few new buildings. Years ago. Definitely. Miami owes its very existence to the illicit trade in cocaine. A trade whose workforce has been fueled by the flow of immigrants into the city. In the past 50 years, wave after wave of migrants have flooded this city, all looking for an opportunity to flourish. In 1980, Fidel Castro tricked the US into admitting hundreds of Cuba's most violent criminals. Hey, listen, all that migrating, all of that. Hey, that's a lot of bad women here. Salute to that. Before the authorities knew it was going on, Miami's crime rate soared. This was the era immortalized in the firm Scarface. After the Cubans came the Jamaicans who fought deadly battles with the Cuban gangs for control of the city's drug market. The latest wave of migrants, the Haitians, are now major players in Miami's drug trade. I'm with John Roberts, once the largest cocaine importer in American history. I'm interested in his views on Haiti's involvement with today's cocaine trade. It's rampant there now, it's rampant. Now there's mergers because somebody looks the wrong way or something.  What's interesting is when the Haitians came over here, the black African-Americans, they hated them. Absolutely. A hundred percent correct. The Haitians became like what the Jamaicans used to be now the Haitians have taken over. Because their capacity for violence is as great as anybody else's. And they have much more force. There's not that many Jamaicans here compared to Haitians. In numbers alone they outnumber them. Facts. So that's why the Haitians have pushed the memo. My friend, she just moved here from Chicago, or she lived in LA, she moved here from Chicago to LA She keep mistaking Haitians for Jamaicans out here. And I'm like, yo, there's not that many Jamaicans here. What you're seeing are Haitians. Those are not Jamaicans. To the naked eye, you might be confused, but like I'm part of Jamaican and I got a lot of Haitian homies in Iraq. So it's like them ain't Haitians. I mean them ain't Jamaicans, them is Haitians. Look a little closer. In Miami's drug trade, John was a major player, but he wasn't selling the drugs on the street. That was left to the gangs to sort out whose rule is the barrel of a gun. And the ones with the most guns right now and a willingness to use them are a Haitian gang known as the Zo Pound, which roughly translates as Haitian to the Bone. Their notoriety has spanned nearly two decades. I've heard stories of extreme brutality, street executions and voodoo rituals. They reside in the suburb which has become known as Little Haiti, about a 10 minute drive from the tourist areas of South Beach. No, it's not 10 minutes, don't let them lie to you. Even though most visitors to Miami wouldn't dream of going to- It's about 20, 25, maybe 30. 20 with no traffic. This neighborhood, cocaine has an escape of a presence in this city. Little Haiti, what a good food it is. About 38% of all dollar bills Miami contained traces of cocaine. The highest in the entire country. I'm with the city of Miami police and I'm with their gang unit, specialist gang unit. They're gonna take me a tour of the city's gangland hotspots. They're also gonna take me to Little Haiti and they're gonna give me a little insight as to where Zo Pound fit as a matrix of gangland violence in this, the city of exiles. What strikes me almost immediately is just within a few blocks. We leave the glitzy skyscrapers of downtown Miami and enter a whole different world. She was crazy about Miami cause this is the South. You gotta remember as soon as you leave South Beach even downtown Miami is not like your typical downtown. Like you'd like downtown London or something.  It's sketchy. Like downtown Miami is one of this downtown Miami and downtown LA. Top two sketchiest downtowns that you'll ever touch food in in America. In my opinion, like big city-wise, like they're sketchy. Still daytime, but there's a palpable sense of tension on these streets. This is the kind of New York version of the projects around here. Yeah, this here, yeah, this is the project right here. A lot of narcotics, a lot of guns in this area. A lot of drive-by shootings up here. I'm right here in Little Haiti. What's the, what's a weapon of choice among the gangs here and the drug dealers? The AK-47, which the street name for it here is a chopper. That's one thing different about Chicago and Miami. They use, they got the big, Miami got the big things out of it. Miami got big guns. We're on the outskirts of Little Haiti and it feels like anything can happen at any moment. Sure enough, two streets away, a drug dealer is about to have a surprise visit. I feel like it's still like this, but it's a little less. Like they're in Miami at the time where it was real, real crazy. It ain't like this, like, I don't know. It could be, I ain't involved in Miami's stuff like that, but both marijuana in, it's okay. All that for weed, jeep? All this for a little bit of weed. See right there? Now I want it. These simultaneous incidents show that no matter how big or small the quantity, Miami police force has a zero tolerance when it comes to drugs. That's a lie. Now, I'm okay. It wasn't, probably wasn't a lie back then, but now, since the rules at medicinal marijuana is legal in Miami, but like, police are not bothering you if they see you smoking. They're not. You get 100%. Like you can walk past a police officer with a blunt ding almost and they will not say nothing.  Like they don't care. When people talk to us about zoepound, I got a sense that they were created, you know, from a different DNA, different ingredients to other gangs. The crimes they committed were, you know, hideous. They were really, really, really bad compared to the normal type of crime we're used to seeing as far as the gang aspect goes of it. What's the sense that when the zoepound set us, you know, organizing, was there a sense that they were quicker to pull the trigger than anyone else? I mean, what was it about their crimes that set them apart? They're just letting you know they're ruthless, you know, that's their nature. For what reason?  They are right here, right here, right here, right here. Patience is like that. Walkin' away, Kevin.  And the gang is part and about to take any chances. Put your shoes on, Kevin. What's wrong with you, brother? Don't do a thing in my shoes. Don't fuckin' put your hands anywhere. I can't see them again. The police informed me that this girl, Jennifer, was a target of a drive-by shooting only last week. So what happened? What was our shooting? No, just shooting at us. Yeah, why do you think they're shooting at you? I don't even know. Who would want to shoot? Are you guys? I don't know. She gotta be like, Colombian, Argentinian, or something. No, punk. Yeah. Punks don't got no life. Are you guys at school? Are you at school? Yeah. Yeah, we go to school. Stay at school. Yeah, I'm... Cuban. And how old are you? Me? Yeah. 15. Yeah. This is CCTV footage of Jennifer and the actual drive-by shooting. Even though the bullets went through the window of a local library, no one was injured. The police investigation revealed Jennifer was selling drugs on someone else's turf. In these parts of Miami, that's a crime punishable by death. What do you want to do? Who do you want to be when you grow up? Graphic designer. Graphic designer? Yes. Yeah? Yeah. I love drawing. Yeah? Yeah. You know what's crazy? If she's still alive, she's probably really a graphic designer right now. In Miami, they get it, like low key. Like I'm trying to say it as a way I can understand it. Like, there's an end goal with a lot of them. Yeah, but I don't think I'm gonna make it then. All the records I got. Too much burning, sir. No, tell me. You gotta remember, you're 15.  Drive-by's, you're definitely not gonna make it. I don't hope I end up getting killed. Why? I don't like this world. This world getting too hard for me for real. It's too rough out here.  They're something of drive-by shootings, drug deals. She could be Haitian though. Haiti is on the same island as Puerto Rico, ain't it? Not Puerto Rico, I'm tweaking. Cuba. It's on the same island as one of them, I forget, one of the Latin places. I think they're 15. What pictures do they have? Teenagers like... Oh, Dominican Republic. It's on the same island as the Dominican Republic. So, you know. Like Jennifer are being sucked into gang life with little... Teenagers like Jennifer are being sucked into gang life with little prospects of ever getting out. It seems the gangs have a strong grip on the city. I'm on my way to meet one of Miami's top crime journalists. Frank Alvarado to find out more about the influence of Zo Pound. The newest and deadliest to find out more about the influence of Zo Pound. You know what's crazy? A lot of these buildings are finished now, but they're trying to make it seem like this is like...  He's on Biscayne Avenue right now. My understanding is that... Yeah, this is Biscayne Avenue. Frank Alvarado to find out more about the influence... This is the bus depot. I take this every day when I got my daughter. This is the metro train. This is a free train that goes around the inner city of Miami, the inner downtown workings of Miami. So, Zo Pound. And this is like a... I don't know exactly what this is, but it's like a theater or something, something big center or something. The newest and deadliest gang in the city. It's like Brickle. My understanding is that Zo Pound... In the woods. Like some of the other gangs, they started really coming over after 92, after the military coup in Haiti, forced the max exodus of Haitians over here to Miami. And I guess shortly after they arrived here, Zo Pound, through fear and intimidation, they were just taking over the streets of Little Haiti. And it's not unusual when the police show took homicide scene to find 50 casings on the floor because the modus operandi behind Zo Pound is to empty their guns. Everybody that's in the car has to empty their guns. Frank has an idea about a possible route into the Zo Pound, through an ex-gang member called Bulldog. Bulldog has made a name for himself in Miami after appearing in a number of low-budget feature films. Ah, yes. Here's our boy, Bulldog. He'll get you the Zo Pound for sure. I don't know if anybody's ever noticed, but now people don't really shoot movies in Miami anymore or Florida because there's no tax breaks, like New York, Cali, you get tax breaks. So say you shoot in a movie and the budget is a million dollars, you would only get, because of the tax breaks, you would only be paying like 750,000 or half a million. That don't exist in Miami no more.  Boom. In every city, I represent my present stop arguments. Bulldog has agreed to meet me, but there's a catch. He wants to do it in the heart of Little Haiti, and I've been told to come alone. Here at the streets are run by numerous Haitian gangs, the Zo Pound being the most feared and dominant. This area is rife with unemployment and the perfect place for gang culture to flourish. It's disconcerting to think that I'm only 10 minutes away from the affluent tourist trip of South Beach. No, you ain't. I don't know if he knew, but he's, that's not a 10-minute drive. I guess maybe with no, no, I'm not even with no traffic. That's not 10 minutes. The chef Caryl restaurant is a focal point for the community here, serving traditional Haitian food. Bulldog, Mac, everyone calls it, it's Donal, everyone calls me Mac. How you doing? Hi, Mac. Hi, Mac. Keela. Keela, how you doing? What's up? What's up? How you doing, man? Hey, hey. It's all good.   Where? Here, here. Went in here, come out back there. I wasn't, I was under my legs. I was paralyzed for six months. Yeah, the guys were shooting at you. How are they doing? Are they still alive? They're not doing that good, you know? Yeah, I mean, but I can criminalize yourself. You know, are they breathing oxygen or are they? Mr. McIntyre, what do you mean without incriminating yourself? Are they breathing oxygen? That's incriminating this bulldog. Don't you do it. Are they taking nitrogen? Yeah, it's a long time ago, though, you know? Way to dodge. Way to duck and dodge. All of that got dealt with. You have to earn your respect on these streets. Well, that's bulldog and, you know, see whether he kind of opens the door for us into this whole world of zoopound. Yo, blind. This bulldog, man. Got a film crew here, man, from the U.K. Try to bring him into zoopound, man. I need you to open some doors for me to get into zoopound. All right?  I want you to bring it on. Bulldog tells me to follow him to an undisclosed location. Road's blocked by the police car up here, but that guy more or less said, I'm a killer. And this story by zoopound is more complex than the amount of bodies and the amount of drugs that have shifted over the years. I hope this gang will give me an insight into how the city's drug economy works. Hardly driving or more prowling. And he's waving at people he knows and he's making his presence felt. You gotta remember, man, when you're in the hood, it's a certain way you gotta drive, man. I don't know if a lot of people know that, man. But when you cutting down these one-way streets, these little streets, where all the neighborhoods is, you gotta be moving. You gotta, it's a certain speed at which you can't drive overly fast. You can't drive super slow. Now, because he's known, he can do that. He can ride around like the president.  You better go that fast. And his presence means that our presence is no threat to anybody. So that man's our passport and also he's our safety net. Too slow means possible drive by too fast means you're not really supposed to be there. You're scouting, quick drive through. In a quiet back street in Little Haiti, we wait. Some members of the zoo pound will come and find us. It's blind. Suddenly, the zoo pound appear almost out of nowhere and they keep coming. I hadn't expected to see them in such numbers. These guys have earned their reputation as one of Miami's most violent gangs by using deadly force to control this neighborhood, prime real estate for lucrative drug dealing. I was soon about to see for myself why this gang is so feared. Why would you want to torture me? Color your eyes. I don't like the way you look.  I'm just an angry motherfucker. I'm in Miami investigating the deadly drug trade, a black market economy that has helped to build this city into a glamorous world destination.  I've gone to Little Haiti, only a 10-minute drive north from Miami's iconic beaches, but here at the city has a very different feel. My contact bulldog has brought me face to face with zoo pound. The latest in the long line of immigrants who have arrived in the city chasing the American dream through violence. So, did the police come around by here all the time? Looking for you guys? They're giving you guys a hassle. I'm over here trying to house the most period point blank. This is the hood, man. He fucks with us every day, man. I've been getting stuck on this. Where is the money to be made? It's a deal inside the community with the crackheads, the Hispanics, doing with the Jamaican. Business is being conducted on all levels, all types of people of all walks of life. Business is business. So, when I say business is business, for all the people that understand that, you understand business is business. Evidence of recent drive-bys are apparent when some gang members patrolling the area arrive. ZP for life, sir. That's handy, man. It's real? That's real, little sir. Bullet hole. Is that real? No, just forward some metal through the pillar of my car. It's not too real. Oh, sir. Top of bullet, sir. ZP, baby. AK-47 live, sir. The hot boy. Don't let the people know what happened. Right here, man. You can easily get click-clack. Ain't no coming back from that. Now, you've been in the wars. Your mommy asked you if it disguised that. Well, this happened before I got with the family. This happened when I was young. I don't want my son being 15 to have to endure what I endure. This year, I was in a wheelchair. My mom cried days and nights. And I had to witness my homeboys' mama crying by never ever seeing their children again, so I wouldn't want that for mine. You take me here. You see this here?  I don't need my child living and dying by this. That's the choice I made, and trust me. That's the choice sometimes I go to bed with, can't sleep about sometimes, because I got a conscience like any other man has a conscience. Oh, for real, oh, God, let's go, let's go, man. With the evolution of zoopound, it ain't going to be what it thought of. We started off as gangsters, but we ain't going to end up as gangsters.  I did, Mac. I'm introduced to another gang member who has turned up with his son. And what's zoopound about? I don't know. I don't know. I don't know. I don't know. And what's zoopound about? Killing pussies. All I do is kill. That's all I know how to do.  Really? Simple. I do what I do best. And is that, is that, obviously it's for business. You're not just doing it for kicks. For pleasure. You're not doing it for just for pleasure. For pleasure. It's there for pleasure. Do I believe that? I take pleasure in the torture, motherfuckers. Really? Yes, I would take pleasure in getting out right now and torturing you if I could. Why would you want to torture me? Color your eyes. I might don't like them, you know. I might like them like the way you see them. That is not funny, but it is funny. It's male today.  I lost count. By the time I turned 21, I lost count. Personally, I like to use my knife. I like to be personal with it.  And this is your son here? This is my son. And you don't mind to hear him? Does he know about your lifestyle? He know what I do. And what do you want for him? Would you mind to be followed in your footsteps or do you want something different for him? I prefer a better life for him. That's what I do what I do. So he can have a better life. I feel if I exterminate enough of you pussies out there, by the time he grow up, he wouldn't have no problems. I'm just an angry motherfucker. Angry. There's avenues where you can get help. There's counselors. There's AA meetings for murderers. Like, come on out. Well, it's hard to get a sense that Zo Pound is just a gang or a rough dealing business. It seems to have a huge amount of support right across the community here in Little Haiti. And here, these are some of the senior figures in the community. And one of the guys just showed me a gun. And that's five or 10 years. I think they're pretty open about their street activities, which are about drugs and everything associated with that. That's murder. It's five or two years back then. July 1st, anybody can carry a gun in Florida. No license, no training, no nothing. As long as you're not a convicted felon or something. Just killings and revenge and retribution. Do you know what?  I noticed a t-shirt being worn proudly by a gang member. And I was about to find out who's pulling the strings.  Maca-Zoo. This is Mac Lowe. Maca-Zoo. This is a tough man, isn't it? Yeah, a good man, you know? And where's he now? Locked down. Locked down, yeah? He's in jail. I'm told Maca-Zoo, the gang's leader, has been charged with four counts of murder. I don't know why I thought that he at the end of zoe was uh-oh, Maca-Zoo. To understand what makes this gang so ruthless on the streets of Miami, it's important to understand where they've come from. These are the streets of Haiti's capital, Port-au-Prince. One of the most dangerous places on earth. This is where the zoe pound were forged. Ever since the Haitians freed themselves from slavery and gained their independence over 200 years ago, the country has been in a constant state of chaos and violent unrest. In September 1991, thousands of Haitians were killed in so I didn't get no better right now. Vicious street battles after the country's newly elected president was overthrown.  They were not welcome. Those that didn't get into the country bound together and settled in what was to become known as Little Haiti. Blind has decided he wants to show me a different side of Haitian culture, away from the gangs. He wants to take me to meet his mother-in-law, a voodoo priestess. Oh, my God. Lucy would be in love. Lucy, they probably invite you with open arms. The Miami 54th Street is like the first place you come to in Miami. If you Haitian, Little Haiti 54th Street. 54th Street every day. And met it in Haitian culture. I don't practice it, but it's part of my culture, man. Looking around, it seems that voodoo and Christianity have merged to become one religion. How important is it here, you know, that it's a voodoo? It's very important to us, especially the Haitian people. And what does it mean, is it kind of the spirit within the Haitian community is voodoo? It's very strong.  OK, now, it seems to me you must carry a lot of stress, because if you're trying to take a lot of pain from other people, it's going to go somewhere. Not me. I do not take it. My spirit take it. My spirit do the work, not me. Because if there was for me, how you think I could do? I work like that. I have to call my spirit first to do the work. So what can you do? You can heal, you can nurture, can you? Me, I do everything. Only thing I don't do, I do not kill people. OK. Anybody who's sick, they're welcome. So if we want to get a voodoo blessing, a sense from you, you can do it for you? Yes. It's nothing bad, only if you say stop. If you could smell it, it's very strong, but it's good. It's obviously been decided that everyone could do with a good-look top-up, and I can see why. When you live on the main streets of Little Hazy, you're going to need all the luck you can get. Oh, God, God. That's right. I'm going to do it. I'm going to do it with a good-look top-up. That's my girlfriend. That's your girlfriend? Because you don't have to do it. My 86th Donner voodoo good-look charm, the spell has been cast. But you know what? It's, um, I can feel it. I ain't even going to lie. Mac and Tire, Mike Mac and Tire, you deep in there. You deep in there.  You deep in here. Real or imaginary, in my head or in the spirit world, I don't know. It makes me feel good. For a moment, I have to remind myself that I'm still in Miami. Back amongst the tourists in South Beach, it's hard to imagine that the Zoo Pound are only 10 minutes up the road. But this short journey makes me think that there are two cities within Miami. And I wanted to understand how the two worlds came together. We're visitors to Miami inadvertently mixing with gangs like Zoo Pound by Luftham Mangoes, still there, looking for a good time amongst the bars and clubs of South Beach. Miami Beach is an interesting place because you'll see a little bit of everything from the street level stuff to the high-end nightclub designer party drugs. You'll never have a club where nobody's doing drugs. It's not possible. You'll have some dope peddlers that'll come over. They'll take the bus or they'll drive over from some of the areas on the mainland like Little Haiti. And they'll end up here and they'll sell their marijuana and their cocaine and stuff. Street level sales to people here in South Beach. I think that's the whole reason a lot of these clubs exist is because of coke and meth. That's the drug people are going to be on. And they're going to be awake and they want to party. Because of the recent rise in fentanyl, I wouldn't say this is that accurate anymore. I mean, it's still accurate to a certain extent, but shrooms are popular here. Bulldog's been in contact. He tells me the gang are keen to show me what life is like when they're selling drugs on the street. They insist I must meet them tonight. My rendezvous is outside an unlikely English pub in the middle of Little Haiti called Churchill's. To my surprise, I find an unexpected friendly face in the form of the local door.  I ain't no way this bar is over here.  Let me open the window because I don't know. Oh, yeah, OK. Churchill, Churchill. That's hilarious. Oh, wow, this thing's still here. Guys, I'll never go here. That's wild. Poor man. You don't want me to say it's a bit bizarre to hear an English accent in the middle of Little Haiti.   Because we've been with some of the Zopan love. And let me tell you, they're packing. Yeah. But I mean, they're carrying, right?   We have a nice car park here. They're trying to muscle in on the car park, charging the people a dollar or two. I live in the hood. I live just a few blocks up the street, even when I drive home. Even though I know people know me, I'm always like, I've got my key ready to go in my gate. Once I'm in my gate, I feel safe, but I'm always alert. Chris's views on Little Haiti only reinforced a sense of tension I've been in this neighborhood. Double decades, I might pop up low key. Until I get the call I've been waiting for. We've been dragged to the back streets of Little Haiti. It's their part of the hood. It's their part of the world. And I don't know what's going to go on. But they're keen to bring us to a house, I think, across there, and they're having a big meeting. And I think they're keen just to say that their talk has not been cheap and that they are the real deal. You know, I mean, the casualties on these streets tell us they're the real deal. I'm still shocked that there's a UK, there's a British pub in the middle of Little Haiti. There's no one else as shocked as me. The rest of the drug dealers and the ex-drug dealers in this town tell us they're the real deal and they're keen to let us know. But what we're going to see and what's going to happen, I don't know. Bulldog appears. I want to put y'all in there, OK? Bulldog's not comfortable with the situation. He doesn't think it's safe for us to go inside. But this is what I've come for, and I'm not keen to turn back now. Hey, Mason, hey, McIntyre, whatever his name is, Mason Tree or McIntyre, he is really out here thugging. Hi, buddy. No one's going to be seen. We're not going to show any faces. There has been a change of mind. They don't want us to enter. Bulldog seems tense as we return to the car. But out of the darkness, J-Dog, a gang member I've met earlier in the day, approaches. He has some new instructions to take me to an unknown destination. While we're traveling. J-Dog wanted a free ride. That's what he wanted. I take the opportunity to ask him about the Zo Pounds leader, McIntyre.   He's 100% Giko. Giko, what does that mean? Gangster. Gangster.   And does that mean sticking together and having no fear? Sticking together, having no fear, getting money.  What makes you gangster is what you're doing, how you do what you do, you know what I'm saying? So side note, is there any Rose Camp that I have not done? Like, I know we just covered the Millennium Dome, Heist Rose Camp one. Like, is there anything else that we can watch that right now, too? Mackazzo, he's doing his time.  I'm not sure what kind of place I've been brought to. Even Bulldog is on edge. I overhear one of the gang members talking on the phone to Mackazzo. Whatever they have planned, it seems it has to be run past their leader for him to endorse from his own prison cell. Some of the Zopan foot soldiers have agreed to meet with me. A quick glance tells me these guys are different from the other gang members I've met so far. These are the guys that sell dope directly onto the streets and have to protect their patch with the barrel of a gun. But needless to say, they wouldn't tell me any details of that evening's operation. So guys, Zopan, what's the need for the political movement or is it just a family? I mean, tell me what it means to you. 360, good answer. So what does it mean to you? For you, Zopan, you know. What it means to me? Beans life. Without Zopan, it would have been no name for nobody in my life. But for the Zos that are, it brought unity for us. It was a time where Haitians couldn't even walk these streets. You feel me?   You feel me?  You know what I'm saying? They came up with a clique, Zopan. Couple of areas, we had to go and do what we do. You feel me?  You feel me? And I hear a lot of people say, hey, you know, respect don't make a man and this and that. You know what I'm saying? I tell you what, you figure it out. Without Zopan, you feel me? I mean, it's like that. You feel what I'm saying?  Be prepared to kill. OK, is that true?  Are each of you prepared to kill? Prepare to kill.  Are you going to say? Hey, Mac, chill. That's not that. I'm going to say. It's not. It's not. That's not emotion. But you have, if you're on the block with a gun, you've got to be prepared to kill. Yeah, all day. Just as suddenly as they made their appearance, I'm told my time is up and I have to leave. You got up out of there like no problem. I'm gone.  Shotguns.  Yeah, you know, those guys. He's back on Biscayne. Glock, you know, just come out. You know, it's crazy as Biscayne looks exactly the same. This gas station, still there. Guys, AK-47s. There's Taco Bell now. He's about to cross the street. These are guys who... Still there. Oh, this is not here. That's for pizza. This is gone. Killed. Oh, yes it is. No, the Taco Bell's still there.   Maybe more. A lot of tropical still there. And there, it feels all cartoon. It feels like a performance art.  I'm thinking I'm seeing another part of a movie set.  They were there tonight. That performance was put on, on The Orders by Maccazo. And he's the main man.  To try and really understand Miami and how a gang like Zopound works, I need to get access to Maccazo inside his prison cell. But he's serving a double life sentence for murder. So this isn't going to be easy. Miami, a city built on the profits of cocaine and propelled by a constantly shifting underclass of immigrants, all seeking their own slice of the American dream. For many in this underclass, crime and gangs offer the fastest way out of the ghetto. The real heyday of crime in this city was in the 80s when these tourist areas around here were practically no-go areas. Now the police clamped down and moved the crime and they dispersed the criminals and the muggers and the drug dealing from this tourist area and just moved it back into the inner city. The crime hasn't gone away. It's just relocated. I'm here investigating. That's Carmen. It's called gentrification. I've heard some of the drug dealing from this tourist area and it just moved it back into the inner city. The crime hasn't gone away. It's just relocated. I'm here investigating the latest immigrant gang to have stamped its mark on the city, a deadly Haitian gang known as the Zopound. I've learned that they're major players on the distribution side of the drug trade in this city. Last night, I met with some of their foot soldiers, the guys that worked the streets and protect their turf. I'm now about to meet their leader, MacAzo. MacAzo is currently serving a live sentence for four counts of attempted murder and two counts for conspiracy to commit murder. He's appealing these convictions. He got double life for four, okay, well, okay. Let me calm down, let me reiterate. But double life for conspiracy and for two counts of conspiracy and four counts of attempted double life seems, I don't know. Like, it sounds fitting, but it also sounds a little excessive at the same time. I don't know, I could be wrong. That could be tweaking. I don't know. This is Dade County prison. This is the pre-trial detention years. I'm about to meet MacAzo, the head of Zopound. Now, we know last night, when they put on a show of force for us, MacAzo had arranged an entire event here in prison. We're about to meet his lawyer and himself. He's gonna be very sensitive because he's facing some serious charges. MacAzo has already spent the last six years behind bars. I've been granted an interview on the condition that I meet him in the presence of his lawyer. Mac, how you doing? Mac, how you doing? Yeah, very well, Mac. Obviously, his lawyer doesn't want MacAzo to say anything that would endanger his appeal. As you know, we're over doing a story about Zopound. First of all, how's jail? How is jail? It's all, I mean, what you know, hanging in there. Yeah. It's hell, but you know, got to survive. What does Zopound stand for you? The meeting. This meeting is gonna be over really quick. I mean, pride thing, to be proud of movement, of cause, you know, that's what we fought for.  Well, growing up on the streets, what you have to go through, it surprises me that so many of you canakers are still alive because sometimes it's a dangerous place there. Yeah, it's a rough life, you know. Wouldn't wish this life on the low one. With his appeal looming, I understand that Maccazo has to be on his best behavior, but it's difficult for me to marry the man I've just met to the roots of gangster the police believe he is. He asked two questions. Before I leave Miami, I head back to Little Haiti to meet Bulldog. I ask him to fill in the blanks for me. Now, on the subject of Maccazo, he's at the top of the tree, he's a God, OG, a regional gangster, he's in for three attempted murders any number of days, so they say, right. But anybody gets what I hear on the streets, that guy.   Is that nobody gets the top of the tree like that. That's a long body count to his name.  Maccazo is a living legend out here.  It's bad being black and poor in America, but being black, Haitian and poor, there's nothing worse than that, man. For some, the only way to Miami's riches is through the illicit drug. Haitians got good food too, man. You should try some food from them while you was here. Ain't even gonna lie. Straight. The Haitians are the latest arrivals, and it's their struggle for a market share that's given rise to the murder rate. It's a dangerous world, and the ones at the bottom, the foot soldiers, often pay the ultimate price. When opportunities are sparse, many feel they have no alternative. Right here, man, you can easily get a click-clack. Ain't no coming back from that. You ain't lying. Ain't no coming back from the click-clack. I came to Miami to investigate why this town has such a spiraling murder rate, but I can't help feeling that Miami skyline stands testament to the fact that crime does sometimes pay. In this city of Exiles, that message does not go unnoticed as everyone looks for a fast track out of the ghetto. This is the gang culture mentality in the USA, and it's not about to change anytime soon. Yeah, it's funny that he says, like, if he looks at the skyline, money crime does pay, but look at all the people that are committing the crime. Look where they at. Well, the little foot soldiers that's doing all the work, they in the ghetto. His name is Dono. T.L. O'Leave a like, comment, subscribe, turn on your post, man. Interesting stuff, man, especially since I'm here. I'm gone.


Hilltop honey was founded back in 2011. It came about because I was out of work and I was very poorly educated on my own accord. So I failed school miserably. So I had to find a way of making myself some work and I settled on bees and honey because I thought that bees were very under marketed insects and honey was an under marketed product in the UK. Hilltop honey has grown considerably since 2011. We've gone from producing, say, 1,000 jars a day four years ago to be able to produce, say, 150,000 jars a month. At Hilltop honey we pride ourselves on finding the best in people and giving people the chance and we employ up to 23 people now and we're just literally taking on three more. So we do a quite unique programme at Hilltop honey called a Dr Bee and during that process they learn a lot more about bees and the queen bee and the way they produce honey. I think it's something like 60% of your shopping basket wouldn't exist if it wasn't for bees. So just simple things like even your coffee wouldn't exist if it didn't have bees in the world. Fiannaw i Llerie Jones, dwi'n dysgu Cymraeg a dwi'n gweithio we'r adran ffach nata Hilltop honey. Mae'r tîm y gyd yn ffalch iawn o'r enwybiad. Mae'n wych ffordd i'n cwmni'ch leol yn cael cynnybodiaeth yn y gobrau hyn. Diolch yn fawr.