In this episode, you will understand what the Configuration is, what are some of its concrete component implementations and how you can use it in your own applications.
📺 CSharp TV - Dev Streaming Destination http://csharp.tv
🌎 C# Corner - Community of Software and Data Developers https://www.c-sharpcorner.com
#CSharpTV #csharpcorner #Dapr #LiveShow
Show More Show Less View Video Transcript
0:00
[Music]
0:17
[Music]
0:31
hey friends this is your host Rodrigo
0:35
hey friends this is your host Rodrigo
0:35
hey friends this is your host Rodrigo and this is the Dapper in action series
0:39
and this is the Dapper in action series
0:39
and this is the Dapper in action series and today we're going to see the
0:41
and today we're going to see the
0:41
and today we're going to see the configuration Builder block which is a
0:46
configuration Builder block which is a
0:46
configuration Builder block which is a component of course just like the other
0:48
component of course just like the other
0:48
component of course just like the other ones right for obtaining configuration
0:53
ones right for obtaining configuration
0:53
ones right for obtaining configuration in a centralized way which is fantastic
0:57
in a centralized way which is fantastic
0:57
in a centralized way which is fantastic right otherwise how can you manage your
1:01
right otherwise how can you manage your
1:01
right otherwise how can you manage your configuration settings in your
1:03
configuration settings in your
1:03
configuration settings in your applications maybe you're using I don't
1:05
applications maybe you're using I don't
1:05
applications maybe you're using I don't know if you're happen to be a net
1:07
know if you're happen to be a net
1:07
know if you're happen to be a net developer maybe you are using the
1:09
developer maybe you are using the
1:09
developer maybe you are using the configuration providers right at
1:12
configuration providers right at
1:12
configuration providers right at least uh please don't hard code your
1:16
least uh please don't hard code your
1:16
least uh please don't hard code your configuration settings in your code
1:19
configuration settings in your code
1:19
configuration settings in your code right
1:20
right
1:20
right so yeah with this component we can
1:24
so yeah with this component we can
1:24
so yeah with this component we can centralized those settings and easily
1:28
centralized those settings and easily
1:29
centralized those settings and easily manage and and retrieve those settings
1:33
manage and and retrieve those settings
1:33
manage and and retrieve those settings so that's what we're going to see
1:36
so that's what we're going to see
1:36
so that's what we're going to see today and let's Jump Right
1:39
today and let's Jump Right
1:39
today and let's Jump Right In so there are some configuration
1:42
In so there are some configuration
1:42
In so there are some configuration soures nowadays that we can use in this
1:45
soures nowadays that we can use in this
1:45
soures nowadays that we can use in this session I'm going to use the Asher app
1:48
session I'm going to use the Asher app
1:48
session I'm going to use the Asher app configuration
1:50
configuration
1:50
configuration provider and and because I happened to
1:54
provider and and because I happened to
1:54
provider and and because I happened to have an AER account right and I already
1:58
have an AER account right and I already
1:58
have an AER account right and I already deployed an app service
2:00
deployed an app service
2:00
deployed an app service but you can also use reddish and you can
2:03
but you can also use reddish and you can
2:03
but you can also use reddish and you can use um also
2:05
use um also
2:05
use um also others um in this case I'm going to use
2:07
others um in this case I'm going to use
2:08
others um in this case I'm going to use app configuration from Asher and of
2:11
app configuration from Asher and of
2:11
app configuration from Asher and of course
2:12
course
2:12
course the um main point here is that the side
2:16
the um main point here is that the side
2:16
the um main point here is that the side car is the one that is going to connect
2:18
car is the one that is going to connect
2:18
car is the one that is going to connect to the configuration
2:20
to the configuration
2:20
to the configuration store and your application uses the
2:24
store and your application uses the
2:24
store and your application uses the topper side car for retrieving the
2:27
topper side car for retrieving the
2:27
topper side car for retrieving the configuration settings and and also for
2:30
configuration settings and and also for
2:30
configuration settings and and also for subscribing and
2:33
subscribing and
2:33
subscribing and unsubscribing from those um settings in
2:36
unsubscribing from those um settings in
2:36
unsubscribing from those um settings in other words you can subscribe to changes
2:40
other words you can subscribe to changes
2:40
other words you can subscribe to changes and updates in the configuration
2:42
and updates in the configuration
2:42
and updates in the configuration settings which is fantastic for those
2:45
settings which is fantastic for those
2:45
settings which is fantastic for those applications that are being changed uh
2:50
applications that are being changed uh
2:50
applications that are being changed uh constantly
2:51
constantly
2:51
constantly right so this is great and the
2:55
right so this is great and the
2:55
right so this is great and the configuration itself is based on key
2:58
configuration itself is based on key
2:58
configuration itself is based on key value pairs
3:00
value pairs
3:00
value pairs so you don't need anything else most of
3:03
so you don't need anything else most of
3:03
so you don't need anything else most of the time you just store the value with a
3:07
the time you just store the value with a
3:07
the time you just store the value with a key and that's it right and then you
3:11
key and that's it right and then you
3:11
key and that's it right and then you retrieve that value using the key and as
3:14
retrieve that value using the key and as
3:15
retrieve that value using the key and as I mentioned
3:17
I mentioned
3:17
I mentioned before and unsubscribe to and from those
3:20
before and unsubscribe to and from those
3:20
before and unsubscribe to and from those configuration
3:21
configuration
3:21
configuration updates so aser app configuration is
3:25
updates so aser app configuration is
3:25
updates so aser app configuration is there since runtime version 1.9 as you
3:28
there since runtime version 1.9 as you
3:28
there since runtime version 1.9 as you can see here on the screen but you can
3:31
can see here on the screen but you can
3:31
can see here on the screen but you can also use POS SQL or
3:35
also use POS SQL or
3:35
also use POS SQL or pql I don't know how you pronounce
3:38
pql I don't know how you pronounce
3:38
pql I don't know how you pronounce that I pronounce it post GD
3:42
that I pronounce it post GD
3:42
that I pronounce it post GD SQL anyway maybe I'm wrong and you can
3:45
SQL anyway maybe I'm wrong and you can
3:45
SQL anyway maybe I'm wrong and you can also use
3:47
also use
3:47
also use redis and I think with those three
3:50
redis and I think with those three
3:50
redis and I think with those three options you
3:52
options you
3:52
options you are you are covered right so take into
3:57
are you are covered right so take into
3:57
are you are covered right so take into account those statuses
3:59
account those statuses
3:59
account those statuses I mean poster SQL and redish those are
4:02
I mean poster SQL and redish those are
4:02
I mean poster SQL and redish those are stable
4:04
stable
4:04
stable components and meanwhile the ashab
4:07
components and meanwhile the ashab
4:07
components and meanwhile the ashab configuration component is an alpha it's
4:11
configuration component is an alpha it's
4:11
configuration component is an alpha it's in an alpha
4:13
in an alpha
4:13
in an alpha state but I used Asher configuration in
4:16
state but I used Asher configuration in
4:16
state but I used Asher configuration in the past this component and it works
4:19
the past this component and it works
4:19
the past this component and it works perfectly and that's the one I'm going
4:21
perfectly and that's the one I'm going
4:21
perfectly and that's the one I'm going to use in this session if you are
4:25
to use in this session if you are
4:25
to use in this session if you are interested in
4:27
interested in
4:27
interested in knowing some other information about the
4:31
knowing some other information about the
4:31
knowing some other information about the configuration
4:33
configuration
4:33
configuration component of course you can go ahead and
4:36
component of course you can go ahead and
4:36
component of course you can go ahead and navigate to Dapper
4:38
navigate to Dapper
4:38
navigate to Dapper doio and just like we do most of the
4:42
doio and just like we do most of the
4:42
doio and just like we do most of the time you can go ahead and search for the
4:48
time you can go ahead and search for the
4:48
time you can go ahead and search for the component so building blocks not the
4:51
component so building blocks not the
4:51
component so building blocks not the component itself
4:53
component itself
4:53
component itself configuration and you can read the
4:56
configuration and you can read the
4:56
configuration and you can read the entire information about it here here in
5:00
entire information about it here here in
5:00
entire information about it here here in the web
5:02
the web
5:02
the web page and if you happen to be using a
5:05
page and if you happen to be using a
5:05
page and if you happen to be using a regular HTTP request
5:08
regular HTTP request
5:08
regular HTTP request and you are using those kind of uh
5:12
and you are using those kind of uh
5:12
and you are using those kind of uh interactions by using an HTTP request
5:15
interactions by using an HTTP request
5:15
interactions by using an HTTP request and receiving the
5:16
and receiving the
5:16
and receiving the response then you should know that the
5:19
response then you should know that the
5:19
response then you should know that the API is in the configuration
5:23
API is in the configuration
5:23
API is in the configuration endpoint but I've mentioned this before
5:26
endpoint but I've mentioned this before
5:26
endpoint but I've mentioned this before in the past I don't think this is a real
5:28
in the past I don't think this is a real
5:28
in the past I don't think this is a real word situation most of the time if you
5:30
word situation most of the time if you
5:31
word situation most of the time if you have an SDK for your platform this is
5:34
have an SDK for your platform this is
5:34
have an SDK for your platform this is the development platform then that is
5:37
the development platform then that is
5:37
the development platform then that is totally recommended instead of just
5:41
totally recommended instead of just
5:41
totally recommended instead of just using HTTP
5:43
using HTTP
5:43
using HTTP request
5:46
request
5:46
request so I'm sorry about
5:51
that oh my God I wasn't sharing anyway
5:54
that oh my God I wasn't sharing anyway
5:54
that oh my God I wasn't sharing anyway the the explanation is
5:57
the the explanation is
5:57
the the explanation is there the explan is there you can um use
6:03
there the explan is there you can um use
6:03
there the explan is there you can um use the configuration store I'm sorry anyway
6:06
the configuration store I'm sorry anyway
6:07
the configuration store I'm sorry anyway the the explanation is there I didn't
6:09
the the explanation is there I didn't
6:09
the the explanation is there I didn't need the visuals in this case thank you
6:13
need the visuals in this case thank you
6:13
need the visuals in this case thank you my good friend Simon he so he always uh
6:17
my good friend Simon he so he always uh
6:17
my good friend Simon he so he always uh checking uh things out and I was wrong I
6:21
checking uh things out and I was wrong I
6:21
checking uh things out and I was wrong I wasn't sharing my screen sorry about
6:24
wasn't sharing my screen sorry about
6:24
wasn't sharing my screen sorry about that anyway Dapper side car you connect
6:27
that anyway Dapper side car you connect
6:27
that anyway Dapper side car you connect to the configuration store you can also
6:29
to the configuration store you can also
6:29
to the configuration store you can also subscribe and unsubscribe to those
6:31
subscribe and unsubscribe to those
6:31
subscribe and unsubscribe to those updates based on key value Pairs and
6:34
updates based on key value Pairs and
6:34
updates based on key value Pairs and that is it so this is the place where I
6:38
that is it so this is the place where I
6:38
that is it so this is the place where I was
6:40
was
6:40
was mentioning um the configuration stores
6:43
mentioning um the configuration stores
6:43
mentioning um the configuration stores Asher app configurations is in the alpha
6:45
Asher app configurations is in the alpha
6:46
Asher app configurations is in the alpha status and post reql and red is those
6:48
status and post reql and red is those
6:48
status and post reql and red is those two are in the stable phase and the end
6:52
two are in the stable phase and the end
6:52
two are in the stable phase and the end point is configuration that's it so
6:56
point is configuration that's it so
6:56
point is configuration that's it so nothing happened okay
6:59
nothing happened okay
6:59
nothing happened okay let's move
7:00
let's move
7:00
let's move on let's create a new web
7:04
on let's create a new web
7:04
on let's create a new web API let's name it configuration let's
7:07
API let's name it configuration let's
7:07
API let's name it configuration let's use
7:09
use
7:09
use controllers
7:11
controllers
7:11
controllers right just a regular web
7:14
right just a regular web
7:14
right just a regular web API so I have the configuration folder
7:18
API so I have the configuration folder
7:18
API so I have the configuration folder here and let's create a resources folder
7:22
here and let's create a resources folder
7:22
here and let's create a resources folder in this place I want to create the
7:24
in this place I want to create the
7:24
in this place I want to create the component itself remember that those
7:27
component itself remember that those
7:27
component itself remember that those components are jam files
7:29
components are jam files
7:30
components are jam files so I need to create the Jamal file here
7:33
so I need to create the Jamal file here
7:33
so I need to create the Jamal file here what kind of Jamal
7:34
what kind of Jamal
7:34
what kind of Jamal file
7:36
file
7:36
file well let's navigate to configuration
7:39
well let's navigate to configuration
7:39
well let's navigate to configuration stores and then Asher app
7:44
configuration right and this is the
7:47
configuration right and this is the
7:47
configuration right and this is the component format for Asher app
7:50
component format for Asher app
7:50
component format for Asher app configuration this is the one that I'm
7:52
configuration this is the one that I'm
7:52
configuration this is the one that I'm going to use in this video as you can
7:55
going to use in this video as you can
7:55
going to use in this video as you can see the type is configuration. aser do
7:58
see the type is configuration. aser do
7:58
see the type is configuration. aser do app config
8:00
app config
8:00
app config and of course you have API version kind
8:03
and of course you have API version kind
8:03
and of course you have API version kind metadata and spec and the name of the
8:06
metadata and spec and the name of the
8:06
metadata and spec and the name of the metadata is the one that is going to
8:09
metadata is the one that is going to
8:09
metadata is the one that is going to use uh in the code and the kind is
8:13
use uh in the code and the kind is
8:13
use uh in the code and the kind is component just like we've done this in
8:17
component just like we've done this in
8:17
component just like we've done this in the
8:18
the
8:18
the past okay so let's move on let's Jump
8:22
past okay so let's move on let's Jump
8:22
past okay so let's move on let's Jump Right In Here and let's also create net
8:26
Right In Here and let's also create net
8:26
Right In Here and let's also create net new
8:27
new
8:27
new solution Net Solution
8:29
solution Net Solution
8:30
solution Net Solution and and we're ready to rumble
8:33
and and we're ready to rumble
8:33
and and we're ready to rumble configuration dos
8:36
configuration dos
8:36
configuration dos solution
8:38
solution
8:38
solution and of course I'm going to use Visual
8:41
and of course I'm going to use Visual
8:41
and of course I'm going to use Visual Studio
8:42
Studio
8:43
Studio 2022 since this is
8:45
2022 since this is
8:45
2022 since this is fantastic and let's see what's going on
8:49
fantastic and let's see what's going on
8:49
fantastic and let's see what's going on here I have the project I have the
8:52
here I have the project I have the
8:52
here I have the project I have the weather forast controller thing in the
8:55
weather forast controller thing in the
8:55
weather forast controller thing in the weather forecast
8:57
weather forecast
8:57
weather forecast model and I actually need to add the
9:03
model and I actually need to add the
9:03
model and I actually need to add the SDK
9:04
SDK
9:04
SDK just like any other regular topper
9:08
just like any other regular topper
9:08
just like any other regular topper application that is using asp.net
9:10
application that is using asp.net
9:10
application that is using asp.net core so this is the one that I'm going
9:13
core so this is the one that I'm going
9:13
core so this is the one that I'm going to reference at the time of this
9:16
to reference at the time of this
9:16
to reference at the time of this recording the latest one is
9:19
recording the latest one is
9:19
recording the latest one is 1.14
9:21
1.14
9:21
1.14 1.15 is coming in the following
9:24
1.15 is coming in the following
9:24
1.15 is coming in the following weeks um anyway let's go to the program
9:28
weeks um anyway let's go to the program
9:28
weeks um anyway let's go to the program file add controllers add dopper and
9:32
file add controllers add dopper and
9:32
file add controllers add dopper and that's it I dozed this application
9:36
that's it I dozed this application
9:36
that's it I dozed this application already so here I want to reuse the
9:39
already so here I want to reuse the
9:40
already so here I want to reuse the weather forecast
9:42
weather forecast
9:42
weather forecast controller uh so I want to store those
9:47
controller uh so I want to store those
9:47
controller uh so I want to store those summaries as a configuration
9:50
summaries as a configuration
9:50
summaries as a configuration setting instead of using those hardcoded
9:54
setting instead of using those hardcoded
9:54
setting instead of using those hardcoded values I just can go ahead create a
9:57
values I just can go ahead create a
9:57
values I just can go ahead create a configuration setting
9:59
configuration setting
9:59
configuration setting and read that configuration from Asher
10:02
and read that configuration from Asher
10:02
and read that configuration from Asher app
10:03
app
10:04
app configuration right so let
10:07
configuration right so let
10:07
configuration right so let me jump to the
10:10
me jump to the
10:10
me jump to the portal so I'm going to log in in in this
10:14
portal so I'm going to log in in in this
10:14
portal so I'm going to log in in in this other monitor that I have
10:16
other monitor that I have
10:16
other monitor that I have here and yes I want to sign in in this
10:22
here and yes I want to sign in in this
10:22
here and yes I want to sign in in this other place I'm not showing anything
10:25
other place I'm not showing anything
10:25
other place I'm not showing anything because the portal is in this other
10:27
because the portal is in this other
10:27
because the portal is in this other place so bear with me
10:30
place so bear with me
10:30
place so bear with me Dapper in
10:32
Dapper in
10:32
Dapper in action and this is
10:34
action and this is
10:35
action and this is it right this is it so I want to
10:39
it right this is it so I want to
10:39
it right this is it so I want to navigate to the dopper in
10:41
navigate to the dopper in
10:41
navigate to the dopper in action resource that I have here you
10:44
action resource that I have here you
10:44
action resource that I have here you should be watching my screen yes so
10:49
should be watching my screen yes so
10:49
should be watching my screen yes so Azure app
10:52
Azure app
10:52
Azure app configuration sorry about that so
10:55
configuration sorry about that so
10:55
configuration sorry about that so configuration Explorer you can see that
10:58
configuration Explorer you can see that
10:58
configuration Explorer you can see that I created this
11:00
I created this
11:00
I created this summaries
11:01
summaries
11:01
summaries setting and if I edit this value you can
11:05
setting and if I edit this value you can
11:05
setting and if I edit this value you can see that it has freezing bracing chilly
11:09
see that it has freezing bracing chilly
11:09
see that it has freezing bracing chilly cool mild and so
11:11
cool mild and so
11:11
cool mild and so on so this is a regular Json
11:17
on so this is a regular Json
11:17
on so this is a regular Json array and this is the setting that I
11:20
array and this is the setting that I
11:20
array and this is the setting that I want to read by using
11:23
want to read by using
11:23
want to read by using Dapper okay so let's move on I want to
11:29
Dapper okay so let's move on I want to
11:29
Dapper okay so let's move on I want to remove this let's use the primary
11:31
remove this let's use the primary
11:31
remove this let's use the primary Constructor
11:32
Constructor
11:32
Constructor syntax and let's actually remove
11:38
syntax and let's actually remove
11:38
syntax and let's actually remove everything since I want to read those
11:42
everything since I want to read those
11:42
everything since I want to read those summaries from the settings so dopper um
11:48
summaries from the settings so dopper um
11:48
summaries from the settings so dopper um dopper
11:49
dopper
11:49
dopper client of course I want to inject the
11:52
client of course I want to inject the
11:53
client of course I want to inject the client let's rub this doer client and
11:56
client let's rub this doer client and
11:56
client let's rub this doer client and then daer client let's see what we have
12:00
then daer client let's see what we have
12:00
then daer client let's see what we have here get
12:03
here get
12:03
here get configuration so this is the one so I
12:06
configuration so this is the one so I
12:06
configuration so this is the one so I need to pass this is a task this is
12:08
need to pass this is a task this is
12:09
need to pass this is a task this is returning a task so this has to return
12:13
returning a task so this has to return
12:13
returning a task so this has to return task let's change it to action result
12:16
task let's change it to action result
12:17
task let's change it to action result and of course I need to await this and I
12:20
and of course I need to await this and I
12:20
and of course I need to await this and I also need the store name I haven't
12:24
also need the store name I haven't
12:24
also need the store name I haven't created the component itself so let's do
12:28
created the component itself so let's do
12:28
created the component itself so let's do that right the way let's go back here in
12:33
that right the way let's go back here in
12:33
that right the way let's go back here in resources let's create a new jam
12:37
resources let's create a new jam
12:37
resources let's create a new jam file so for instance
12:40
file so for instance
12:40
file so for instance notepad configuration.
12:44
notepad configuration.
12:44
notepad configuration. jaml Okay configuration. jaml that is
12:47
jaml Okay configuration. jaml that is
12:47
jaml Okay configuration. jaml that is right here in this
12:50
right here in this
12:50
right here in this other
12:53
other
12:53
other screen so let's go back to the
13:00
screen so let's go back to the
13:00
screen so let's go back to the documentation so I'm going to copy this
13:04
documentation so I'm going to copy this
13:04
documentation so I'm going to copy this and you can also see
13:06
and you can also see
13:06
and you can also see that the only thing that is needed is
13:09
that the only thing that is needed is
13:09
that the only thing that is needed is the connection string
13:11
the connection string
13:11
the connection string itself so I need the connection string
13:13
itself so I need the connection string
13:13
itself so I need the connection string for from my Asher portal that is right
13:16
for from my Asher portal that is right
13:16
for from my Asher portal that is right here in the access settings
13:20
here in the access settings
13:20
here in the access settings option and I'm going to copy this
13:22
option and I'm going to copy this
13:22
option and I'm going to copy this connection string and I'm going to use
13:25
connection string and I'm going to use
13:25
connection string and I'm going to use that for specifying that setting
13:29
that for specifying that setting
13:29
that for specifying that setting so let's go ahead and paste
13:33
so let's go ahead and paste
13:33
so let's go ahead and paste everything let's delete everything
13:38
everything let's delete everything
13:38
everything let's delete everything and let's use the value host I don't
13:42
and let's use the value host I don't
13:42
and let's use the value host I don't think we need host we only need the
13:44
think we need host we only need the
13:44
think we need host we only need the connection string the name is going to
13:47
connection string the name is going to
13:47
connection string the name is going to be let's name it configuration I'm going
13:49
be let's name it configuration I'm going
13:49
be let's name it configuration I'm going to increase the font
13:52
to increase the font
13:52
to increase the font size configuration the type is
13:55
size configuration the type is
13:55
size configuration the type is configuration. AER appc config and the
13:58
configuration. AER appc config and the
13:58
configuration. AER appc config and the connection is string is going to be the
14:00
connection is string is going to be the
14:00
connection is string is going to be the one that I happen to have right
14:04
one that I happen to have right
14:04
one that I happen to have right here let me go ahead and paste the
14:11
value that is right
14:14
value that is right
14:14
value that is right here okay so this is the connection
14:17
here okay so this is the connection
14:17
here okay so this is the connection string I think that's it that is it so
14:22
string I think that's it that is it so
14:22
string I think that's it that is it so that name is configuration that's the
14:25
that name is configuration that's the
14:25
that name is configuration that's the one that I need to pass to the get
14:28
one that I need to pass to the get
14:28
one that I need to pass to the get configuration ation method so
14:32
configuration ation method so
14:32
configuration ation method so configuration and I also need to pass
14:35
configuration and I also need to pass
14:35
configuration and I also need to pass this I read only list of
14:38
this I read only list of
14:38
this I read only list of strings so the name is summaries if you
14:42
strings so the name is summaries if you
14:42
strings so the name is summaries if you happen to have different connection uh
14:45
happen to have different connection uh
14:45
happen to have different connection uh I'm sorry different configuration
14:47
I'm sorry different configuration
14:47
I'm sorry different configuration settings you can pass those here right x
14:52
settings you can pass those here right x
14:52
settings you can pass those here right x y
14:54
y
14:54
y z but of course I only have summaries so
14:57
z but of course I only have summaries so
14:57
z but of course I only have summaries so I think this syntax is
15:00
I think this syntax is
15:00
I think this syntax is acceptable you should also pass
15:03
acceptable you should also pass
15:03
acceptable you should also pass metadata in this case I think we first
15:07
metadata in this case I think we first
15:07
metadata in this case I think we first need to um test this out right uh in
15:12
need to um test this out right uh in
15:12
need to um test this out right uh in this way so let's see what's going on
15:15
this way so let's see what's going on
15:15
this way so let's see what's going on here get configuration await operator
15:18
here get configuration await operator
15:18
here get configuration await operator async of course this needs to be
15:22
async of course this needs to be
15:22
async of course this needs to be async and we can also read the
15:25
async and we can also read the
15:25
async and we can also read the configuration in this way so for
15:28
configuration in this way so for
15:28
configuration in this way so for instance I want to obtain the
15:30
instance I want to obtain the
15:30
instance I want to obtain the configuration and then I don't know use
15:32
configuration and then I don't know use
15:32
configuration and then I don't know use it somehow
15:35
it somehow
15:35
it somehow configuration or summaries it's going to
15:38
configuration or summaries it's going to
15:38
configuration or summaries it's going to be this and then return okay summaries
15:42
be this and then return okay summaries
15:42
be this and then return okay summaries and I think we're ready to
15:45
and I think we're ready to
15:45
and I think we're ready to rumble so I'm reading the configuration
15:48
rumble so I'm reading the configuration
15:48
rumble so I'm reading the configuration from the configuration component this is
15:50
from the configuration component this is
15:50
from the configuration component this is actually the one that is going to uh do
15:53
actually the one that is going to uh do
15:53
actually the one that is going to uh do the
15:55
the
15:55
the work so perfect perfect perfect perfect
15:59
work so perfect perfect perfect perfect
15:59
work so perfect perfect perfect perfect let's
16:01
let's
16:01
let's jump here let's return to the
16:05
jump here let's return to the
16:05
jump here let's return to the configuration
16:06
configuration
16:06
configuration folder so we're ready to execute the
16:09
folder so we're ready to execute the
16:09
folder so we're ready to execute the Dapper side car Dapper run and then the
16:13
Dapper side car Dapper run and then the
16:13
Dapper side car Dapper run and then the application ID let's name it
16:16
application ID let's name it
16:16
application ID let's name it config and Dapper HTTP Port it's going
16:20
config and Dapper HTTP Port it's going
16:20
config and Dapper HTTP Port it's going to be
16:22
to be
16:22
to be 55,000
16:25
55,000
16:25
55,000 app dashport is going to be
16:29
app dashport is going to be
16:29
app dashport is going to be 5500 and then researches path or
16:33
5500 and then researches path or
16:33
5500 and then researches path or components path this is actually the uh
16:38
components path this is actually the uh
16:38
components path this is actually the uh the correct name resources path since
16:41
the correct name resources path since
16:42
the correct name resources path since components path was
16:44
components path was
16:44
components path was deprecated it it works nowadays but it's
16:47
deprecated it it works nowadays but it's
16:47
deprecated it it works nowadays but it's better to use resources path so it's in
16:51
better to use resources path so it's in
16:51
better to use resources path so it's in the resources
16:53
the resources
16:53
the resources folder you know the component that I
16:56
folder you know the component that I
16:56
folder you know the component that I created and I think we're ready to
16:59
created and I think we're ready to
16:59
created and I think we're ready to execute net Ron and then URLs and then
17:03
execute net Ron and then URLs and then
17:04
execute net Ron and then URLs and then HTTP Port
17:07
5500 in this way I'm uh setting the port
17:12
5500 in this way I'm uh setting the port
17:12
5500 in this way I'm uh setting the port for this application by using the URL
17:17
for this application by using the URL
17:17
for this application by using the URL flag okay so I think we're ready to
17:21
flag okay so I think we're ready to
17:21
flag okay so I think we're ready to execute this the side car is running the
17:24
execute this the side car is running the
17:24
execute this the side car is running the side car is returning a lot of
17:25
side car is returning a lot of
17:25
side car is returning a lot of information related to the execution
17:29
information related to the execution
17:29
information related to the execution this is asking me I mean my Windows
17:32
this is asking me I mean my Windows
17:32
this is asking me I mean my Windows operating system is asking me about
17:35
operating system is asking me about
17:35
operating system is asking me about giving permission to configuration for
17:38
giving permission to configuration for
17:38
giving permission to configuration for uh you know using the networking
17:41
uh you know using the networking
17:41
uh you know using the networking resources so I clicked on
17:44
resources so I clicked on
17:44
resources so I clicked on okay and let's do
17:47
okay and let's do
17:47
okay and let's do this
17:50
this
17:50
this so
17:52
so
17:52
so curl and then that is Cur XE HTTP local
17:58
curl and then that is Cur XE HTTP local
17:59
curl and then that is Cur XE HTTP local host 5500 and then weather
18:04
host 5500 and then weather
18:04
host 5500 and then weather forecast right and boom we have it this
18:09
forecast right and boom we have it this
18:09
forecast right and boom we have it this is
18:11
is
18:11
is working right of course that uh array is
18:15
working right of course that uh array is
18:15
working right of course that uh array is being serialized into
18:19
being serialized into
18:19
being serialized into Json so it's returning that um that
18:23
Json so it's returning that um that
18:23
Json so it's returning that um that array in this
18:25
array in this
18:25
array in this way so what happens if I go back to the
18:28
way so what happens if I go back to the
18:28
way so what happens if I go back to the portal
18:29
portal
18:29
portal let's return here and navigate to
18:33
let's return here and navigate to
18:33
let's return here and navigate to configuration
18:34
configuration
18:34
configuration Explorer summaries edit and then I don't
18:39
Explorer summaries edit and then I don't
18:39
Explorer summaries edit and then I don't know really really freezing really
18:43
know really really freezing really
18:43
know really really freezing really really
18:44
really
18:44
really freezing
18:46
freezing
18:46
freezing apply so nothing is happening right now
18:50
apply so nothing is happening right now
18:50
apply so nothing is happening right now of course since I need to execute the
18:53
of course since I need to execute the
18:53
of course since I need to execute the end point again and we can see the
18:56
end point again and we can see the
18:56
end point again and we can see the change here really really
18:59
change here really really
18:59
change here really really freezing um and this is
19:02
freezing um and this is
19:02
freezing um and this is fantastic so I think you can easily see
19:06
fantastic so I think you can easily see
19:06
fantastic so I think you can easily see how you can architect your own
19:08
how you can architect your own
19:08
how you can architect your own applications by using the configuration
19:10
applications by using the configuration
19:10
applications by using the configuration building
19:11
building
19:11
building block and you can actually switch very
19:15
block and you can actually switch very
19:15
block and you can actually switch very easily between
19:17
easily between
19:17
easily between environments again I'm using AER app
19:20
environments again I'm using AER app
19:20
environments again I'm using AER app configuration because I happen to have
19:22
configuration because I happen to have
19:22
configuration because I happen to have that account already in
19:24
that account already in
19:24
that account already in place but you can also use radi and
19:27
place but you can also use radi and
19:27
place but you can also use radi and pogress Q
19:29
pogress Q
19:29
pogress Q or postra
19:31
or postra
19:31
or postra SQL fantastic so I've
19:34
SQL fantastic so I've
19:34
SQL fantastic so I've mentioned that we can also subscribe to
19:39
mentioned that we can also subscribe to
19:39
mentioned that we can also subscribe to changes so if you can see here dber
19:44
changes so if you can see here dber
19:44
changes so if you can see here dber client and then subscribe
19:48
client and then subscribe
19:48
client and then subscribe configuration H this looks fantastic so
19:52
configuration H this looks fantastic so
19:52
configuration H this looks fantastic so you have to specify the store name in
19:55
you have to specify the store name in
19:55
you have to specify the store name in this case
19:57
this case
19:57
this case configuration and then
19:59
configuration and then
19:59
configuration and then the different keys that you want
20:02
the different keys that you want
20:02
the different keys that you want to um watch for
20:06
to um watch for
20:06
to um watch for changes so in this case I only have one
20:09
changes so in this case I only have one
20:09
changes so in this case I only have one so summaries is one and then you should
20:13
so summaries is one and then you should
20:13
so summaries is one and then you should pass some
20:14
pass some
20:14
pass some metadata and this is going to return
20:17
metadata and this is going to return
20:17
metadata and this is going to return this subscribe configuration
20:20
this subscribe configuration
20:20
this subscribe configuration response
20:22
response
20:22
response so let's do this
20:25
so let's do this
20:25
so let's do this wait uh drer client subscribe
20:27
wait uh drer client subscribe
20:28
wait uh drer client subscribe configuration
20:30
configuration
20:30
configuration configuration and then summaries
20:36
summaries
20:38
summaries
20:38
summaries and I want to know what's going on here
20:43
and I want to know what's going on here
20:43
and I want to know what's going on here so
20:45
so
20:45
so source is of type I Asing inumerable
20:50
source is of type I Asing inumerable
20:50
source is of type I Asing inumerable of I
20:52
of I
20:52
of I dictionary string configuration item in
20:56
dictionary string configuration item in
20:56
dictionary string configuration item in other words this allows me to
21:00
other words this allows me to
21:00
other words this allows me to asynchronously obtain the stream of
21:02
asynchronously obtain the stream of
21:02
asynchronously obtain the stream of changes from the configuration
21:05
changes from the configuration
21:05
changes from the configuration store so that said I don't think this is
21:08
store so that said I don't think this is
21:08
store so that said I don't think this is the best location for implementing this
21:12
the best location for implementing this
21:12
the best location for implementing this I mean the controller
21:14
I mean the controller
21:14
I mean the controller itself
21:16
itself
21:16
itself otherwise you know the request is going
21:18
otherwise you know the request is going
21:18
otherwise you know the request is going to be blocked because it's it will try
21:22
to be blocked because it's it will try
21:22
to be blocked because it's it will try to uh obtain the
21:25
to uh obtain the
21:25
to uh obtain the asynchronous Stream
21:28
asynchronous Stream
21:28
asynchronous Stream so I think this is not the correct place
21:32
so I think this is not the correct place
21:32
so I think this is not the correct place for doing this so let's modify the
21:37
for doing this so let's modify the
21:37
for doing this so let's modify the program let's go ahead and stop
21:42
program let's go ahead and stop
21:42
program let's go ahead and stop this and I think we have different
21:45
this and I think we have different
21:45
this and I think we have different options here the first one is we can
21:51
options here the first one is we can
21:51
options here the first one is we can create a background
21:52
create a background
21:52
create a background service in ASP Dom core and then use the
21:57
service in ASP Dom core and then use the
21:57
service in ASP Dom core and then use the doer client for subscribing to changes
22:00
doer client for subscribing to changes
22:00
doer client for subscribing to changes and then asynchronously receive those
22:04
and then asynchronously receive those
22:04
and then asynchronously receive those changes a background service in in this
22:07
changes a background service in in this
22:07
changes a background service in in this case right so in other
22:11
case right so in other
22:11
case right so in other scenarios we can also
22:14
scenarios we can also
22:14
scenarios we can also use uh the lifetime property I think
22:17
use uh the lifetime property I think
22:17
use uh the lifetime property I think this is great Lifetime and then
22:21
this is great Lifetime and then
22:21
this is great Lifetime and then application started and then register
22:25
application started and then register
22:25
application started and then register and then I pass this Lambda expression
22:29
and then I pass this Lambda expression
22:29
and then I pass this Lambda expression and I
22:30
and I
22:30
and I think let's do
22:33
think let's do
22:33
think let's do this so we all uh we first need to
22:37
this so we all uh we first need to
22:37
this so we all uh we first need to specify scope because I need to inject
22:40
specify scope because I need to inject
22:40
specify scope because I need to inject the topper client object
22:42
the topper client object
22:42
the topper client object here
22:44
here
22:44
here so let's do this bar scope and this is
22:48
so let's do this bar scope and this is
22:49
so let's do this bar scope and this is going to be app Services create
22:53
going to be app Services create
22:53
going to be app Services create scope so this is returning a nice
22:55
scope so this is returning a nice
22:55
scope so this is returning a nice service scope and I think this
22:59
service scope and I think this
22:59
service scope and I think this includes I
23:02
includes I
23:02
includes I disposable so drer client scope service
23:05
disposable so drer client scope service
23:05
disposable so drer client scope service provider get required service dou client
23:08
provider get required service dou client
23:08
provider get required service dou client thank you
23:10
thank you
23:10
thank you co-pilot I think this is it this is the
23:13
co-pilot I think this is it this is the
23:13
co-pilot I think this is it this is the the line that I was looking
23:15
the line that I was looking
23:15
the line that I was looking for so in other words I'm obtaining the
23:18
for so in other words I'm obtaining the
23:18
for so in other words I'm obtaining the dopper client object that that was
23:21
dopper client object that that was
23:21
dopper client object that that was registered by the ad Dapper invocation
23:25
registered by the ad Dapper invocation
23:26
registered by the ad Dapper invocation here so Dapper client so with those two
23:30
here so Dapper client so with those two
23:30
here so Dapper client so with those two lines of code I have access to the
23:35
lines of code I have access to the
23:35
lines of code I have access to the dopper client dopper client and then
23:38
dopper client dopper client and then
23:39
dopper client dopper client and then subscribe configuration and so on so
23:42
subscribe configuration and so on so
23:42
subscribe configuration and so on so let's do this
23:44
let's do this
23:44
let's do this configuration and then summaries and
23:48
configuration and then summaries and
23:48
configuration and then summaries and then I think that's it this is going to
23:52
then I think that's it this is going to
23:52
then I think that's it this is going to return a
23:54
return a
23:54
return a subscription
23:57
subscription
23:57
subscription response and I'm using a weight since I
24:01
response and I'm using a weight since I
24:01
response and I'm using a weight since I included a in
24:02
included a in
24:02
included a in here and I
24:05
here and I
24:05
here and I think we
24:07
think we
24:07
think we can use a a weight for
24:11
can use a a weight for
24:11
can use a a weight for each so for each and then
24:15
each so for each and then
24:15
each so for each and then subscription Source
24:20
subscription for each I'm sorry for each
24:23
subscription for each I'm sorry for each
24:23
subscription for each I'm sorry for each what is this is that an item in
24:26
what is this is that an item in
24:26
what is this is that an item in subscription do store
24:30
subscription do store
24:30
subscription do store yes
24:33
yes
24:33
yes store Source not store source so let's
24:37
store Source not store source so let's
24:37
store Source not store source so let's do a wait for H this is the asynchronous
24:41
do a wait for H this is the asynchronous
24:41
do a wait for H this is the asynchronous stream
24:42
stream
24:42
stream reading and here I can go ahead and see
24:47
reading and here I can go ahead and see
24:47
reading and here I can go ahead and see what's going on
24:49
what's going on
24:49
what's going on item um I
24:52
item um I
24:52
item um I have what kind of properties I have here
24:54
have what kind of properties I have here
24:54
have what kind of properties I have here I have keys I have values so the first
24:58
I have keys I have values so the first
24:58
I have keys I have values so the first thing that you need to verify is um
25:03
thing that you need to verify is um
25:03
thing that you need to verify is um keys since the first time that you run
25:06
keys since the first time that you run
25:06
keys since the first time that you run your application this is going to be
25:09
your application this is going to be
25:09
your application this is going to be zero no changes at
25:11
zero no changes at
25:12
zero no changes at all so you need to verify if Keys is
25:17
all so you need to verify if Keys is
25:17
all so you need to verify if Keys is zero so in this case you just you know
25:21
zero so in this case you just you know
25:21
zero so in this case you just you know you just return or report hey this is
25:24
you just return or report hey this is
25:24
you just return or report hey this is the first time um first time right
25:29
the first time um first time right
25:29
the first time um first time right otherwise you're ready to read those
25:33
otherwise you're ready to read those
25:33
otherwise you're ready to read those changes by using I don't know
25:36
changes by using I don't know
25:36
changes by using I don't know maybe um something similar as the code
25:40
maybe um something similar as the code
25:40
maybe um something similar as the code that C- pilot is um suggesting or you
25:45
that C- pilot is um suggesting or you
25:45
that C- pilot is um suggesting or you just can I don't know obtain the item
25:49
just can I don't know obtain the item
25:49
just can I don't know obtain the item and that's
25:50
and that's
25:50
and that's it so in this case I'm just going to uh
25:54
it so in this case I'm just going to uh
25:54
it so in this case I'm just going to uh console. R line and then let's
25:59
console. R line and then let's
25:59
console. R line and then let's output item as is no changes at all I
26:03
output item as is no changes at all I
26:04
output item as is no changes at all I just want to show you the way that you
26:07
just want to show you the way that you
26:07
just want to show you the way that you can use to subscribe to
26:10
can use to subscribe to
26:10
can use to subscribe to updates so a synchron a
26:13
updates so a synchron a
26:13
updates so a synchron a stream um I think this is going to
26:17
stream um I think this is going to
26:17
stream um I think this is going to work um and you can also maybe in the
26:22
work um and you can also maybe in the
26:22
work um and you can also maybe in the application you can also use lifetime
26:25
application you can also use lifetime
26:25
application you can also use lifetime application stopping you can also use
26:28
application stopping you can also use
26:28
application stopping you can also use um doer client. unsubscribe
26:31
um doer client. unsubscribe
26:31
um doer client. unsubscribe configuration if you want to
26:34
configuration if you want to
26:34
configuration if you want to stop um those um changes from streaming
26:39
stop um those um changes from streaming
26:39
stop um those um changes from streaming to your application in this case I think
26:42
to your application in this case I think
26:42
to your application in this case I think this is it this is all this
26:46
this is it this is all this
26:46
this is it this is all this fantastic um
26:49
fantastic um
26:49
fantastic um and I'm just reporting here in the
26:51
and I'm just reporting here in the
26:51
and I'm just reporting here in the console
26:53
console
26:53
console right but I think you can also use an
26:56
right but I think you can also use an
26:56
right but I think you can also use an night memory
26:58
night memory
26:58
night memory uh cash
27:00
uh cash
27:00
uh cash interface if you happen to be using
27:02
interface if you happen to be using
27:02
interface if you happen to be using memory cache or you can also use the
27:05
memory cache or you can also use the
27:05
memory cache or you can also use the distributed cash you know those caching
27:08
distributed cash you know those caching
27:08
distributed cash you know those caching options in your application for storing
27:12
options in your application for storing
27:12
options in your application for storing locally those changes in the
27:16
locally those changes in the
27:16
locally those changes in the configuration as they
27:19
configuration as they
27:19
configuration as they happened or maybe I don't know maybe you
27:22
happened or maybe I don't know maybe you
27:22
happened or maybe I don't know maybe you want to execute some kind of
27:25
want to execute some kind of
27:25
want to execute some kind of event uh because you need to notify your
27:29
event uh because you need to notify your
27:29
event uh because you need to notify your logic that there's a new
27:33
logic that there's a new
27:33
logic that there's a new configuration so you can easily see this
27:36
configuration so you can easily see this
27:36
configuration so you can easily see this uh way of thinking right by using this
27:39
uh way of thinking right by using this
27:39
uh way of thinking right by using this um subscri subscription option you have
27:43
um subscri subscription option you have
27:43
um subscri subscription option you have a lot of uh different ways uh that you
27:47
a lot of uh different ways uh that you
27:47
a lot of uh different ways uh that you can use to
27:48
can use to
27:48
can use to leverage this um feature in your
27:51
leverage this um feature in your
27:51
leverage this um feature in your application in this case I just want to
27:53
application in this case I just want to
27:53
application in this case I just want to report by using console and that's it in
27:57
report by using console and that's it in
27:57
report by using console and that's it in in my controller where I'm
28:00
in my controller where I'm
28:00
in my controller where I'm retrieving the latest configuration
28:04
retrieving the latest configuration
28:04
retrieving the latest configuration setting so those two different things
28:07
setting so those two different things
28:07
setting so those two different things okay okay so I think we're ready to
28:12
rumble let's go ahead and uh run the
28:17
rumble let's go ahead and uh run the
28:17
rumble let's go ahead and uh run the upper side
28:19
upper side
28:19
upper side car so this is um Running Oh invalid
28:24
car so this is um Running Oh invalid
28:24
car so this is um Running Oh invalid argument fail to subscribe summaries
28:27
argument fail to subscribe summaries
28:27
argument fail to subscribe summaries from config configuration store Sentinel
28:30
from config configuration store Sentinel
28:30
from config configuration store Sentinel key is not provided in
28:33
key is not provided in
28:34
key is not provided in metadata so it looks like I need to pass
28:36
metadata so it looks like I need to pass
28:36
metadata so it looks like I need to pass some kind of metadata in my
28:40
some kind of metadata in my
28:40
some kind of metadata in my subscription senal key I think that's
28:43
subscription senal key I think that's
28:43
subscription senal key I think that's going to be the the key that I'm using
28:47
going to be the the key that I'm using
28:47
going to be the the key that I'm using which is
28:48
which is
28:48
which is summaries so I need to pass the metadata
28:51
summaries so I need to pass the metadata
28:51
summaries so I need to pass the metadata right here this is an I read only
28:54
right here this is an I read only
28:54
right here this is an I read only dictionary of string
28:56
dictionary of string
28:56
dictionary of string string so so I can go ahead and I don't
29:00
string so so I can go ahead and I don't
29:00
string so so I can go ahead and I don't know dictionary string
29:03
know dictionary string
29:03
know dictionary string string uh metadata equals new dictionary
29:08
string uh metadata equals new dictionary
29:08
string uh metadata equals new dictionary of string string and then metadata add
29:12
of string string and then metadata add
29:12
of string string and then metadata add um Sentinel key is that the name
29:16
um Sentinel key is that the name
29:16
um Sentinel key is that the name Sentinel key let me
29:19
Sentinel key let me
29:19
Sentinel key let me see Sentinel
29:22
see Sentinel
29:22
see Sentinel key yes I think that is the key itself
29:26
key yes I think that is the key itself
29:26
key yes I think that is the key itself and its value is be summaries
29:31
and its value is be summaries
29:31
and its value is be summaries summaries and yes we can also use this
29:36
summaries and yes we can also use this
29:36
summaries and yes we can also use this nicer
29:37
nicer
29:38
nicer Syntax for creating
29:40
Syntax for creating
29:40
Syntax for creating dictionaries and I'm ready to use a
29:42
dictionaries and I'm ready to use a
29:42
dictionaries and I'm ready to use a metadata object here
29:46
metadata object here
29:46
metadata object here metadata
29:49
fantastic so I think this is going to
29:52
fantastic so I think this is going to
29:52
fantastic so I think this is going to work oh I'm not um using uh Visual
29:56
work oh I'm not um using uh Visual
29:56
work oh I'm not um using uh Visual Studio itself for running doer side car
29:58
Studio itself for running doer side car
29:58
Studio itself for running doer side car is not
29:59
is not
29:59
is not configured I want to use do wron so this
30:02
configured I want to use do wron so this
30:02
configured I want to use do wron so this is
30:04
is
30:04
is executing and yeah this is working no
30:09
executing and yeah this is working no
30:09
executing and yeah this is working no errors
30:11
errors
30:11
errors and okay
30:13
and okay
30:13
and okay so let's try this this is returning
30:18
so let's try this this is returning
30:18
so let's try this this is returning really really
30:20
really really
30:20
really really freezing right
30:24
freezing right
30:24
freezing right oh oh there's no way to attach reattach
30:28
oh oh there's no way to attach reattach
30:28
oh oh there's no way to attach reattach the terminal there anyway it doesn't
30:32
the terminal there anyway it doesn't
30:32
the terminal there anyway it doesn't matter
30:34
matter
30:34
matter um system collection generic dictionary
30:36
um system collection generic dictionary
30:36
um system collection generic dictionary configuration
30:38
configuration
30:38
configuration item it looks like yes this is trying
30:42
item it looks like yes this is trying
30:42
item it looks like yes this is trying to um this is telling me that something
30:46
to um this is telling me that something
30:46
to um this is telling me that something happened anyway let's go back here edit
30:50
happened anyway let's go back here edit
30:50
happened anyway let's go back here edit really really really freezing let's
30:53
really really really freezing let's
30:53
really really really freezing let's change it back to freezing apply and
30:57
change it back to freezing apply and
30:57
change it back to freezing apply and then
30:58
then
30:58
then let's go back
31:00
let's go back
31:00
let's go back here and let's see if this
31:03
here and let's see if this
31:03
here and let's see if this responds
31:05
responds
31:05
responds accordingly
31:07
accordingly
31:07
accordingly H I think there's something missing in
31:10
H I think there's something missing in
31:11
H I think there's something missing in this
31:13
component yeah because it's not doing
31:15
component yeah because it's not doing
31:16
component yeah because it's not doing anything it should return something
31:19
anything it should return something
31:19
anything it should return something right so not it's not returning anything
31:23
right so not it's not returning anything
31:23
right so not it's not returning anything right now and let's see what's going on
31:27
right now and let's see what's going on
31:27
right now and let's see what's going on let's go back to the Asher
31:29
let's go back to the Asher
31:29
let's go back to the Asher portal I'm sorry to the Dapper
31:34
portal I'm sorry to the Dapper
31:34
portal I'm sorry to the Dapper documentation and I think yes this is
31:38
documentation and I think yes this is
31:39
documentation and I think yes this is the
31:39
the
31:39
the one subscribe poll
31:43
one subscribe poll
31:43
one subscribe poll interball uh subscribe po interball
31:46
interball uh subscribe po interball
31:46
interball uh subscribe po interball specify the PO interball yes let's use
31:50
specify the PO interball yes let's use
31:50
specify the PO interball yes let's use this
31:52
this
31:52
this one so let's go back to the
31:56
one so let's go back to the
31:56
one so let's go back to the configuration. jam
31:58
configuration. jam
31:58
configuration. jam file in other words let's return here
32:02
file in other words let's return here
32:02
file in other words let's return here not Tad configuration. gaml right there
32:09
not Tad configuration. gaml right there
32:09
not Tad configuration. gaml right there and the name is subscribe pole
32:13
and the name is subscribe pole
32:13
and the name is subscribe pole interval and the value is going to be so
32:18
interval and the value is going to be so
32:18
interval and the value is going to be so you can see the
32:20
you can see the
32:20
you can see the format
32:23
um so 24h is 24 hours
32:29
um so 24h is 24 hours
32:29
um so 24h is 24 hours so I believe this is a valid 10s in
32:35
so I believe this is a valid 10s in
32:35
so I believe this is a valid 10s in other wordss 10
32:37
other wordss 10
32:37
other wordss 10 seconds let's see if this works save
32:41
seconds let's see if this works save
32:41
seconds let's see if this works save let's close this down let's return to
32:45
let's close this down let's return to
32:45
let's close this down let's return to configuration and let's fire up the
32:48
configuration and let's fire up the
32:48
configuration and let's fire up the application Again by using the daer Run
32:51
application Again by using the daer Run
32:51
application Again by using the daer Run command so this is
32:54
command so this is
32:54
command so this is running yes it's running
32:58
running yes it's running
32:58
running yes it's running and let's go back to the Asher app
33:00
and let's go back to the Asher app
33:00
and let's go back to the Asher app configuration
33:02
configuration
33:02
configuration portal right here in this page and then
33:06
portal right here in this page and then
33:06
portal right here in this page and then edit
33:08
edit
33:08
edit um let's change I don't know
33:11
um let's change I don't know
33:11
um let's change I don't know chili um super chili
33:16
chili um super chili
33:16
chili um super chili apply and let's see if this is reported
33:21
apply and let's see if this is reported
33:21
apply and let's see if this is reported back to the application
33:23
back to the application
33:23
back to the application somehow first time yes yes yes we have
33:27
somehow first time yes yes yes we have
33:27
somehow first time yes yes yes we have this one
33:29
this one
33:29
this one but for the thing is that I'm just
33:31
but for the thing is that I'm just
33:31
but for the thing is that I'm just returning item as uh comp complex object
33:35
returning item as uh comp complex object
33:36
returning item as uh comp complex object right um we need to serialize that
33:40
right um we need to serialize that
33:40
right um we need to serialize that object into Json or
33:42
object into Json or
33:42
object into Json or something because this is the this is
33:45
something because this is the this is
33:45
something because this is the this is the line that is being executed so the
33:48
the line that is being executed so the
33:48
the line that is being executed so the the application works the subscription
33:50
the application works the subscription
33:50
the application works the subscription works the thing is that I need to I
33:52
works the thing is that I need to I
33:52
works the thing is that I need to I don't know maybe use Json
33:56
don't know maybe use Json
33:56
don't know maybe use Json serializer Dot
33:58
serializer Dot
33:59
serializer Dot serialized um item bar serialized item
34:04
serialized um item bar serialized item
34:04
serialized um item bar serialized item is going to be this one in serialized
34:07
is going to be this one in serialized
34:07
is going to be this one in serialized item and let's use I don't know
34:10
item and let's use I don't know
34:10
item and let's use I don't know serialized
34:12
serialized
34:12
serialized item and then serialize item and let's
34:17
item and then serialize item and let's
34:17
item and then serialize item and let's use the string interpolation format in
34:22
use the string interpolation format in
34:22
use the string interpolation format in syntax and we're ready to rumble again
34:25
syntax and we're ready to rumble again
34:25
syntax and we're ready to rumble again let's go back stop
34:29
let's go back stop
34:29
let's go back stop run this is
34:32
run this is
34:32
run this is running yes this is reporting the first
34:35
running yes this is reporting the first
34:35
running yes this is reporting the first time I think I need
34:37
time I think I need
34:37
time I think I need to use return right because otherwise
34:42
to use return right because otherwise
34:42
to use return right because otherwise this is reporting that there was some
34:44
this is reporting that there was some
34:44
this is reporting that there was some change but there wasn't the thing is
34:47
change but there wasn't the thing is
34:47
change but there wasn't the thing is that the first time just reports
34:51
that the first time just reports
34:51
that the first time just reports everything anyway it doesn't matter
34:53
everything anyway it doesn't matter
34:53
everything anyway it doesn't matter right now the thing is that I want to
34:55
right now the thing is that I want to
34:56
right now the thing is that I want to edit again let's change super chili back
35:00
edit again let's change super chili back
35:00
edit again let's change super chili back to chili and let's change cool to super
35:03
to chili and let's change cool to super
35:03
to chili and let's change cool to super cool apply let's
35:06
cool apply let's
35:06
cool apply let's return and eventually we're going to
35:10
return and eventually we're going to
35:10
return and eventually we're going to have those changes right here as you can
35:13
have those changes right here as you can
35:13
have those changes right here as you can see here on the screen uh super cool
35:18
see here on the screen uh super cool
35:18
see here on the screen uh super cool right super
35:20
right super
35:20
right super cool this is it this is the setting that
35:23
cool this is it this is the setting that
35:23
cool this is it this is the setting that was
35:25
was
35:25
was updated so
35:28
updated so
35:28
updated so as I mentioned before you can use this
35:30
as I mentioned before you can use this
35:30
as I mentioned before you can use this technique of subscribing to
35:33
technique of subscribing to
35:33
technique of subscribing to configuration changes and updates for
35:37
configuration changes and updates for
35:37
configuration changes and updates for doing something some kind of execute
35:39
doing something some kind of execute
35:39
doing something some kind of execute some kind of logic in your application
35:41
some kind of logic in your application
35:41
some kind of logic in your application maybe you want to I don't know fire up a
35:43
maybe you want to I don't know fire up a
35:43
maybe you want to I don't know fire up a new event maybe you want to execute a
35:46
new event maybe you want to execute a
35:46
new event maybe you want to execute a new method maybe you want to store that
35:48
new method maybe you want to store that
35:48
new method maybe you want to store that information in a memory cache or in a
35:51
information in a memory cache or in a
35:51
information in a memory cache or in a distributed cash or maybe you want to I
35:54
distributed cash or maybe you want to I
35:54
distributed cash or maybe you want to I don't know luckily you have a database
35:57
don't know luckily you have a database
35:57
don't know luckily you have a database that is being you know running in memory
35:59
that is being you know running in memory
36:00
that is being you know running in memory or
36:01
or
36:01
or something so it depends right just like
36:06
something so it depends right just like
36:06
something so it depends right just like everything else in
36:09
everything else in
36:09
everything else in software it
36:12
software it
36:12
software it depends so so so so cool so this is
36:17
depends so so so so cool so this is
36:17
depends so so so so cool so this is fantastic this is
36:19
fantastic this is
36:19
fantastic this is marvelous and I think that is it this is
36:23
marvelous and I think that is it this is
36:23
marvelous and I think that is it this is the configuration
36:24
the configuration
36:24
the configuration component remember that you can also use
36:27
component remember that you can also use
36:27
component remember that you can also use the
36:29
the
36:29
the uh endpoint Itself by executing
36:33
uh endpoint Itself by executing
36:33
uh endpoint Itself by executing v1.0 slash configuration and then pass
36:36
v1.0 slash configuration and then pass
36:36
v1.0 slash configuration and then pass the parameters but
36:39
the parameters but
36:39
the parameters but again I don't think that's real world
36:41
again I don't think that's real world
36:42
again I don't think that's real world that's for demo purposes if your
36:44
that's for demo purposes if your
36:44
that's for demo purposes if your programming
36:46
programming
36:46
programming language supports um an SDK in other
36:50
language supports um an SDK in other
36:50
language supports um an SDK in other words if Dapper supports your
36:53
words if Dapper supports your
36:53
words if Dapper supports your programming language then use the asdk
36:57
programming language then use the asdk
36:57
programming language then use the asdk use the official SDK that the
37:00
use the official SDK that the
37:00
use the official SDK that the Dapper um
37:03
Dapper um
37:03
Dapper um Team uh has created for you right just
37:07
Team uh has created for you right just
37:07
Team uh has created for you right just like the one that I'm using here for
37:11
like the one that I'm using here for
37:11
like the one that I'm using here for net fantastic don't use hardcoded
37:15
net fantastic don't use hardcoded
37:15
net fantastic don't use hardcoded strings don't use
37:18
strings don't use
37:18
strings don't use hardcoded configuration settings in your
37:22
hardcoded configuration settings in your
37:22
hardcoded configuration settings in your applications even if you're not a Nal
37:25
applications even if you're not a Nal
37:25
applications even if you're not a Nal developer you can also use redis you can
37:29
developer you can also use redis you can
37:29
developer you can also use redis you can remember that redis is running as a
37:31
remember that redis is running as a
37:31
remember that redis is running as a container in your machine When You're
37:33
container in your machine When You're
37:33
container in your machine When You're Building dopper Solutions since that's
37:35
Building dopper Solutions since that's
37:35
Building dopper Solutions since that's the one of the default uh
37:38
the one of the default uh
37:38
the one of the default uh components um that is pulled from
37:42
components um that is pulled from
37:42
components um that is pulled from dockerhub
37:44
dockerhub
37:44
dockerhub so I have radius
37:47
so I have radius
37:47
so I have radius here uh running in this board in this
37:51
here uh running in this board in this
37:51
here uh running in this board in this case I went to the Asher app
37:53
case I went to the Asher app
37:53
case I went to the Asher app configuration path but you can also use
37:56
configuration path but you can also use
37:57
configuration path but you can also use redis
37:58
redis
37:58
redis or pogress SQL or postgressql it depends
38:02
or pogress SQL or postgressql it depends
38:02
or pogress SQL or postgressql it depends on how you pronounce that
38:05
on how you pronounce that
38:05
on how you pronounce that um um that
38:08
um um that
38:08
um um that word so this is great remember doering
38:12
word so this is great remember doering
38:12
word so this is great remember doering action is a weekly series about
38:16
action is a weekly series about
38:16
action is a weekly series about Dapper this is session nine and I'm
38:19
Dapper this is session nine and I'm
38:19
Dapper this is session nine and I'm Rodrigo and I strongly suggest you go
38:23
Rodrigo and I strongly suggest you go
38:23
Rodrigo and I strongly suggest you go back in time and watch the other
38:25
back in time and watch the other
38:25
back in time and watch the other sessions and for today thank you very
38:28
sessions and for today thank you very
38:28
sessions and for today thank you very much for your time and see you next week
38:32
much for your time and see you next week
38:32
much for your time and see you next week [Music]


