ng when therefore adias saw mercury standing near them he said to priam take heed to send it of dartiness here is the matter which demands consideration i see a man who i think will presently fall upon us let us fly with our horses or at least embrace his knees and implore him to take compassion upon us when he heard this the old man's heart failed him and he was in great fear he stayed where he was as one dazed and the hare stood on end over his whole body but the bringer of good luck came up to him and took him by the hand saying with her father are you thus driving your mules and horses in the dead of night when other men are asleep are you not afraid of the fearsome kians who are hard by you so cruel and relentless should one of them see you bearing so much treasure through the darkness of the flying night what would not your state be then you are no longer young and he who is with you is too old to protect you from those who would attack you for myself i will do you no harm and i will defend you from anyone else for you remind me of my own father and prime answered it is indeed as you say my dear son nevertheless some god has held his hand over me in that he has sent such a way of error as yourself to meet me so opportunity you are so comely in me and in figure and your judgment is so excellent that you must come of blessed parents then said the slayer of argus guide and guardian sir all that you have said is right but tell me and tell me true are you taking this treasure to send it to a foreign people where it may be safe or are you leaving strong ilias in dismay now that your son is fallen who was the bravest men among you and was never lacking in battle with the echeans and prime said who are you my friend and who are your parents that you may speak so truly about the fate of my unhappy son the slayer of argus guide and guardian answered him sir you would prove me that you question me about noble hector many a time i have set eyes upon him in battle when he was driving the argives to their ships and putting them to the sword we stood still and marveled for Achilles in his anger with the son of atreus suffered has not to fight i am his squire and came with him in the same ship i am a murmur done and my father's name is polyctor he is a rich man and about as old as you are he has six sons besides myself and i am the seventh when we cast lots it fell upon me to sail hither with Achilles i am now come from the ships on the plane for with daybreak the echeans will set battle and array upon the city they chafe at doing nothing and are so eager that their princes cannot hold them back then answered prime if you are indeed the squire of achilles son of polyus tell me now the whole truth is my son still at the ships or has Achilles hewn him limb from limb and given him to his hounds sir replied the slayer of argus guide and guardian neither hounds nor vultures have yet devoured him he is still just lying at the tents by the ship of Achilles and though it is now 12 days that he is laying there his flesh is neither wasted nor have the worms eaten him although they feed on warriors at daybreak Achilles drags him cruelly around the sepulchre of his dear comrade but it does him no hurt you should come yourself and see how he lies fresh as do with the blood all washed away and his wounds every one of them closed though many pierced him with their spears such care of the blessed gods taken of your brave son for he was dear to them beyond all measure the old man was comforted when he heard this and said my son see what a good thing it is to have made do offerings to the immortals for assures that he was born my son never forgot the gods that hold olympus and now they were quieted to him even in death except therefore at my hands this goodly chalice guard me and with heaven's help guide me till i come to the tent at the son of pelleus then answered the slayer of argus guide and guardian sir you are tempting me and playing upon my youth but you shall not move me for you are offering me presence without the knowledge of Achilles who by fear and hold it great guilt to defraud lest some evil presently befall me but as your guide i will go with you even to Argos itself and will guard you so carefully whether by sea or land that no one should attack you through making light of him who was with you the bringer of good luck then sprang upon the chariot and seizing the whip and reins he breathed fresh spirit into the mules and horses when they reached the trench and the wall that was before the ships those who were on guard had just been getting their suppers and the slayer of argus threw all into a deep sleep then he drew back the bolts to open the gates and took prime inside with the treasures he had upon his wagon earlong they came to the lofty dwelling of the son of pelleus for which the mermidans had cut pine and which they had built for their king when they had built it they thatched it with the coarse tusset grass which they had mown out on the plain and all around it they made a large courtyard which was fenced with stakes set close together the gate was barred with a single bolt of pine which it took three men to force into its place and three to draw it back as to open the gate but Achilles could draw it back by himself mercury opened the gate for the old man and brought in the treasure that he was taking with him for the son of pelleus then he sprang from the chariot onto the ground and said sir it is I immortal mercury that have come with you for my father sent me to escort you I will leave you now and will not enter into the presence of Achilles for I might anger him that a god should befriend mortal men this openly though you within and embrace the knees of the son of pelleus beseech him by his father his lovely mother and his son thus you may move him with these words mercury went back on high olympus primes sprang from the chariot to the ground and leaving ideas where he was in charge of the mules and horses the old man went straight into the house where Achilles love of the gods was sitting there he found him with his men seated at a distance from him only two the hero automaton and alchemists of the waste of mars were busy in attendance about his person for he had but just been done eating and drinking and the table was still there king prime entered without there seeing him and going right up to Achilles he grasped his knees and kissed the dread murderous hands that had slain so many of his sons and when some cruel spite has befallen a man that he should have killed someone in his own country and was applied to a great man's protection in the land of strangers and all marvel who see him even so did Achilles marvel as he beheld prime the others looked one to another and marveled also but prime be sought Achilles saying think of your father o Achilles like unto the gods who is even as i am on the sad threshold of old age it may be that those who dwell near him harass him and there is none to keep war and ruin from him yet when he hears of you being still alive he is glad and his days are full of hope that he shall see his dear son come to him from Troy but i wretched man that i am had the bravest and all Troy for my sons and there was not one of them left i had 50 sons when the Achaeans came here 19 of them were from a single womb and the others were born to me by the women in my household the greater part of them has fierce mars laid low and hector him who was alone left him who was the guardian of the city and ourselves him have you lately slain therefore i am now come to the ships of the Achaeans to ransom his body from you with a great ransom fear o Achilles the wrath of heaven think on your father and have compassion upon me who am the more pitiable for i have steeled myself as no man has ever steeled himself before me and have raised to my lips the hand of him who slew my son thus spoke priam and the heart of Achilles yearned as he bethought him of his father he took the old man's hand and moved him gently away the two wept bitterly priam as he laid Achilles feet weeping for hector and Achilles now for his father and now for patrickless till the house was filled with their lamentation but when Achilles was now sated with grief and had unburdened the bitterness of his sorrow he left his seat and raised the old man by the hand in pity for his white hair and beard then he said unhappy man you have indeed been greatly daring how could you venture to come alone to the ships of the Achaeans and enter the presence of him who has slain so many of your brave sons you must have iron courage sit now upon this seat and for all our grief we shall hide our sorrows in our hearts for weeping when out of alice the immortals know no care yet the lot they spin for manners full of sorrows on the floor of Job's palace they stand two urns the one filled with evil gifts the other with good ones he for whom Job the lord of thunder mixes the gifts he sends will now meet with good and now with evil fortune but he to whom Job sends none but evil gifts will be pointed at with a finger of scorn and the hand of famine will pursue him to the hands of the earth and he will go up and down the face of the earth respected neither by gods nor men even so that it befall Peleus the gods endowed him with all good things from his birth upwards for he reigned over the murmur dens excelling all men in prosperity and wealth and mortal though he was they gave him a goddess for his bride but even on him too did heaven send misfortune for there was no race of royal children born to him in his house save one son who was doomed to die all untimely nor may I take care of him now that he is growing old for I must stay here at Troy to be the bane of you and your children and you too opriam I have heard that you were a four-time happy they say that in wealth and plentitude of offspring you surpassed all that is in lesbos the realm of Mechar to the northward Phrygia that is more inland and those that dwell upon the great helispont but from the day when the dwellers in heaven sent this evil upon you war and slaughter have been about your city continually bear up against it and let there be some intervals in your sorrow mourn as you may for your brave son you will take nothing by it you cannot raise him from the dead here you do so yet another sorrow should befall you in prime answered oh king bid me not be seated while Hector is still lying uncared for in your tense but accept the great ransom which I have brought you and give him to me at once that I may look upon him may you prosper with the ransom and reach your own land in safety seeing that you have suffered me to live and to look upon the light of the sun Achilles looked at him sternly and said vex me sir no longer I am myself minded to give up the body of Hector my mother daughter of the old man of the sea came to me from jove to bid me deliver it to you moreover I know well opriam and you cannot hide it that some god has brought you to the ships of the Achaeans for else no man strong and in his prime would dare to come to our host he can either pass our guard unseen nor draw the bolt from my gates thus easily therefore provoke me no further lest I sin against the word of jove and suffer you not simply as though you are within my tense the old man feared him and obeyed then the son of Peleus sprang like a lion through the door of his house not alone but with him when his two squires Altamedon and Alchemist who were closer to him than any others of his comrades now that patrickless was no more these undyoked the horses and mules and bade primes herald and attended be seated within the house they lifted the ransom for Hector's body from the wagon but they left two mantles and a goodly shirt that Achilles might wrap the body in them when he gave it to them to be taken home then he called to his servants and ordered them to wash the body and anointed but he first took it to a place where prime would not see it lest if he did he should break out in the bitterness of his grief and enrage Achilles who might kill him and sin against the word of jove when the servants had washed the body and anointed it and had wrapped it in the fair shirt and mantle Achilles himself lifted it onto the buyer and he and his men then laid it on the wagon he cried aloud as he did so and called on the name of his dear comrade be not angry with me patrickless he said if you hear even in the house of Hades that I have given Hector to his father for the ransom it has been no unworthy one and I shall share it equitably with you Achilles then went back into the tent and took his place on the richly and laid seat from which he had risen by the wall which was at right angles to the one against Priam was sitting Suri said your son is now laid upon his buyer and has ransomed according to desire you shall look upon him when you take him away at daybreak for the present let us prepare our supper even lovely Naomi had to think about eating though her 12 children six daughters and six lusty sons had all been slain in her house Apollo killed the sons with arrows from his silver bow to punish Naomi and Diana slew the daughters because Naomi had vaulted herself against Leto she said leto had born two children only whereas she had born many whereupon the two killed the many nine days did they lie weltering and there was none to bury them for the son of Saturn turned the people into stone but on the tenth day the gods in heaven themselves buried them and Naomi then took food being worn out with weeping they say that somewhere along the rocks on the mountain pastures of syphilis where the nymphs live that haunt the river Achalos there they say she lives in stone and still nurses the sorrow sent upon her by the hand of heaven therefore noble sir let us too now take food you can eat for your dear son hereafter as you are burying him back to Ilias and many a tear will he cost you with this Achilles sprang from his seat and killed a sheep of silvery whiteness which is follower skinned and made ready all in due order they cut the meat carefully up into smaller pieces spitted them and drew them off again when they were well roasted Ottoman brought bread and fair baskets and served around the table while Achilles dealt out the meat and they laid their hands on the good things that were before them as soon as they had had enough to eat and drink priam descendant of dartiness marveled at the strength and beauty of Achilles for he was a god to see and Achilles marveled at priam as he listened to him and looked upon his noble presence when they had gazed their fill priam spoke first and now okaying he said take me to my couch and we may lay down and enjoy the blessed boon of sleep never once in my eyes been closed from the day your hands took the life of my son I have graveled without ceasing in the mire of my stable yard making moan and brooding over my countless sorrows now moreover I have eaten bread and drunk wine hitherto I have tasted nothing as he spoke Achilles told his men and women servants to set beds in the room that were in the gatehouse and to make with good red rugs and spread coverlets on the top of them with woollen cloaks for priam and idiots to wear so the maze went out carrying a torch and got the two breads ready in all haste then Achilles said laughingly to priam dear sir you shall lie outside lest some counselor of those who in due course keep coming to advise with me should see you here in the darkness of the flying night and tell it to Agamemnon this might cause delay in the delivery of the body and now tell me and tell me true for how many days would you celebrate the funeral rites of noble Hector tell me that I may hold a loo from war and restrain the host and priam answered since then you suffer me to bury my noble son with all due rites do thus Achilles and I shall be grateful you know how we are pent up within our city it is far for us to fetch wood from the mountains and the people live in fear nine days therefore will we mourn Hector in my house on the tenth day we will bury him and there shall be a public feast in his honor on the eleventh day we will build a mound over his ashes on the twelfth if there need be we will fight and Achilles answered all king priam shall be as you have said I will stay our fighting for as long time as you have named and as he spoke he lay his hands on the old man's right rest in token that he should have no fear thus then did priam and his attendant sleep there in the forecourt full of thought while Achilles lie in the inner room of the house with fair Brysus by his side and now both gods and mortals were fast to sleep through the live long night but upon mercury alone the bringer of good luck sleep could take no hold for he was thinking all the time how to get king priam away from the ships without his being seen by the strong force of sentinels he hovered therefore over priam's head and said sir now that Achilles has spared your life you seem to have no fear about sleeping in the thick of your foes you have paid a great ransom and you have received the body of your son where you're still alive in a prisoner the sons who may have left at home would have to give three times as much to free you and so it would be of agnomenon and the other Achilles were to know of you being here when he heard this the old man was afraid and roused his servant mercury then yoked their horses and mules and drove them quickly through the host so that no man perceived them when they came to the ford of ediings anthus begotten of immortal jove mercury went back to the high Olympus and dawn in robe of saffron began to break all over the land priam and edius then drove on towards the city lamenting a making moan and the mules drew the body of hector no one either man or woman were saw them cocasandra fair as golden venus standing on pergamas called sight of her dear father and his chariot and his servant that was the city's heralds with him then she saw him that was lying upon the buyer drawn by the mules and with a loud cry she went about the city saying come hither trojans man and woman and look upon hector if ever you were choice to see him coming from battle when he was alive look now on him that was the glory of our city and all of our people at this there was not a man or woman left in the city so great a sorrow had possessed them hard by the gates they met priam as he was bringing in the body hector's wife and his mother were the first to mourn him they flew towards the wagon and laid their hands upon his head while the crowd stood weeping around them they would have stayed before the gates weeping and lamenting the lived long day to the going down to the sun had not priam spoke to them from the chariot and said make way for the mules to pass you afterwards when i have taken the body home you shall have your fill of weeping at this the people stood asunder and made a way for the wagon when they had borne the body within the house they laid it upon a bed and seated minstrels rounded to lead the dirge where on the women joined in the sad music of their lament foremost among the mall and drama k led their wailing as she clasped the head of mighty hector in her embrace husband she cried you have died young and leave me in the house of widow he of whom we are the ill-starred parents is still a mere child and i fear that he may not reach manhood he or he can do so our city will be raised and overthrown for you who watched over it i know more you who were a savior the guardian of our wives and children our women will be carried away captives to the ships and i among them while you my child who will be with me will be put to some unseemly tasks working for a cruel master or maybe some mccheon will hurl you or miserable death from our walls to avenge some brother or son or father whom hector slew many of them have indeed bitten the dust in his hands for your father's hand in battle was no light one therefore do the people mourn him you have left oh hector sorrow unutterable to your parents and my own grief is greatest of all for you do not stretch forth your arms and embrace me as you lie dying nor say to me any words that might have lived with me in my tears night and day forevermore bitterly did she weep the while and the women joined in her lament hekuba and her turn took up the strains of well hector she cried dearest to me of all my children so long as you were alive the gods loved you well and even in death they have not been utterly unmindful of you for when achilles took other of my sons he would sell them beyond the seas to samos imbrose or to rugged lemnos and when he had slain you too with the sword many a time did he drag you around the sepulchre of his comrade though this could not give him life yet here you lie all fresh as dew and comely is one whom apollo is slain with his painless shafts thus did she too speak through her tears and bitter moan and then helen for a third time took up the strains of lamentation hector said she dearest of all my brothers-in-law for i am the wife to alexandris who brought me hither to troi would that i have died ere that he did so 20 years are coming gone since i left my home and come over the seas but i have never heard one word of insult or unkindness from you one another would chide me as it might be one of your brothers or sisters or of your brother's wives or my mother-in-law for priam was as kind to me as though he were my own father you would rebuke them and check them with words and gentleness and goodwill therefore my tears flow both for you and for my unhappy self for there was no one else in troi who was kind to me but all shrink and shudder as they go by me she wept as she spoke and the vast crowd that was gathered round her joined in her lament then king priam spoke to them saying bring wood otrogens to the city and fear no cunning ambush of the archives for achilles when he dismissed me from the ships gave me his word that they should not attack us until the morning of the 12th day forthwith they yoked their oxen and mules and gathered together before the city nine days long did they bring in great heaps of wood and on the morning of the 10th day with many tears they took brave hector forth laid his dead body upon the summit of the pile and set the fire there too then when the child of morning rosy finger dawn appeared on the 11th day the people then assembled around the pyre of mighty hector when they were got together they first quenched the fire with wine wherever it was burning and then his brothers and his comrades with many a bitter tear gathered his white bones and wrapped them in self robes of purple and laid them in a golden urn which they placed in a grave and covered with large stones set close together they then built a barrel hurriedly over it keeping guard on every side as the achilles should attack them before they had finished when they had heaped up the barrel they went back into the city and being well assembled they held nigh a feast in the house of prime their king thus then did they celebrate the funeral of hector tamer of horses end of book 24 and end of the Iliad by Homer


Migration was, in fact, correct. Anybody who's done large-scale data migrations on old legacy databases knows that actually convincing yourself that the migration worked for all of the database rather than most of the database is fraught with peril. Allows the individual changes to be testified, and then it simplifies the promotion of the changes. By isolating these individual changes and composing them, we are effectively versioning the database. And we should have automated scripts associated with each one of these small sets and the collection of all of these steps, which will allow us to take a database that is at the current production level, whether that be in a UAT environment, whether that be in production, and apply those changes to it. And because, just like we do with everything else in this pipeline, first you apply the changes to the development database. And then you apply those same changes into the next stage of your pipeline. And each one of those tests is increasing your confidence in the quality of the migrations and the quality of the updates to the database. So by the time you're actually doing it to the production database, this is not the first time you are making those changes. And so you have increased confidence that this upgrade of the database is really going to work. And I really can't emphasize enough, I don't really think DBAs worry so much about the change to the database. Yes, they probably worry about how the change is going to affect performance, since developers very often don't think about the performance impacts of some of their database changes. But mostly, I think DBAs worry about the migrations. What's happening to the data, because that database is an important asset to the organization, and they're the gatekeepers. And so if something goes wrong with their data, it's the DBAs who are on the line first. And so making sure we understand how to safely migrate databases is really a key part of convincing DBAs that we can in fact evolve databases. There is a book about the subject. This has actually helped in convincing DBAs that they can do this, in part because the people who wrote the book are not just developers, they're people who understand the data world. So the second question I often get asked is, why do we even worry about this? Now, because this is an agile conference, I don't have to convince you that we can't know on day one what our entire data model is going to look like, even necessarily six months down the road, let alone two or five years down the road. So we evolve databases because our data changes, but it's not just our data. And in many ways, what's more important, it is also how we understand our data, how we wanna access our data, how we're gonna use our data and what this data means to us. And when you think about this in the context of how do I know something is going to be a performant configuration, if I'm moving from a system where I have predominant reads and not a great deal of rights to a system where all of a sudden that balance has changed, what I have to do to make sure that that database is performant is going to look very different. So even our access patterns, and therefore what the impact of that is on performance can evolve over time. Okay, so let's get a bit more specific. First I wanna talk about document databases. This is one of the category of the aggregate databases and to remind you all what I mean by aggregate is rather than thinking about an individual field, so think about a customer order for example, rather than just thinking about the address field or the name field, when I operate on an aggregate, I am operating on the whole customer order. When I conceptually think about copying and moving and persisting and changing, I'm not thinking about it on the individual field level, I'm thinking about it as an aggregate. And so we're using this aggregate in the same sense that Eric Evans uses it in domain-driven design. This is what we mean by aggregate database. So it's a document that's stored. The document has structure to it. So when we are talking about the document data class, that structure is actually visible to you. In the key value store, you don't necessarily see the structure that's within the blob. In a key value store, you have a key that refers to a value and while some of the key value stores are now allowing some visibility into that blob, conceptually, if you wanna really distinguish these different types, key value store, you've got a blob where you don't really know anything what's in it, whereas in the document database, the structure is visible to you. The structure therefore is also accessible for queries. So you can use the various fields within the structure to retrieve items from the document database. And the structure is also used for indexing. This is another question that's often get asked, well, if you don't have a relational database, how can you build an index? Well, those two characteristics are completely orthogonal and I think it demonstrates to us how much our thinking about persistence mechanisms have been influenced by relational databases where we think something as fundamental as an index could only work in the relational context. So the structure of these documents, you can select which ones of these fields within the structure can in fact be used for indexing. Most of what I'm gonna tell you about right now, although it generally applies across the document class, is gonna be focused on MongoDB. It's one of the major contenders in the document database market. That doesn't mean it's the only one and that there is very little in here that is Mongo specific, except perhaps some of the terminology. So, again, what is a document? You can almost think of this as an object with no methods. If you've been around in the structured programming aspect or era of computer programming, this is just a data structure. This is a collection of fields where you have names associated with the different fields, you have types associated with it, but these documents don't have any methods attached to them. So it's simply a complex data structure. The individual components of this document are key value. So these are effectively named fields. MongoDB actually stores these things in Besan, which is just a binary form of JSON. Not necessarily terribly important. What is important is you retrieve it using a specific query language. So it's not that we don't have a query language. Again, the NoSQL name is pretty bad. It's just we don't have the relational data model and therefore the existing SQL language, which is focused really around relational retrieval, isn't applicable. So what does it mean to query a document database? Well, obviously you have to tell it what you're looking for. So if you have indexes, what is the value of the index that you're looking for? So you are gonna specify effectively the where expression. What am I looking for? That's the fundamental part of the query. In the case of the Mongo query language, you can also specify what order do you want these things to come back in. We often think of things as coming in a particular order in the way that we design them in the database. We have an order by. We can give hints to the optimizer. There is nothing magical about the Mongo query language that will make all of the queries wonderfully efficient. So you can actually give hints to the optimizer much like we can give hints to the query optimizer and the relational world. There's a lot of other stuff in the query language about the way you can specialize this that is well beyond the scope of this talk. But what you get back is a result set. You get a cursor to a series of documents that correspond to the query, whatever query it is that you gave. Okay, I wanna talk a little bit more about indexes and this is going to become a bit more important when we talk about how you might change a document and therefore evolve a document database. When we think about an index in a relational context, I think most people think if I supply an index, that's gonna help me get to everything in my database. Well, we don't have the same kind of restriction in a document database. So if I specify a field to be an index, what if that field doesn't appear in a particular document? What does an index mean in that context? And so in Mongo, you have sparse indices which is you explicitly saying this index should only retrieve things that have this particular field. Now, what does a sparse index imply then? If you query on the basis of a particular index and the document you really want doesn't have that field in it, it is not going to come back. So when you think about sparse indices, you have to understand not just the structure of your database, but how it is currently populated, understand the behavior that you're going to get with that particular index. So now we're in a project and we have a Mongo database within our project and we're on iteration N plus one and we need to change our database. What do we need to think about from the perspective of evolving this representation, assuming once again that we've got an instance of this running in production so somebody out there really cares about the data that's in the current instance of the database. The first thing to remember about a document database and this is in fact part of its power is all the data doesn't have to look the same. Every document doesn't have to have all of the same fields. This is part of the strength of the document database but it's something that you have to think about in terms of performance. So there is a sense in which this feels really liberating. Well gee, I need to add a field. Cool, all I have to do is add it. You don't have to muck with any of the database stuff and I can just go on. But you have to think about what does it mean if some documents have that field and others don't. Since queries can return subsets you can start to think about how might I partition things within my database. So I might have some kind of, let's say I'm working in a product catalog and I have different product categories and I'm an electronics retailer and so cell phones have all kinds of additional things you have to keep track of with a cell phone that you really don't have to for a DVD or for a computer. And so you can think about I can come up with these categories. I can still have one universal product catalog but I can have an alternative structure that represents all of this interesting stuff I need for cell phones. And then if now I'm suddenly carrying a completely new kind of thing, I can say okay well in looking at my data it makes sense for me to now say I've got a new product category and this is what the structure is for this particular product category. And so you can structure your queries in such a way that if you're looking for cell phones the fact that you've added a completely different category for various brands of rice is not going to impact anything that you do with your cell phones. It's also easy in this context to ignore added information. You do have to understand how you are processing your N pound documents but even if you are working with a document that has fields that have been added this particular structure makes it easier for you to ignore that added information if it doesn't apply to you. However if you're going to add something that you want to actually consider as a non-sparse index you have to then think about I'm going to have to migrate the other data. If I suddenly have something that I want to ensure indexes across my entire document database this should seem obvious but it does mean I have to migrate things, I have to decide what am I going to add to that to each one of those individual documents to give it the proper value for that index fields. What sometimes then happens with this there are questions about do I migrate my database all at once? Do I migrate it as I access it? Do I migrate it based on some slice? Those are all different possibilities depending on how big your database is. We've had situations where you might actually want to consider a version number that will help you understand where your particular document is within this evolutionary path. So these are some of the things that you need to think about even though on the surface it might be oh okay I can slap anything in this in this database that I want and Mongo is not going to put any requirements on you in terms of how you structure this but this is what you have to think about from the context of your data model and how you're representing that in Mongo. An important part of this is don't forget the law about how we communicate with information sources. You want to be a tolerant reader and a magnanimous writer. You want to be very, very careful and respectful about what you write and you want to be very liberal about what you read. You want to make sure that you accept everything possible in terms of reading as long as it gives you what you want and this applies in thinking about how you're going to structure queries and how you're going to structure your documents within a document database. Okay so what about testing? And when we talk about testing we are talking about primarily testing in this context whether the migration worked. Whether and whether the new access code that we're putting into our system will work with the newly configured database. So first thing we have to think about obviously is the indexes. Have we properly accounted for indexes? If we are introducing something that needs to be a universal index we need to decide what that default value will be or what the proper value will be for all of the existing documents in the database that don't currently have that field and we have to test whether or not our migration appropriately provides that value across the database. We also need to look at any place that is more particular about what it reads on the particular documents and ensure that the new structure hasn't broken any of the access code in any way. Now there are lots of things we can do about how we structure our code to ensure that doesn't happen but these are the primary changes that you are going to have in working with a document database. You're either going to be adding a field and that field may or may not be an index. You might be deleting a field but that's usually, that isn't as common in an enterprise context. They don't like to throw data away. They might rename it but things enterprises don't like to give up data they have so that is a less common occurrence. You're more likely going to be adding particular fields and that's where you have to think about does the migration properly maintain the semantics of documents that are not supposed to be altered by the migration and if in the case of an absolute index do I have the proper values and therefore do my queries return what it is I want. Now I brought up the product catalog earlier because I actually think this is a very good example of where a document database comes in handy. If you think about things from a retail context retailers have in general lots of different kinds of products. One of the things that retailers often want to do as well is say, well if you buy a new DVD player you can get three DVDs for free and so even though you have very different characteristics of these different kinds of products you do have to have them in some kind of compatible structure so you can structure these promotions around them. Having worked with various product catalogs it can be incredibly frustrating when you are looking at trying to fit this into a relational model because all products are not equal and so you end up pulling all of the tricks that we've learned on how do you make a more rigid schema flexible enough to take into account, you know a cell phone has all of these different things. You might have different characteristics on your refrigerators or maybe you need to track energy efficiency to give some report to some government entity on whether or not your store is green enough in its sales. So this is an area where the product catalog actually I think takes advantage of the flexibility that you have within the document data structure but it also does help you understand as you start to think about things like promotions why these in fact should be in a unified database not I've got a mobile phone database over here and a DVD database over there. So that's document databases. Now what about graph databases? Graph databases are something completely different. When you think about a graph database first we need to step back and okay well what is a graph? Well graphs have nodes and edges and all kinds of things like that. So how would you represent your data in a graph? And I've had many spirited conversations with some of the people from Neo4j on just how widely applicable graph databases are. But there is one thing that I agree with them absolutely there is data that is very clearly graph and that the only representation that it really makes sense is to think about this as a graph. So when you're looking at your problem well how would you model your particular data in a graph? Well the first things you have are nodes and nodes are the building blocks if you will of graphs and very often they have some form of identity so if you wanna use a social graph it's one of the more common things that people think about as graphs. The nodes are you and you've got an identity and there are probably properties associated with you. And then very important in this graph context are the relationships and this is how we move from one place to another in a graph. So you can ask who are my friends and there is a friend relationship that goes from me to the other nodes of the people who represent my friends in the social graph and again those things can be typed. So I could categorize my friends as maybe friends from work versus friends from high school versus friends from my neighborhood. So you can have properties, you can type these edges and so you can have a particular type friend which has particular modifiers friend from high school, friend from work, et cetera. And the key thing that you do with a graph is what you're really interested in is not so much a node and not so much the edges that go out of a particular node but the paths through the graph. How do I connect to my sister, to the people that she went to school with? What are the paths through this graph? So the important information when you're thinking about a graph database is not so much the nodes that are in it but the paths that you can follow. And paths as you traverse a path you are going through both nodes and edges. And those are both important pieces of information when you think about the query is what nodes have I captured along the way on this path and what relationships along that path have I had to exploit to get there? And so when we talk about querying in a graph database what we are doing is we are constructing a request for a path. Do you have a path starting from here that looks like this? That is what a query is in a graph database. It's a very different notion of query which is why if you've not worked with graphs before it might be a difficult transition to go to a graph database because you have to think about your data model very differently. And you have to think about what a result is very differently than you do in other contexts. And that way some of the other aggregate based NoSQL databases are more natural because we think about objects. Graphs are not objects. Graphs are something very different. Neo4j is probably the best known example. And so where I need to be specific or use a specific name for that I will use Neo4j terminology but everything I'm gonna say applies to graph databases in general. An edge in a social network would be like a friend. So I have a friend, there's an edge that goes from me to Badri and that might have a specific qualifier that I know him from work. Yes, Badri is the node, friend is the edge. So actually I'll get to that right here. Basic graph concepts. So an edge has a node on either end. Okay, so one of the first things we need to think about when you start talking about searching a graph is how am I going to search it? And there are two primary ways of searching a graph. Either breadth first, which means if I'm starting with me and I have 100 friend edges, I'm going to take one step on all of those edges, collect all of those nodes that are one away from me. And then I'm going to go to this first one in that level one. And I'm going to go one step there and one step there and one step there. So I am going wide but shallow in my search approach. Depth first, on the other hand, says I'm going to go to the first friend and then I'm going to go to their person's first and then I'm going to go to their person's first and I'm going to chase that path as far as I can. And then as soon as I get to whatever constitutes an end, I'm going to back up one and start again. So I'm always going as far away from the node as possible. Now where this matters is it's going to alter what you find because if you say, find me the first, well the first is going to be very different if I'm looking this way or if I'm looking that way. Again, that's not something we necessarily think about when we think about objects. The only time we think about firsts if we're dealing with a sorted collection first might have some meaning. But this whole notion of am I going to go broad or am I going to go deep really isn't something that we necessarily think about in terms of objects until we start to get into things that look like link lists and then you're starting to get into things that look more like graphs. Cycles become a problem in graphs. If I am chasing a path, what does it mean if I come back to myself? Sometimes I might want to be able to explore multiple paths through myself. If I'm interested in only finding unique things I'm going to potentially stop when I get back to myself.  Again, not necessarily something we think a great deal of when we deal with objects. Connected components, when you look at a graph you might find a group of nodes that are all connected to one another and that might be of importance to you. You might have this group where you can say, okay, all of these people know all of these other people. Okay, well that's a component in some way and that might be of interest to you. What actually might be of more interest to you is where's the lone edge that gets out of that particular group? Again, these are concepts that come from graph theory that are of relevance when you start to think about what are the important insights I'm going to try to pull from this graph? What is my data telling me when I look at it in this graph representation rather than in some other representation? Sometimes it matters, directionality of an edge. I might say, Badri is my friend and Badri might decide, well, Rebecca's not my friend. But there are other things, sisters. Much as my sister might like or dislike me, I'm her sister and she's my sister and there's nothing we can do about that relationship. So there are some relationships that are inherently directional. Some of them might be because of time. It doesn't make sense for a father-daughter relationship to be bi-directional necessarily because I can't be my father's father. Some are inherently non-directional like sister. Another thing you have to think about when you're talking about how am I going to transfer my data into this graph model? And sometimes path length matters as well. So maybe I'm looking for the closest. Maybe I'm looking for everything within some degree of separation. Or maybe I'm looking for what's furthest away. So sometimes an important piece of information is not so much that a path exists, but how long the path is. So all of this is about graph data modeling. The standard way to think about this is nodes represent your entities. People, companies, products, places, those are your nodes. And you can have identities associated with that and you can have properties associated with that. And then relationships, well they capture relationships. They capture what it means. How does this particular entity relate to another? I live in a particular house. I work for a particular employer. I went to a particular school. These, those relationships are what we capture on those edges and what you should see from that as well is there doesn't just have to be edges from people to people. They're edges for people to places and people to institutions and organizations. These edges represent how all of the different discrete entities within this data universe that you're talking about correspond with each other. And then paths tell us how different nodes relate to each other through these various relationships. So maybe I want to find all of the people who went to my school and donate money to the International Rescue Committee. I'm chasing lots of different edges in that relationship. So now how do we specify a traversal? This is where we're gonna get a bit more Neo4j specific in any terminology that I use, but the concepts are still the same. And the first thing you have to tell it is what order? Do you want to look broadly first or do you want to chase paths as deep as they go? What edges should you use? So you can specify I want to navigate friend relationships and donor relationships but I don't want to navigate say employed by or educated by specify what kind of relationships you want to chase in this particular traversal. And if there is directionality, what direction you want to go? And uniqueness, this is what tells you what do I do when I run across a node that I've already seen before? How do you want me to handle that? Do you want me to stop? Do you want me to go on in the traversal? And then most very importantly, where to start? When you think about a graph and all of these things I've been talking about, what's a logical beginning? Well, why would I begin it? People rather than schools, rather than places. So all of these traversals, you have to say, how do I find the start? Whether it be a particular node, tell me where I have to start. And then of course, tell me when the traversal is going to end. This is my query and what comes back from those queries are the paths within your data that satisfy that particular traversal. So you know what nodes were visited and you know by what edges, by what relationships those particular nodes were encountered. How do you capture the, just like any query, a query happens at a given point in time. So if I query it twice, I might in fact get two different results because the underlying data has changed. But I'm not sure, it could be the DAG, it doesn't have to be a DAG. But so at a given point in time, you say I want to traverse this graph and that traversal is going to return some particular subset of the graph. Now the graph can change. And you have to query to get, yes. Just like in a different kind of database, every time you look up a customer you're still gonna re-query the customer because something might have changed. Same kind of thing. An interesting question though because very often people somehow think of graphs as being more static than other kinds of data sources. I get LinkedIn requests every day. My social graph changes every day as a result of those requests. But this graph, this graph in its entirely, all the nodes and all the edges is no different than a relational database. You can add to it, you can delete it. Let me do it in a time, okay. So what kinds of ways can it change? Obviously you can add new nodes of the types that you understand, add new edges of the types that you understand. But what we're interested here is the structural changes. So what are the structural changes that might go on in a graph database? Maybe you're gonna add a completely different node type than you've had before. Maybe you're gonna add different kinds of relationships than you've never had before. You might add properties to nodes and edges since both nodes and edges can have properties. You could delete properties. Deleting is, of course, again, not as common because enterprises don't like to throw things away. But this might happen in the context of maybe you're renaming, maybe you're collapsing things. And then you can delete any of the other things as well. You might take away relationships. You might take away a particular node type. Again, that's more likely to be a rename than an actual delete. Yes, you can do that through properties. Yes, yes. Okay, so how do we think about this from the perspective of evolution? The first thing to realize is that in a sense, although the document database is a collection of documents, you can think of those aggregates in isolation. It doesn't make sense to think of a node in isolation from its database. When you start to represent something in a graph, the information is not just part of the graph. It's the graph in its entirety. And so conceptually, you want to think of this entire graph, whatever you're putting in this database, as a single graph. Now, of course, when you're doing a traversal, you're explicitly pulling out one aspect of that graph. But you should still think of this conceptually as a single graph. Properties in this context are used for indexing. So all of what I told you before in terms of how you have to think differently about indices are going to apply when you manipulate properties. Because relationship types are used for traversal, you need to watch out that you don't orphan somebody. Because remember, you specify a start and you specify how you're going to get to things through edges. So unless you know about something as a possible start node, if you take all of the relationships out of it, you have an orphan in your database. You have no way to get to it. Because all of your accesses are through either using it as a start node or finding it in a traversal. So one of the things you need to look out for when you are doing these migrations is, have I created any orphans? If from my application, I know I always started this particular node type, and all of a sudden I have something of a different node type that has no edges or has no incoming edges if all of my traversals are directional, I have an orphan. And part of that migration needs to be asking the question, what do I do with the orphan? Is it something that doesn't apply anymore? Do I need to find some other anchor to tie this orphan to? That's not the kind of problem we generally think about in relational database concepts. But this is something that you have to think about when you start removing edges. Because you only get to things in those two ways. I can be a start node or I can be found on a traversal. And then of course, new paths can result when you add relationships. So when I was trying to think of a, oh, let me talk about testing first.  Now one thing to think about, although for those of us who got to take algorithms courses in university, we had to program graph traversal algorithms and we could get it right or we can get it wrong. Well, just like generally speaking, one doesn't assume that if one gives a SQL query to a database, it's not going to return the stuff that's there. If we are properly specifying a traversal, we shouldn't be worrying about whether that traversal is correct. We need to be worrying about did we specify the right traversal? Did we include all of the proper edges? Did we include the proper end conditions? Things of that nature. So while there is an aspect of people who like to write programs, who want to worry about all of the code that makes something happen, this like SQL is a more declarative representation of a query. Don't worry whether the traversal works or not. That's not your problem. Worry about whether or not you specified the traversal properly. And when you're thinking about migrations, we still have to worry about indices. If you've messed around with the properties and any of the changes that you've made, then you need to think about how your things are indexed. If you've removed edges, you need to worry about orphans. If you've added edges, you potentially need to worry about cycles. Because you might have added a path back to yourself that didn't exist before. So there are lots of different things you have to think about in a graph database as you change it to make sure that your data, this graph, still represents all of the same assumptions that you had for it in the past. Because when you start to think about queries in terms of traversals, different kinds of problems can come up. Now when I was trying to think about an example, everybody talks about the social graph. And I wanted to think of something different. And so I started to think about, okay, well what if you were gonna be building some kind of graph that represented politicians and political parties and donors? And then what would happen if you merged that with some kind of corporate structure on who sat on boards and which companies owned which other companies? And all of a sudden you could conceive of a query that might find is there some kind of improper relationship between this politician and this company through this range of political contributions and boards and all of that sort of stuff? That is a graph problem. You are trying to exploit different kinds of relationships who's sitting on a particular board, which board corresponds to a particular organization, political donations, party affiliation, all of those kinds of things. You're combining very different relationships and you could have had those two very different structures and all you would have to add is a bit of information really about, you know, okay, the people over here, what's their donor profile? And now you can start to find relationships between individuals in influential positions in companies and influential positions in government. That's a different kind of graph problem than what you'll normally hear talked about. Okay, I don't have too much time yet. I just want to make a plea for polyglot persistence. We have talked about polyglot programming. One of the things that I am particularly excited about with NoSQL databases starting to get attention is we can finally start thinking about what constitutes the right persistence mechanism for our data. So we don't have to shoehorn a graph into a relational database. You can represent a graph in a relational database. It can be done. That doesn't mean the things that you want to do with that graph are easier natural to do in a relational database. And so this at least allows us to ask the question, what is the right way to represent this data? Which is, and sometimes that's relational data. There are pieces of data that are very nicely handled with a traditional relational database model and traditional relational databases. This doesn't mean don't ever use a relational database again. It's just, oh, you have data, therefore you put it in a relational database. That's what needs to change. So then the advantages, you've got to fit for your data model. You can think about what is the right way to look at this data. You can optimize it for your access patterns. Do you have heavy reads? Do you have heavy writes? Do you have completely different access patterns where maybe one storage mechanism is right for the rights, but then you want to farm it off to a different kind of data structure for reporting or analytical purposes. You can think about scaling differently because you've got different options. How you scale a graph database is very different than how you scale a document database to a relational database. You can think about what's right for your particular problems for scaling. And very often, if you use the right tool for the job, rather surprisingly, it goes faster. So if you're really worried about time to market by being able to take a little bit of time and decide this is the right way to do this, you can in fact get to market more quickly. However, comma, you got more decisions to make. You actually do have to think about these things where it used to be you didn't because if you had data persist, you put it in the enterprise relational database. That's what you did and you didn't even have to think about it. Thank you for your time. I've got a couple of minutes for questions if anybody has one. Yes, that varies so widely across the different databases because how you map an object onto a document in Mongo is very different than how you might map an object onto a column store. So you'd have to get a whole lot more specific than that. There are tools that make it easier to work with some of these different databases. But I would start with what's the right data model for the persistence and then start to look at what tools are available in that context. Yes, yes. The big question is you have to figure out how you want to represent your data as a document. But it's migrating the data. So the big question is how do you represent it and then how do you decide that you've actually properly migrated the data? But the first question is what should it look like in this new context? It's not the same as migrating from relational to relational because you're changing the underlying business model or underlying data model. Yes. It varies widely. CouchDB, for example, is known for its replication capabilities, but it varies widely across the different ones. React is very well known for its distribution model. So what you have to look at is what's the intersection between the capabilities that you have and the data model that you want. Eventually, all of the databases will have some kind of story around things like replication, but right now, some of them are more concerned about particular problems than others. So you might not be able to find one that has first-class management tools and replication right this instant, but they all know they have to worry about management tools and they all know they have to have a story around replication. Yes. I think it depends on the data model. I think when you think about it initially, it's easy to say, I'm free from the DBA. I'm free from the schema. I'm free from the relational data model. And so it's easy to think, okay, that means it's going to be easier to evolve. But I think it really does depend on what is the underlying conceptual model of your data and how that's tracking on the path. Some changes are actually relatively easy to make in a relational databases. Some changes, when you make them in a graph database, might be incredibly hard. So it's the process that you use to evolve the database helps make it as easy as possible. But depending on how far you're going from your data model, it might be very difficult to make a particular migration or a particular change in a document because you might need some kind of data model that isn't inherently supported. Just like some changes are very easy in a relational database, but if you all of a sudden wanted to get some kind of infinite depth graph traversal, that's going to be really hard to do in a relational database. So it really comes down to what are the properties of your data and how are you trying to change the properties of those data as you evolve? Can be what for evolution? Yeah, I think it's easier to do that in the no SQL databases because you don't have as many of the constraints. However, you might get yourself into a case where the relational database would have given you protection that you really want, that you don't have in that database. But my sense is you do have more flexibility when you're in the no SQL world, but that comes at a cost because the relational world does give you a lot of safeguards that sometimes are actually quite useful. I think what you're asking is do I know of any examples where a graph database is used to manage relationships amongst various documents? I don't know of any. I don't know that there's anything that would preclude that. One of the issues that you would want to be aware of is how do you actually maintain the consistency between the graph database and the document database? And so you're getting into issues, particularly when you think about things like eventual concurrency. If you've got two databases, two data stores, that are related in that way that have different kind of consistency and characteristics or potentially different distribution across your cluster, you might get into some interesting data problems when those things get out of sync. And this is the last question. Or I need consistency rather than eventual consistency. Then you've got to figure out how your system supports eventual consistency. Is it harder to, or actual consistency? Is it harder to do that? Or is it harder to contort your data to put it into a relational database? Okay, well thank you very much for your time.


All right, here we go. Here we go. My first impressions of the OnCloudX running shoe, a road running shoe. I took it out on the roads today, but also as you saw in the snow and the slush, I must say, I was pretty impressed. My feet did not get that wet in this shoe. I was a little surprised. That's good news. Good job on. As far as the upper construction, it seemed to keep a lot of that moisture out. So brand new, this shoe will cost you $140. So I would say middle to high as far as pricing for this type of shoe. And it's a six millimeter drop from heel to toe, six millimeter drop. And my shoe is weighing in at seven and a half ounces, although they're advertising it for eight ounces on their website. So some people in the comments, maybe 10 days ago when the shoe arrived at my house, they were saying and commenting that this is more, the OnCloudX is more of a cross training shoe or an active lifestyle type shoe. And I might agree with that. I might agree with that. I think it's the OnCloud Flyer that has a little more cushion to the shoe. And so I'm actually pretty interested in trying that shoe out at some point. The OnCloud Flyer is what I'm reading on their website has just a little more cushion. So what happened today? I took it out for 12 miles and it was a solid run by mile 11 to 11 and a half. I will say in my left foot, so actually this shoe over here on my four foot, so right under my toes, I was feeling just a little bit of, I don't want to call it a pain, but kind of a pressing feeling on the bottom of my foot because a little lack of cushioning through the four foot. And I will just say, I think the outsole rubber on the OnCloudX and probably a lot of the OnCloud shoes is just a little hard. I'm just going to put it out there. I don't know what you guys think, but it feels like they could soften up the rubber through the outsole just a hair. And I could feel it today in my left foot. And I was like, huh, I'm glad I'm stopping because I don't know if I'd want to go two more miles, three more miles in this shoe is what I was getting at. So I would say this is not going to be a long distance running shoe for me and for the OnCloudX breathability through the upper and it's a, it looks to be a very well constructed upper. As far as durability, it's going to be fascinating to see how this shoe breaks down over time through the upper. But man, it says Swiss engineering on this shoe, man. I must say like, it looks like a really well constructed upper. I will say that and I would love to run in this shoe when it's 90 degrees out in Denver or because it's very, very, very breathable. In fact, if it was below 20 degrees Fahrenheit or six degree negative six degrees Celsius, if it was below that temperature, I think my toes would be very, very cold in this shoe. I think you would agree with me. Like I would probably put on some really thick winter socks to run in this shoe. If it was, let's say below below that 20 degree mark Fahrenheit and for the weight again, eight ounces, 226 grams, you're just crushing it on as far as the weight of your shoes. Like really lightweight. In fact, yesterday in the Nike Vemero 14s, I ran 745 pace in the snow and it, it was, it was hard. Like I definitely felt like I was working a little harder. Today I was running 715s a mile and it was, it was a little shorter run. I will, I will say that, but my turnover felt a lot easier and it was hillier today as well on the, on the route that I took today. So that's something to consider. I think these cloud tech, the cloud technology through the midsole, like how it's basically hollow through the midsole. I'm still trying to figure out the, the cloud, the cloud effect through the midsole, but it does reduce the weight quite a bit. And I say bonus points for that. And a couple of people were asking on Strava actually about the concern of rocks and sticks or any debris on the trails or on the roads getting stuck in the, like between the clouds, whether it's here in the middle on the, on the outsole or even like right through the midsole there, I have not had any issues yet. And listen, I haven't taken them out on the trails yet. So that might be a different story on the trails where there's obviously a lot more rocks and stones to be caught in here, but nothing yet. So that's good. Anyway, I actually wouldn't be too concerned about it. I think, I think the clouds are spaced far enough apart that it would be hard for a rock or a stone to get stuck in there.  When will I use the on cloud X running shoe moving forward? This is what I'm thinking. I would use this shoe for a six to eight mile, maybe 10 mile tempo run on the roads leading up to a half marathon or a marathon. And I just kind of want to go let it rip on the roads just to get that turnover going. And that's how I will use this shoe moving forward. Or I would use this on cloud X shoe for a five K road race. I don't think I would take it to 10 K as far as racing hard, but a five K, I felt fast today in the shoe. I really did. And if you're looking for a shoe that's not a traditional road racing flat, but you still want something that's light enough. And I'm telling you, I don't know what it quite it is, if it's the clouds on the bottom, but it feels like the shoe wants me to go straight forward. And I felt it in the running shoe store the first time I put it on. And I felt it again today. Like I just want to go straight forward with my stride when I'm when I'm in the on, on any on cloud so far. So I got to do some more testing and see there you have it. That's my first impression of the on cloud X running shoe. It feels good, feels fast. I'm wishing for a little more cushion feel, especially through the forefoot, mostly just through the forefoot, especially since I'm more of a midfoot and forefoot striker. The upper feels amazing, very comfortable, very breathable. I think they are nailing the upper really, really well. I like the six millimeter drop kind of middle of the road, not too high, not too low. The shoelaces, nice bright green, and there's plenty of shoelaces to really get a nice lockdown feel. So I'm excited. But again, I just don't think this will be a long distance running shoe. And that's okay. And that's okay. And the keyword for today, it's got to be cloud, got to be cloud down in the comments. And if you have experience in any on cloud running shoe, but especially this one, the on cloud X, let us know, give us your thoughts, your opinions on how it feels for you. I'll be really excited to read your comments and hopefully be able to comment back to as many of you as possible about this road running shoe. Seek beauty, work hard and love each other. Thanks for being here. Second time, second time today.


My name is Neha First of all, thank you all so much for coming. Can you hear me? Okay? Yes, okay great Thank you so much for coming even though I know that whole crew right there for the rest of you It really means a lot that you're here So currently I am I a software engineer at sidewalk labs and also the very recent founder of an Indian clothing site called Lotto But before that I was a mere Mugler Working on Google Maps never show this photo to anybody So you may recognize some of my work So it includes the mini map in the bottom left the popular times graph the send to your phone button But something that I really enjoyed doing behind the scenes was making Google Maps more accessible for keyboard users So let's start with a pretty sobering fact according to the US Census Bureau Nearly one in five Americans have a disability Furthermore of these fifty seven ish million eight point one have difficulty seeing and Nineteen point nine have difficulty with lifting or grasping. So that is twenty eight million Americans who cannot use a computer or a mouse in a traditional manner so you may be wondering well what tools can they use right now to alleviate this and There's actually quite a lot for those who are nearly or completely blind or with limited motor function There's a variety of different screen readers that are available For those with low vision there are screen magnifiers and for those with color blindness There are color filters inverters reducers a bunch of different tools So right away. I want to say this accessibility is not a niche market There is a huge huge population you serve to gain by making your product accessible So maybe some of you are now thinking okay, so what I have a hundred million two hundred million users I don't need twenty eight million, but that's not the only reason to make your product accessible So first of all accessibility is a right and when you work with government funded entities It's also quite often a requirement So if you don't make your product accessible you could face bad press and a lawsuit just like this Second of all the community talks and if your product is the first one of its kind to be accessible You will have the competitive advantage of a very active and loyal user base And lastly, it's just the right thing to do when I was working on Google Maps, I Went to an accessibility meetup and this is kind of in the middle of my work And so I was just kind of asking around you know what what online mapping services do you use today? I haven't really found any of them to be super accessible and I was really surprised. I mean essentially they said yeah We've given up like we just try to make do go to the places where we know to go But we have friends who are scared of even leaving their house because they don't want to feel lost or embarrassed And that to me was like such a motivator I I truly believe we all Deserve to be able to go outside and experience what we want to experience and the fact that this population was hurting because No one had thought to give them this like very fundamental tool made me really want to follow through so that brings me to my Second key takeaway, which is accessibility opens doors whether you're dealing with big government or end users Accessibility can easily be your differentiator So at this point, I've hopefully convinced you that accessibility and therefore listening to me talk for the next 10 minutes is Worth your time So the next question is how do you do it? Well? I think there are two main parts and the first is user testing So when I was in college, I worked on this project Involving the Braille writing tutor, which is this Arduino based device you see here And so basically this was a piece of hardware that they would hook up to a PC And they could like the teachers could help their children learn Braille through games But it was being used in rural India where power just was not reliable So they wanted to port it to an Android, which you know, they could charge and then use a little bit better But to further throw a wrench into things not only did I have to move the software over but also It was going to be used by these blind teachers who had never even held a smartphone before with their blind students so My group spent the entire first week just trying to immerse ourselves in accessibility We you know, we turned all of our screen readers on we downloaded a bunch of apps We we just tried to see kind of what was out there and we even practiced writing Braille So how many of you know anything about Braille? I Oh, well good I didn't at the time so Essentially Braille is like you have these six that like six dot cells And so the idea is that you know some are on and some are off and you know And you think about it next to like an elevator a lobby the ones that are on are raised, right? so actually when you're writing Braille on paper in Ordered to um in order to produce like there I don't know who can see this but in order to produce the raised version you actually have to flip the paper write the mirror image of every letter from right to left like puncture the hole and Then it can be readable from left to right with the finger So like you're not learning one alphabets. You're learning to alphabets. You're learning to writing directions It's it's a lot to handle mentally And so First our first iteration my team built this really simple Android app and we found someone to Run and record user research sessions with teachers in India And we sent him this you know pretty straightforward research guide 20 minutes of an introduction to Android and 20 minutes of a think-aloud like a set of think-aloud tasks Which for those of you who don't know are just essentially, you know perform this task and think aloud while you do it and When he got back to us it was so Clear that we had severely underestimated the learning curve that we were assuming would just happen The first Android introduction took two hours, and it was scheduled for 20 minutes So that leads me to my third takeaway, which is empathize with your users and their norms So don't for example make the mistake we did and assume You know they have all this hardware in their life And they have to just figure out how to orient it and that part solved like that's not what we have to think about here Because you really need to think about the holistic experience for a user and what they're used to and what they're not So the second part of the how is the actual technical implementation So when I joined Google after college there is this huge initiative to abide by the mission and actually make the core products universally accessible So you know I had I had just joined I kind of had some experience in college And I was at my first all hands and I was like all right. Why not? I got this I can do this I'm the new person which was a classic nuclear mistake But I started reading up on web accessibility Evaluating Google Maps, and I quickly realized it was a disaster Google had this internal accessibility rating, and you essentially evaluated core functionality against like a set of standards and I I ended up just faced with this giant red spreadsheet Like there is nothing accessible about the product as is and on a scale of zero to five. We were a zero So I spent the next few months digging through the entire code base And I was sort of able to boil down the technical principles into four main pieces so the first is add labels and roles to each DOM element so these essentially tell a screen reader What the element is and how it fits into the larger organization of the app? The second is handle key presses So you should make sure that a user can you know use their arrow keys to scroll between a list and also hit enter to You know activate a button for example The third is enforcing a tab order So that is the order of the elements when you hit tab and your focus is moving around the screen Because if you think about it like the app is laid out in a certain way for a reason visually You you want the user to process the the information in that order So you have to also make sure that when going with a screen reader You're giving them that same order that same context And the last is maintain focus And by focus I mean again keyboard focus So say a user focuses on a button and they hit enter and it opens a modal And then they close the modal where does their focus go? It probably should go back to the original button that opened the modal But a lot of browsers will just drop the focus entirely and that leaves the user Completely lost they reset from the beginning of the page They have to wait find all the way back to where they were So it's really important to kind of never let them get lost in the ether and always make sure these these state transitions are handled So knowing all this How would you guys make Google Maps like This map itself Comprehensible to someone without sight anybody Good. Yes. What would what would you um, what would you say about the map? There's no wrong answer Yeah, so when the screen reader is on the map, how would you verbalize the information that we're seeing visually now? Okay, so city location Yeah, right. Yeah, exactly. So, you know high-level like geographical context Yeah, yeah, compass directions All right. Well, don't worry. I followed this for all of you So I'm gonna show you a quick demo. I also have to read download Chromebox Chromebox spoken feedback is ready. Great. Okay, AMC Village 7 Oh AMC Village 7 Google Maps directions, but in region Okay, so main one two Avenue two anthology film archive Search search Google Maps a search Google Maps combo box out of completion list. So essentially When you land on Google Maps, I can refresh Google Maps says Google Maps search search Google Maps It goes immediately to the search box because that is the primary action when you're on Google Maps And so you can use tab like I was saying to kind of go through all the elements in order So I'll just search one Directions one you see it said directions which describes the element of the label and then button because that's the type of element So I know I could you know hit enter on it and so I'll try to spare you the sound but if you watch this like orange box You'll see that it does search goop zero goop show your location move around the map the same way your eye might Content it turns in the fine print exit Mac may one that will sell out to blue note three by Chloe 4d cookie dough confections five dummy and so bakery six film form Seven Houston Street nine view more an area navigation. Okay, so here is essentially what I decided on so basically Google Maps is secretly 256 tiles that are adjacent to each other And so I thought okay this tile is a really great Deterministic way of understanding the map right like it's never changing a number at any given zoom level every tile kind of has what it has So what I did was I kind of drew this box around the tile that you're specifically on and I extracted all the Point of interest from that tile and so then I give them to you in this numbered list So if there is ever more than seven eight and nine or kind of like the next page in previous page buttons So if I were to click nine it would kind of give me the next set of pois here And then furthermore You can pan and every time you pan you move exactly one tile away We move in east one two avenue to a mc village seven three after a place four liqueur street five Lafayette street six kids seven McSorley's little downhouse nine view more an area navigation Okay So so my thinking was you know like say you load Google Maps when you're home actually it or when you're anywhere It centers you on your current location So my thinking was okay. We'll start at the center and you know If you move two left two up the way to get back home is two down two right You're never going to lose like any single piece of information And second of all like you can click one of these or you can type one of these numbers to actually click on the poi so if I Want to learn more about McSorley's ale house one two avenue to a mc one two avenue to aster place three liqueur street four broadway lafayette street Five kids six McSorley's little ale house seven stop nine view more an area navigation So you can see that even though so it said showing side panel Which means you know you opened it but even though the panel opened I didn't change the focus. You're still exactly where you were. You're still on that same square I like reshifted the map to ensure that and Yeah, so that doesn't even have me. Oh wait, no questions till the end But so yeah, this is kind of just I guess like my baby project, but I'll go back to Let me turn this off So that leads me to my fourth takeaway, which is don't be afraid to get creative So it's pretty clear that you know, there's no hard and fast rule to make a map successful like you have all these frameworks guiding you but It really took kind of a lot of thinking about how to put all these pieces together to get that map to make sense to someone who couldn't actually see it And so with this takeaway, I basically mean to say like it's a growing community And it's always welcoming contributions. And so you shouldn't be afraid to kind of Go outside the box if you're adding to it So, um To end my presentation, I'd like to share just a quick little anecdote So I had just gotten google so I just gone google maps to a level four out of five I was very close. It was right before I was done with the map And I kind of had like a working demo of it, but I wasn't totally set on pursuing it because Like I said, I had to get in touch with the tile team So they would pass on those point of interest and that was like a bigger payload and there was kind of a lot of red tape in that area But so I was really interested in accessibility regardless and I wanted to go to this conference called CSUN Which is not reflected in this name. But anyways Um I don't think there's an acronym So on the schedule when I got there there was this session called google maps and I thought to myself What like I'm definitely the only person here like what could they be talking about? And so I went to the session. I found the audience and The first thing that the speaker said Was I don't know what happened to google maps, but it is so much easier to use And her entire session was the work that I had done like she was just going through all the stuff She was going through all the different things that she could hear like even the popular timescraft You can hear you can hear the the values of the bars and all this random stuff Um And so towards the end of the presentation, you know, it's q&a And someone obviously asked well, what about the map? Like what are they going to do about the map? and I finally raised my hand and You know revealed myself. I was like, it's me like Like that is what I was You know what I've been working on what I wanted to bring to you guys and what I came here to kind of like test the waters for and Kind of what happened next was very Unbelievable like everyone just like stood up formed a queue everyone was like shaking my hand giving me business cards And they're like, how do I test this? Where do I find you? Where are you? And I was like, okay Google booth all day like I'll be there um But like I mean that to me was just the Biggest affirmation of the why I was talking about earlier Like I had somehow from miles and miles away Managed to get one person so excited about google maps that she was delivering a conference session about it That she was sharing it with this larger community um And once I kind of like put myself out there. They were so excited and eager to help and like They were ready to become the most loyal google maps users, right? so um To end the evening. I just like to share a list of resources that I found really helpful when working on google maps And I really really hope that you end up using them too um and with that Thank you. I think the slides are available by the way How useful That's a good question um Yeah, actually, so I don't know if you remember this but basically the thing on the right used to open up and have like a slideshow of photos and that was kind of just the worst one because Okay, what do you get from iterating through that photos like photo one photo two photo three and I just Things that are so inherently visual I struggled with because I didn't want to restrict your access to knowing that they were there but I also like Unless the author or unless the photographer provided a caption. I just had no really good way of Doing that and so that was yeah a tough one You know to help climb people and legally care people to navigate them So it brought me to the lighthouse and I had to our interview with the technology person there, which was amazing and I highly recommend to do the same thing if we can Because it's a lot of technology out there and it's actually Either very expensive for this group of people because probably 70 percent of them are not working Also, she was talking about how they're using google maps and they okay was Finding the corner on the street, but they're not okay Was what's actually on the street because they can't see stores. They don't know what's in there Yeah, so we need more description Yeah, um does anybody remember like the pac-man april fools joke So that was like that was an idea that I had for mobile. I told the mobile team Okay, we've already built this thing where you can literally traverse the streets And so why not kind of incorporate that into wave finding like you're walking down the street your pac-man You know what's on your left and right unfortunately, I don't know like the other teams on google maps just Didn't seem as excited about this like they I think had a lot of more pressing features to keep up with the competitors in the space Whereas google maps. I think we were able to take More of a holistic approach because we felt pretty secure with our user base But yeah, I definitely agree like I think mobile wave finding has a long ways to go and I there's a lot of room for improvement Expressive Yeah Yeah, well, I think honestly like user testing can really bring a lot of that to light for example The braille writing tutor project I talked about So all they asked us to do was make you know the gameplay app But after you know listening to these teachers a big thing that we kept hearing was That the students loved hearing the teacher's voices like it brought them so much more comfort than this like talk over or voice over You know voice And so knowing that we actually made a second app where the teachers could go in and record the words and phrases And then we'd pull in those recordings into the gameplay app to kind of make it feel more You know like your teacher was actually sitting next to you playing this game with you. So like I think Yeah, just having you sit down with your users and really figuring out Where that emotional part is and then how you can address it would just go a long way Everything at once Um, so many apps tie like incorporate people maps I So I left google But at the time that I left the embed team was a different team and they were using a subset of the features Just to kind of reduce like the page load So I actually haven't checked to see whether they incorporated the accessibility features or not, but that's a great question Yeah, so I did street view too. So again, it's kind of hard because it's a little more visual but When you're like moving forward in a directional space I like indicate which direction you're on if there's any sort of caption About the landmark or the street corner like I enunciate that Um, so pretty much like when you're on street view anything you could read is something you could also hear And then just kind of the wave finding aspect was highlighted. But yeah, that's that was another pretty challenging One