Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Now that we've seen some notes on how we handle communication with micro services it's time to actually
start writing some code.
So in this video we're going to take a look at a mockup of the application we're going to build.
To better understand these asynchronous communication patterns if we look at the mockup just a couple
of quick notes.
First off the goal this application is to really just get a taste of micros services architecture.
We're going to work on a much larger more comprehensive project later on INSIDE THE COURSE.
This first project is really just meant to get your feet wet and healthy just kind of expose you to
some of these critical issues.
We're also gonna have a goal inside this project of building as much as possible from scratch.
So we're going to build out every last service by hand.
We're going to build out the event broker by hand going to build out as much as we can by hand just
to get really good idea of what is going on.
Because of that because we're building this stuff from scratch I would not recommend using this project
as a template for future micros services projects.
The reason for that is that usually we're going to use a lot of packages to implement a lot of this
stuff as opposed to doing it by hand.
So on real projects you're going to want to use some packages as opposed to these kind of manual implementations
that we're going to do.
Again we're going to work on a very large project later on that's going to be a very serious professional
grade project.
So you are going to see how to use those other packages and whatnot.
Ok so enough of that.
What are we going to build.
You're gonna make a very simple little application that's all about making posts like blog posts or
something similar and allowing users to comment on them.
So any user first comes to application we're gonna show a form like this where user can create some
kind of post we're going to say that our posts only have titles there's not going to be any kind of
body or anything like that.
So a user might type inside of your my post and then hit submit once they do so we're then going to
display the post they just created down here at the bottom the screen.
That would be the post that was just created we'll show that title The Post will show the number of
comments so as associate with it and we'll also have a little form right here to add some comments to
that individual post.
So for example I might type inside of here I'm a comment and then click on cement and if I did so I
should see this post counter right here or the comment counter incremented by 1 and I should also see
the comment listed out right underneath the actual title and then of course we can add in as many posts
as you want so we could go back up here to the top put in post number two.
Hit submit and then we should see post number two.
Down here up here.
And of course we show bill to add in comments like I'm a comment to that one as well.
Hit submit and see that comment up here right there.
So in total this application is pretty straightforward but I think that you're going to be kind of surprised
at the level of complexity that we're going to encounter.
Even for this very simple and straightforward application.
All right.
Now we've got an idea of what we're going to build.
Let's start to break this thing down and consider some of the different technical aspects of it.
So the first thing that we need to think about is what services we are going to create for this part
of the course.
And for a little bit going on into the future right now we're going to say that for every different
unique resource that we have inside of application we're going to create a separate service.
So in our application I would say that we have two different types of resources.
We have posts which are these things we're creating down here at the big blue boxes and then we have
comments which are the things right here the bullet points that are tied to individual posts.
So in total we really have two different resources.
So we're going to think about creating two different services.
We're going to have a postal service that is in charge of storing all the different posts we have and
retrieving them giving them back to us.
And we'll have a common service that is going to be in charge of handling comment creation and listing
all the different comments out so we start to think about these different services.
The first thing we want to really do is really picture the different goals or responsibility of each
service.
So like I just said with a post service we probably want the ability to create a post and to a list
all posts and for comments we probably want the ability to create a comment and list all comments.
Now there's already some hidden complexity inside of here.
The Postal Service is going to be pretty straightforward but if you really start to think about this
and really drill down the common service is going to probably be a little bit more challenging than
you might think at first glance.
The reason for that is that the comment service whenever we create a comment we're going to really be
tying a comment to a post.
So there's going to kind of be a dependency of sorts between reading a comment and having some knowledge
of what posts exist.
So we're going to have to apply one of those asynchronous or synchronous communication patterns we just
discussed to make sure that users can only create comments that are tied to a very specific post.
In addition whenever we tried to list out some comments we probably don't want to just get all the comments
that exist in the universe.
Instead we probably want to somehow retrieve just comments that are associated with some very particular
post.
So in other words if we retrieve the top 10 most popular posts inside our application for example we
probably only want to get comments tied to those specific top 10 posts.
So even though I say right here list all comments well once again there's probably gonna be some kind
of dependency inside of here where the comments that we're retrieving need to somehow be tied to the
actual posts that we're retrieving as well if not that makes sense right now.
That's totally fine.
All I mean to say is that this application is going to be a little bit deceptively challenging even
though it looks like it's really simple and straightforward in nature OK.
So now we've got an idea of what we're going to build.
And it's clear that we're going to run into some challenges along the way quick pause right here and
we'll start to write some code in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.