Aspire looks pretty good and I'm excited to see where it goes. Your example is nice if everything is under one solution but we all know that's not how we dev in reality. What I'd like to know Nick is; how do wire up aspire when your frontend projects and APIs are in separate solutions?
Came to say this. In reality all our projects are in separate repos. I’m struggling to see how Aspire can be used with that structure. It seems like it’s only good for multiple projects in one solution ?
@@apr0lI've been looking at the Aspire documentation from Microsoft to see if there is examples of the above use case and I don't see anything that's black and white. I think you'd have to use its service discovery option to find services and there is mention of k8s or azure containers discovery. I've not attempted to play around yet. I'm hoping nick or someone's done the hard graft and will provide a nice short overview soon
This is fantastic, please make a series and take this to the limits. Can we have different components like workers that consume service bus messages, how does one del with connection strings and so on. What aspire packages are there, and what do they offer. I am dealing with microservices, and bringing up the local environment means running this and that container, storage and service bus in Azure (storage could be also in the emulator), and running other parts in VS to do debugging, and then command line to fire up tests against this setup. it is really a pain everytime I want to debug
To be honest, starting in the middle of the video, I just sat with my mouth open in surprise and admiration. This deserves every imaginable and unimaginable ovation towards the developers of this product! Bravo! Nick, need more information/tutorials on working with this project!
I'm skeptical. How would it work for heterogenous systems (here I mean systems with components created using different programming languages/technologies)? Let's say I have a FE written in js/ts and not blazor? Or I have a BE component(s) written in go/ruby/rust/python/anything else? Also, as mentioned here multiple times, it will work painlessly only for monorepos.
As for heterogenous systems - they include in repo an example for NodeJS. It looks like this: builder.AddNpmApp("frontend", "../NodeFrontend", "watch") So I assume, they allow to extend this builder with other commands, essentially allowing to connect anything As for monorepo - maybe as a fan of monorepos I'm a bit biased, but I'd say all issues with it in polyrepos are frequent issues with polyrepos in general. The 'defaults' project can be shared via some package - you have to keep track of versions, but that's the point of polyrepo. The 'host' project is used for 2 things: running all locally and generating the manifest file for deployment. So in polyrepo you'll probably have one for each deployment units (probably one per repo).
I'd assume it's essentially just .net lifecycle hooks integrated into dev containers. For 'foreign' tech stacks you'll likely have to specify whatever's needed for the entrypoint of those apps.
If you explore the web app with react js template then it is just a matter of configuration. Probably don’t have to touch Aspire because the config links the frontend and the web app
That's a LOT of rope! Newbie bootcamp developer can now create an entire distributed system in a few hours and once deployed can accidentally rack up tens of thousands of dollars worth of compute time in a matter of seconds. Genius Microsoft :)
Might be useful for smaller, new projects that are tightly integrated to .NET. One fundamental issue I see is that it seems completely tied to monolith repos. How is it supposed to work in a microserviced architecture without having annoying git submodules all over the place?
Yes very good point and also how to split across dev/code and a built/running environment. It often not possible to run everything locally and you want to point at share dev services that are already running.
It doesn't. It will only work for smaller projects with not too many services/moving parts. The idea that you can run an entire large distributed system on your dev machine is fundamentally flawed, so there is a hard ceiling with how far you can go with this.
I was so hyped when seeing this!🎉 Can you please make a video on how to deploy that on azure and aws? And even perhaps on self hosted vServers? A lot people would benefit from this❤
An export to k8s yaml or at least to docker compose is a must. A can see that deployments been handled to the DevOps guys and the dev team like "I did the aspire thing"
Is there a way to have it multirepo? Since we're speaking about microservices would be great to have services divided in different git repositories (without submodules) but it doesn't seams so easy. I mean, you need references for all the projects in that AppHost
thats kind of an internal docker compose seems cool for fullstack devolpment using blazor, but do you see aspire useful for backend devs as well? btw, that dashboard is nice, is it available also without using the aspire builder?
Immediately thought of Project Orleans (and DAPR too). Use-case might slightly differ, but they solve most of the problems + introduce "actor" framework that is designed to solve async problems in distributed systems
I'd be careful using DAPR for big scale, production scenarios, the component bindings have unfortunately still a way to go, and many pieces are still missing or only entering preview. The same applies for mentioned projet tye, if it's even still alive. And all that makes me feel this is going to end up the same - sounding too good to be true at first, then for ages still not yet production ready, and then not anymore alive...
@@colebq we had multiple, mostly with EH and Cosmos bindings, but also with resiliency not implemneted, with app health checks not respected, etc It should be coming soon but it wasn't there yet
Totally agree regarding Microsoft Orleans. In my opinion, MS Orleans solves most problems of a distributed system natively without any extra fuss. Unfortunately, it has never received the necessary attention from Microsoft itself because it makes many Azure products and services redundant and Microsoft would sell fewer Azure services.
It's pretty cool. I usually add a docker-compose file to manage a fairly similar flow, including otel-collector and grafana stack images. It's much easier with Aspire. It would be great to learn how to use an Aspire based approach in a production environment. I'm guessing this will be supported out of the box for Azure, but not sure about Kubernetes and other cloud platforms. Thanks for sharing, lots of useful and inspiring content!
The orchestrator doesn’t run in production. The assumption is that we can model the local environment when you are deployed. So for deployment we can setup your cluster in a way to preserves the experience when you run on k8s (or azure or aws).
My architect always says "microservices is not a technical implementation per-se, it is a team management implementation" (Before anyone comments, i know there are additional technical benefits to microservices!) We moved away from Monolithic applications because 20 developers all working on the same project step on each others toes... so we will break our application up into services, now each team could own a service or whatever.... but now my application is not a SLN with 30 services(and each "service" could have 2-3 CSPROJ projects!) but separate repo's with their own commit lifecycle and release lifecycle.. We are shipping individual services to production 2-3 times a day.... not sure how this will overcome that..
I don't think it's supposed to. Physical services != logical services, so you could have each team working in their own aspire universe (this is what people are doing today with docker compose). If you do need to call another service, there are a couple options, but it shouldn't fundamentally change what you are doing today.
Hey Nick, thank you for this Aspiring ;) demonstration. I am very interested in an example on how one can deploy an aspire application with containers. Where would the containers be hosted, how will they be deployed etc. Thanks!
hi Nick, you are, in my view, one of the most reliable and resourceful mentor for many developers currently. May i suggest however, that you slow your speech down so that your videos speak to us, rather than hurrying to get to the end. I think many do not mind sitting to your 2 hour videos, so the length doesnt throw us off...pretty please
Nick i would love to see your thoughts on the tech itself. I dont understand its use cases. In a distributed system you should be able to independently deploy services. This tech makes a distributed system function as a monolith. What are the use cases for that??
@filiphajek4103 Making services reference each other for debugging makes zero sense. You can already start multiple services with docker compose and debug them. I can see that maybe they wanted to be able to make distributed systems without the use of docker. And perhaps that's what it's for. So that you can create a distributed system easier without leaving the Microsoft ecosystem. But if that's all it is, it's nothing to be excited about. I won't use it personally just because ms has a tendency to drop tech like this. Docker is more proven.
@@Demonata1223 Yep, agree. But it is nice option, i can see some people using it .. including me. We have basically .NET only microservices .. i will give it a try.
"In a distributed system you should be able to independently deploy services" - you can have a distributed monolith, which is sometimes considered an antipattern, but it actually has some applications Anyway, host project is responsible for running apps locally and generating manifest for deployment pipeline. So I'd assume, you have one for each deployment unit and that's it
@qj0n Yeah, sorry, I've never seen a good case for a "distributed monolith." I've only seen inexperienced devs attempt distributed system and accidently making one. Which is extremely common. I can see that perhaps you could setup a host for each project. Although I'm pretty sure MS is leaning into single deployment as "the way" to do it. Regardless of any of that. Maintaining clean lines of separation in a distributed system is hard. Having tech that forces your services to reference each other will only make it harder. It very much seems to be the case that MS has made aspire to help create distributed systems that are forced to be anti pattern. As such, it's use cases are limited to cases where a "distributed monolith" are needed. Which. I've never seen a need for in my career. This is definitely going to go the route of orleans, fading into the background quick, I'd predict
Super excited for this! Looks amazing. Can you do a video on how would set this up for micro services? I'm a little confused how you would get other solutions to recognize the app host unless you would publish it as a nuget package or something.
@nickchapsas can you make a video on how we can create our own Aspire Components? I would like to use it to run containers locally for databases/services not currently offered.
This is very cool. I look forward to your next videos. I'll have to check the .NET Conf content, but the three things that I'd like to know about are: 1) what's the auth story? can we set up and mock client apps to delegate to a provider like Entra or Google? 2) what's the best practice for protecting the API with token-based auth? roll-your-own with filters, or is there something out of the box in Aspire? 3) what's the native client story? anything that works for Blazor webassembly that wouldn't translate to Blazor hybrid (MAUI/WPF/WinForms)? interested in that answer for both auth, and just in general.
This is my primary question. Does it have the power to simplify things when you’re using, say, an Angular front-end. My expectations are quite low, but if aspire turns out to be a hit, they’ll probably start adding those kinds of features, since it’s far easier to be language agnostic on the backend these days than the frontend.
@@Bliss467 I totally agree, and if this simplifies integrating multiple dotnet projects in a deployment of multiple technology stacks, that could just mean less burden on devops, by having less to worry about.
apparently it supports it - in their examples I found integration with NPM Node backend app: builder.AddNpmApp("frontend", "../NodeFrontend", "watch") I guess they can wrap any app you can run with a command, so it shouldn't be a problem
Great introduction. From my perspective it feels like Aspire tries to solve.a problem where teams have a lot of distributed applications... but is the solution really another tool, or maybe it should be to consolidate some of the applications? With that said, I do think it is good that they are pushing more good defaults with otel and also makes it easy to connect things locally. I also wonder how, and if, it is possible to include something like a nextjs application into this world? I mean, create API in .NET, use docker for redis, and what do I do with an "external" thing like a nextjs application?
I was thinking this same, I wish they focused on completing the OTEL support or better cover typical scenarios in the default SDKs so it needs less boilerplate and hacks, other than trying to come up with just another layer on top of those. It's quite amazing for example how poorly EventHubs work with both OTEL and AppInsights out of box -> fix that. Or how much work you need to for proper batching or alerting in the EH SDK. But no, instead we get another abstraction layer that looks all cool and fancy, but which no one will use in a serious project, cause he'll hit a wall sooner or later.
@@kocot.This isn't an abstraction layer. This isn't tied to Azure. We're working with SDK teams in the general ecosystem to make OTEL better so that the dashboard *is* more useful.
The comments under this thread are crazy... "Do you not configure Git correctly and use branches" and "If you need more than 10-15 services you have done something horribly horribly wrong", are people joking or do they not have enterprise experience?
@@brandonpearman9218 We have almost 150 projects under a single solution... We just unload what we aren't working on, use Git submodules, it has never been an issue even with two dozen developers on the project.
Can you please extend the usage of Aspire with Identity for example, and how to keep all the authorization and authentication separate from the frontend?
What's the purpose of this tool? Is it supposed to be use in production or in development? Is it going replace Application Insights and/or Elastic APM?
This is actually cool, will make building micro services architecture alot easier... wiring it all up. Would like to know how to deploy such a project with a dependency on a docker container.
I don't know about that. Microservices are supposed to be independently deployable and independent of each other. Having to reference each service defeats the purpose I think
@@Demonata1223 Yeah I find it a little bit weird. I wonder if we can export that manifest.json with enough data for other people to get the docker images configured with all the variables and run in their system without depending on my repo. It also seems to be more specific for http workflows. Not sure about the benefits of using Aspire with the Rabbitmq package.
@@Demonata1223 Ah, I was more looking at it from an easy wiring it all up to each other, I was under the understanding you can still independently deploy it from each other...
We already tried this with Fabric. Plus no big company is going to use such a toy. When you have a db or even cache data needs to be strictly controlled. An image for the container would be pulled from a private repo that would be a specific version of redis + hardening, not some random nuget install. I'm sure all this can be cofigured, but why not just stick with k8s?
"Best Practices" has become the phrase that directly translates to "Whatever will allow Microsoft to continue to take the maximum money they can from you". If they were truly interested in helping companies innovate, there would be comprehensive and simple upgrade paths from the last version of their web framework to the next. There is no "evolution path" because there's no money in that. However, there is money to be had in Microsoft Consulting rebuilding your product for you from scratch... again and again. I was on that side of the fence for a long time and I know how it works. Small development teams cannot keep up with Microsoft's pace at the same time they are trying to implement their own company's internal requirements. And don't get me wrong... I've been 100% in the Microsoft development camp since the 80s and have never strayed from that path. Although, now, it's no longer a walking path but a 10-lane highway with no speed limit and everyone is getting run over.
How do you secure the dashboard. I mean if you run this in a production environment, can you add access rights to it? And can you also see to it that some environment variables are masked, as in some situations there is one team handling the system and another team handling the development and they aint usually allowed to access passwords but they are interested in seeing logs.
So, what if I want to compile/run non .NET projects? Normally, I would just run a published docker image? How would this work with aspire? As far as I can see, it only has support for .NET right?
When running an Aspire solution locally does the Aspire tooling build multiple Linux containers and launch them? Half way through Nick's video I was expecting him to switch to Docker Desktop and show the solution services running as containers under Windows Subsystem for Linux (WSL). Neither Nick's video or the Microsoft .Net Conf 23 presentations did this, so what is the local runtime model?
After upgrading to the latest VS2022 ( called preview ) and testing Aspire I can answer my own question. The Aspire tooling does not use Docker containers for regular C# projects when running locally. The Aspire dashboard shows the process ID of each project and for Blazor and WebAPI projects the process IDs seem to map to regular Windows .exe's. The launch time of the demo Aspire 3-project solution is impressive and much faster than Dapr which is container based even for local development. When an Aspire solution is first run VS2022 shows a prompt that suggests running Docker, this is optional and must be a default suggestion just in case a solution does include a container based service such as Redis. I assume that Aspire is capable of launching a hybrid solution comprised of both regular Windows projects and container based services with automatic network mapping between the Windows o/s localhost and container VNets within Docker Desktop.
@@davidfowl This is the answer I was hoping for. I had previously spent a few months working on a C# Dapr project and found that its container based build/deployment model did not result in an efficient development "inner loop". I am beginning to foresee a complementary set of technologies emerging for distributed system deployment in the Cloud namely Aspire > Dapr > Radius. My smaller pure C# solution (2 x Blazor UI, 5 MicroServices and 6 going on 10 to 15 Azure Durable functions) looks like a perfect fit for Aspire + Azure Container Apps) though I understand why larger orgs would deploy to a Dapr architecture and adopt Radius for higher level cloud architecture conformance.
So many questions left. Please continue describing the topic. For instance how service descovery exactly works. Do you know something about Microsoft Orleans?
I love this, but i really wants to see what it looks like with a lot of microservices in a fully fledged application. Also, we're gonna have to wait for extra tooling to bring none dotnet based web pages to aspire (because i'd love to monitor my react to the same interface while debugging). I also don't mind containers and apis to be different pages. There's other UIs choices (like the metrics filters being unreadable) that are more important to tackle first IMO
What that is really insane dealing with all that will be tricky but reaching docker is crazy thing this is going to be the Futcher of distributed systems
is it possible to stop, edit and start one of those sub projects while others are running? having few projects like api, some micro services that it uses and FE and needing to fix some bug in only one of them, it would take too much time to stop everything and then start again after change
There's no explicit restart in the dashboard today, we definitely need to add that (there's an issue). You can run dotnet watch and change individual services and it'll auto restart. You can also hot reload, or ctrl + f5 in VS and rebuild individual services. We need to improve this though.
Looks very promising. I wonder will it be possible to run a single project after it's configured as a aspire component? For example, if I want to only quickly debug the api project.
I like the concept, but it seems like the only problem it actually solves is if you were using appsettings instead of something like Azure App Configuration, now you don't have to keep multiple copies of the same settings around. Which is nice, but why aren't you just using App Config instead...? Otherwise, if you want to add redis caching, you still have to go into every project that wants to use it and register it individually, on each one, with magic strings and no compile-time errors if you got it wrong. That's the part that needs to be centralized, imo And how are you supposed to test any individual service, now that they're all dependent on Aspire? It looks like you can't even try to run the Web service now, without running Aspire, which also runs the API - but maybe you just want to test the web service by itself. Though there's not much reason to do that, but consider that maybe you add any Aspire feature, like redis caching, to the API - now you can't run the API without also running Web And how does this work when the services are all hosted on different servers? It seems like you're expected to run just the Aspire application, which runs all the others from the same host
> I like the concept, but it seems like the only problem it actually solves is if you were using appsettings instead of something like Azure App Configuration, now you don't have to keep multiple copies of the same settings around. Which is nice, but why aren't you just using App Config instead...? Azure App configuration is great if you're deploying to Azure and you're ok using it in development? I'm not 100% sure how you'd populate the configuration server with connection strings in development but maybe teams have workflows for doing that. Seems heavy for development, but great for deployed apps. > Otherwise, if you want to add redis caching, you still have to go into every project that wants to use it and register it individually, on each one, with magic strings and no compile-time errors if you got it wrong. That's the part that needs to be centralized, imo What if only 1 of my services is using redis? What if I'm using 2 different redis caches in one of my services? I think we can do better than magic strings with code generation, but one very cool thing about using code to represent the app model is that you can do things like share constants between the apphost and projects that consume those services. > And how are you supposed to test any individual service, now that they're all dependent on Aspire? It looks like you can't even try to run the Web service now, without running Aspire, which also runs the API - but maybe you just want to test the web service by itself. The aspire dependency is a light one. Running it standalone just means adding the required connection strings to the project's configuration. > And how does this work when the services are all hosted on different servers? It seems like you're expected to run just the Aspire application, which runs all the others from the same host You can run the application from your point of view. If you need to run something you don't have the source for, then you can point to a remote version of it. Otherwise, if you do have the source you can create an aspire configuration for running that subset of projects.
This is very cool, the one thing missing is "how to work with multi-repo". By default works great in a monorepo, but in reality most of companies running microservices have repo/service setup. How would this work in that case?
The distributed glue of dapr is the dapr side-car. In a dapr deployment most application services need an extra buddy container to host the side car, this doubles the container count seen in Docker for Windows when testing locally. It would be good if Microsoft confirmed the side-car concept has been eliminated in Aspire.
@@flibbertigibbet6324 official document says dapr works on an abstracted api which enables easy swap of underlying components whereas aspire seems to be using them as is without an abstraction on top. I personally like dapr as it also offers right integration with azure container apps then again with most my projects being azure functions I find it out hard to justify doing all these wiring bits
In the traces, how does It work for database queries ? For example, If the backend runs a entity framework query, Will the trace show the query and How much time takes to run ?
Great intro video Nick, thanks for sharing it. MS documentation is also pretty sufficient to this point (e.g. I was wandering whether someone would still need Dapr and is answered in MS Aspire FAQs). I just wander if Aspire is tight to Blazor or you can have solutions with different frontend technologies.
Suppose I intend to build an AI ecosystem with 4 autonomous agents, including one for ML and others for LLM chat, direct-messaging, and analytics on text blobs from the ML data. Because the agents are essentially distributed apps, would Aspire be good for this?
@@davidfowl Tx the encouragement. 😉 The system will enable families in need to apply through a web portal for a grant, which will be either accepted or rejected based on ML-categorized data for thousands of prior requests having ~6 model parameters. An analysis agent will determine if more info is required from the family, and hand off to the DM agent to contact the family via the portal. Because many of these families are non-English speaking, or have a limited vocabulary, the DM agent will adjust the conversation as needed -- like telling ChatGPT to adjust for a Spanish-speaking 5-year old. The caseworkers will have access to another chat agent that they will train for final approvals. New caseworkers will learn from the same agent. I'm going to start from scratch -- Blazor\8 all the way. Wish me luck 😁
Some things that bother me is this was developed secretly. Project tye is dead, but as far as I remember, there was no clear announcement or communication that there will be a bigger better solution for the problem. And as others already mentioned, what if you don't have everything in a monorepo. God forbid, not all dependencies are dotnet :o And can it generate the needed code / config to run in prod? Or ppl still have to learn k8s, all the little details. Just now you run dev with a completely different configuration?
Aspire looks pretty good and I'm excited to see where it goes.
Your example is nice if everything is under one solution but we all know that's not how we dev in reality. What I'd like to know Nick is; how do wire up aspire when your frontend projects and APIs are in separate solutions?
I'd like to add, does everything need to be on dotnet 8 for aspire to work?
aspire template is only in latest preview version of vs, so looks like yes@@2u1u
Came to say this. In reality all our projects are in separate repos. I’m struggling to see how Aspire can be used with that structure. It seems like it’s only good for multiple projects in one solution ?
Use nuget packages maybe? Idk if it'll work like that tho
@@apr0lI've been looking at the Aspire documentation from Microsoft to see if there is examples of the above use case and I don't see anything that's black and white. I think you'd have to use its service discovery option to find services and there is mention of k8s or azure containers discovery. I've not attempted to play around yet. I'm hoping nick or someone's done the hard graft and will provide a nice short overview soon
Thanks
This is fantastic, please make a series and take this to the limits. Can we have different components like workers that consume service bus messages, how does one del with connection strings and so on.
What aspire packages are there, and what do they offer.
I am dealing with microservices, and bringing up the local environment means running this and that container, storage and service bus in Azure (storage could be also in the emulator), and running other parts in VS to do debugging, and then command line to fire up tests against this setup. it is really a pain everytime I want to debug
To be honest, starting in the middle of the video, I just sat with my mouth open in surprise and admiration. This deserves every imaginable and unimaginable ovation towards the developers of this product! Bravo!
Nick, need more information/tutorials on working with this project!
I'm skeptical. How would it work for heterogenous systems (here I mean systems with components created using different programming languages/technologies)? Let's say I have a FE written in js/ts and not blazor? Or I have a BE component(s) written in go/ruby/rust/python/anything else? Also, as mentioned here multiple times, it will work painlessly only for monorepos.
As for heterogenous systems - they include in repo an example for NodeJS. It looks like this: builder.AddNpmApp("frontend", "../NodeFrontend", "watch")
So I assume, they allow to extend this builder with other commands, essentially allowing to connect anything
As for monorepo - maybe as a fan of monorepos I'm a bit biased, but I'd say all issues with it in polyrepos are frequent issues with polyrepos in general. The 'defaults' project can be shared via some package - you have to keep track of versions, but that's the point of polyrepo. The 'host' project is used for 2 things: running all locally and generating the manifest file for deployment. So in polyrepo you'll probably have one for each deployment units (probably one per repo).
I'd assume it's essentially just .net lifecycle hooks integrated into dev containers. For 'foreign' tech stacks you'll likely have to specify whatever's needed for the entrypoint of those apps.
If you explore the web app with react js template then it is just a matter of configuration. Probably don’t have to touch Aspire because the config links the frontend and the web app
This is huge. We use AWS cdk in our company and that is a pain in the neck. If this works for aws in the future, will be a big win
That’s the hope!
I've never tried distributed applications before because they are so overwhelming. Maybe this will be the start of something new.
This is a brilliant addition. It has the power of Azure Service Fabric without all the overhead and complexity. Nicely explained by Nick.
You named the reason why it won't be popular.
That's a LOT of rope! Newbie bootcamp developer can now create an entire distributed system in a few hours and once deployed can accidentally rack up tens of thousands of dollars worth of compute time in a matter of seconds. Genius Microsoft :)
Might be useful for smaller, new projects that are tightly integrated to .NET. One fundamental issue I see is that it seems completely tied to monolith repos. How is it supposed to work in a microserviced architecture without having annoying git submodules all over the place?
Nuget?
maybe, have an aspire repo that submodules all the microservices / apps
@@BarbarosYurttagul sounds like a pain in the ass to maintain tbh. You'll have to update the submodule every time something changes
Yes very good point and also how to split across dev/code and a built/running environment. It often not possible to run everything locally and you want to point at share dev services that are already running.
It doesn't. It will only work for smaller projects with not too many services/moving parts. The idea that you can run an entire large distributed system on your dev machine is fundamentally flawed, so there is a hard ceiling with how far you can go with this.
I was so hyped when seeing this!🎉
Can you please make a video on how to deploy that on azure and aws? And even perhaps on self hosted vServers?
A lot people would benefit from this❤
Self-hosted would be awesome
@@petropzqi yep -I suspect it would be possible on self-hosted. Would be awesome for my org.
I'd live to see a helm deployment example of those to eks or aks
An export to k8s yaml or at least to docker compose is a must. A can see that deployments been handled to the DevOps guys and the dev team like "I did the aspire thing"
A
Is there a way to have it multirepo? Since we're speaking about microservices would be great to have services divided in different git repositories (without submodules) but it doesn't seams so easy. I mean, you need references for all the projects in that AppHost
Monorepo would be the best solution
I really hope Microsoft has something in mind. It's been said its done for big projects as well, and have it in one huge monorepo is not ideal
Git submodules perhaps?
maybe, have an aspire repo that submodules all the microservices / apps
@@GianlucaIselli How do you run today? Are you coupled to other projects to run your slice of Microservices?
This is so cool. look forward to more on this.
This looks interesting, I’d love to see some follow up with practical use cases. I guess that’s a Dometrain course in the making 😂
As always simple explanation, thanks nick!
thats kind of an internal docker compose
seems cool for fullstack devolpment using blazor, but do you see aspire useful for backend devs as well?
btw, that dashboard is nice, is it available also without using the aspire builder?
Immediately thought of Project Orleans (and DAPR too). Use-case might slightly differ, but they solve most of the problems + introduce "actor" framework that is designed to solve async problems in distributed systems
I'd be careful using DAPR for big scale, production scenarios, the component bindings have unfortunately still a way to go, and many pieces are still missing or only entering preview. The same applies for mentioned projet tye, if it's even still alive. And all that makes me feel this is going to end up the same - sounding too good to be true at first, then for ages still not yet production ready, and then not anymore alive...
@@kocot. Hi. People seem to use Dapr in production. What are the specific problems you are referring to?
@@colebq we had multiple, mostly with EH and Cosmos bindings, but also with resiliency not implemneted, with app health checks not respected, etc It should be coming soon but it wasn't there yet
Totally agree regarding Microsoft Orleans. In my opinion, MS Orleans solves most problems of a distributed system natively without any extra fuss. Unfortunately, it has never received the necessary attention from Microsoft itself because it makes many Azure products and services redundant and Microsoft would sell fewer Azure services.
@@kocot. Bs. Dapr is already used in production for sometime now. Even big companies like NASA is using it
Looks awesome, looking forward to the new videos about it.
It's pretty cool. I usually add a docker-compose file to manage a fairly similar flow, including otel-collector and grafana stack images. It's much easier with Aspire. It would be great to learn how to use an Aspire based approach in a production environment. I'm guessing this will be supported out of the box for Azure, but not sure about Kubernetes and other cloud platforms. Thanks for sharing, lots of useful and inspiring content!
The orchestrator doesn’t run in production. The assumption is that we can model the local environment when you are deployed. So for deployment we can setup your cluster in a way to preserves the experience when you run on k8s (or azure or aws).
Amazing! keep it up man
This is such a cool advancement, can't wait to give it a try
now THAT seems pretty damn cool, can't wait for this to mature!
Great Video. Thanks. Looking forward to learning more.
My architect always says "microservices is not a technical implementation per-se, it is a team management implementation" (Before anyone comments, i know there are additional technical benefits to microservices!)
We moved away from Monolithic applications because 20 developers all working on the same project step on each others toes... so we will break our application up into services, now each team could own a service or whatever.... but now my application is not a SLN with 30 services(and each "service" could have 2-3 CSPROJ projects!) but separate repo's with their own commit lifecycle and release lifecycle.. We are shipping individual services to production 2-3 times a day.... not sure how this will overcome that..
I don't think it's supposed to. Physical services != logical services, so you could have each team working in their own aspire universe (this is what people are doing today with docker compose). If you do need to call another service, there are a couple options, but it shouldn't fundamentally change what you are doing today.
Hey Nick, thank you for this Aspiring ;) demonstration. I am very interested in an example on how one can deploy an aspire application with containers. Where would the containers be hosted, how will they be deployed etc. Thanks!
This is really cool project! Thanks for sharing!
Look very cool. This is definitely something to deep into. Thanks!
This is a good feature for monitoring, thanks for sharing :)
hi Nick, you are, in my view, one of the most reliable and resourceful mentor for many developers currently. May i suggest however, that you slow your speech down so that your videos speak to us, rather than hurrying to get to the end. I think many do not mind sitting to your 2 hour videos, so the length doesnt throw us off...pretty please
Really appreciate the black friday deals. Money has been tight and ive been wanting to check out the logging class so finally picked it up!
Nick i would love to see your thoughts on the tech itself. I dont understand its use cases. In a distributed system you should be able to independently deploy services. This tech makes a distributed system function as a monolith. What are the use cases for that??
Local debugging/developing. Thats it. It has nothing to do with deployment of services.
@filiphajek4103 Making services reference each other for debugging makes zero sense. You can already start multiple services with docker compose and debug them.
I can see that maybe they wanted to be able to make distributed systems without the use of docker. And perhaps that's what it's for. So that you can create a distributed system easier without leaving the Microsoft ecosystem. But if that's all it is, it's nothing to be excited about. I won't use it personally just because ms has a tendency to drop tech like this. Docker is more proven.
@@Demonata1223 Yep, agree. But it is nice option, i can see some people using it .. including me. We have basically .NET only microservices .. i will give it a try.
"In a distributed system you should be able to independently deploy services" - you can have a distributed monolith, which is sometimes considered an antipattern, but it actually has some applications
Anyway, host project is responsible for running apps locally and generating manifest for deployment pipeline. So I'd assume, you have one for each deployment unit and that's it
@qj0n Yeah, sorry, I've never seen a good case for a "distributed monolith." I've only seen inexperienced devs attempt distributed system and accidently making one. Which is extremely common.
I can see that perhaps you could setup a host for each project. Although I'm pretty sure MS is leaning into single deployment as "the way" to do it.
Regardless of any of that. Maintaining clean lines of separation in a distributed system is hard. Having tech that forces your services to reference each other will only make it harder.
It very much seems to be the case that MS has made aspire to help create distributed systems that are forced to be anti pattern. As such, it's use cases are limited to cases where a "distributed monolith" are needed. Which. I've never seen a need for in my career. This is definitely going to go the route of orleans, fading into the background quick, I'd predict
Aspire is the best that happend since a long time!
Super excited for this! Looks amazing. Can you do a video on how would set this up for micro services? I'm a little confused how you would get other solutions to recognize the app host unless you would publish it as a nuget package or something.
Same here, I'm also curious to know how this works with projects running in different solutions.
+1 we should look deeper into this
That's probably one of the best released features by Microsoft in the last few years. I am thrilled to see more what Aspire can do
Awesome! Will make writing code for distributed apps way easier!
@nickchapsas can you make a video on how we can create our own Aspire Components? I would like to use it to run containers locally for databases/services not currently offered.
Amazing! This is so coooool!
Great work by MS, and thanks Nick for bringing it up in very elegant way.
What if one of my services is not written in .NET? What if I have a Typescript front end for example?
I guess like the redis cache container component, your Typescript app needs to be deployed as a container and loaded like so in your aspire project
This is very cool. I look forward to your next videos. I'll have to check the .NET Conf content, but the three things that I'd like to know about are: 1) what's the auth story? can we set up and mock client apps to delegate to a provider like Entra or Google? 2) what's the best practice for protecting the API with token-based auth? roll-your-own with filters, or is there something out of the box in Aspire? 3) what's the native client story? anything that works for Blazor webassembly that wouldn't translate to Blazor hybrid (MAUI/WPF/WinForms)? interested in that answer for both auth, and just in general.
There's no new auth story outside of what already exists.
Looks really cool! How would this work with multi platform/language orchesration?
This is my primary question. Does it have the power to simplify things when you’re using, say, an Angular front-end. My expectations are quite low, but if aspire turns out to be a hit, they’ll probably start adding those kinds of features, since it’s far easier to be language agnostic on the backend these days than the frontend.
@@Bliss467 I totally agree, and if this simplifies integrating multiple dotnet projects in a deployment of multiple technology stacks, that could just mean less burden on devops, by having less to worry about.
apparently it supports it - in their examples I found integration with NPM Node backend app:
builder.AddNpmApp("frontend", "../NodeFrontend", "watch")
I guess they can wrap any app you can run with a command, so it shouldn't be a problem
Nick got flashbanged at 15:36 lmao
As with many things I wish this was present when I started working on the setup I am currently working on...
So much effort to change.
wow, thank you. This is great, will make managing micro-services more easier
Great introduction. From my perspective it feels like Aspire tries to solve.a problem where teams have a lot of distributed applications... but is the solution really another tool, or maybe it should be to consolidate some of the applications? With that said, I do think it is good that they are pushing more good defaults with otel and also makes it easy to connect things locally. I also wonder how, and if, it is possible to include something like a nextjs application into this world? I mean, create API in .NET, use docker for redis, and what do I do with an "external" thing like a nextjs application?
I was thinking this same, I wish they focused on completing the OTEL support or better cover typical scenarios in the default SDKs so it needs less boilerplate and hacks, other than trying to come up with just another layer on top of those. It's quite amazing for example how poorly EventHubs work with both OTEL and AppInsights out of box -> fix that. Or how much work you need to for proper batching or alerting in the EH SDK. But no, instead we get another abstraction layer that looks all cool and fancy, but which no one will use in a serious project, cause he'll hit a wall sooner or later.
@@kocot.This isn't an abstraction layer. This isn't tied to Azure. We're working with SDK teams in the general ecosystem to make OTEL better so that the dashboard *is* more useful.
.Net Aspire has WingLang written all over it. I love it, and can't wait to put it to good use. :)
Looks like this requires teams to work on the same solution. Could be difficult
I've never understood why people say this. What issues are you facing? Do you not configure Git correctly and use branches like you should?
Consider have a thousands of microservices, can be difficult to put all those in one solution…
@@thiagomaia6351 you can use filtered solutions
The comments under this thread are crazy... "Do you not configure Git correctly and use branches" and "If you need more than 10-15 services you have done something horribly horribly wrong", are people joking or do they not have enterprise experience?
@@brandonpearman9218 We have almost 150 projects under a single solution... We just unload what we aren't working on, use Git submodules, it has never been an issue even with two dozen developers on the project.
Simply AWESOME
how scaling works?
how deployments done on different cloud provider?
how it will work on Kubernetes cluster?
how it will work on on-prem server farms?
My brain has just exploded. All these new things that Microsoft did for C# are insane. Thank you for giving us knowledge for all these new features.
So how is it distributed? It’s running on your single PC. How do we use it in kubernetes?
Can you please extend the usage of Aspire with Identity for example, and how to keep all the authorization and authentication separate from the frontend?
What's the purpose of this tool? Is it supposed to be use in production or in development? Is it going replace Application Insights and/or Elastic APM?
This is actually cool, will make building micro services architecture alot easier... wiring it all up.
Would like to know how to deploy such a project with a dependency on a docker container.
I don't know about that. Microservices are supposed to be independently deployable and independent of each other. Having to reference each service defeats the purpose I think
@@Demonata1223 Yeah I find it a little bit weird. I wonder if we can export that manifest.json with enough data for other people to get the docker images configured with all the variables and run in their system without depending on my repo. It also seems to be more specific for http workflows. Not sure about the benefits of using Aspire with the Rabbitmq package.
@@Demonata1223 Ah, I was more looking at it from an easy wiring it all up to each other, I was under the understanding you can still independently deploy it from each other...
@332glenn Each service has to have a reference to each other. Which means each service is deployed together.
@@Demonata1223 Good point 👍👍
This is beautiful
This is seriously cool! Just wish I had access to this a year ago when I was setting up a distributed application 😄
Put out the "way more Aspire content"! NOW! This looks awesome! And: When will Aspire be out of preview?
this is awesome!
This seems like it could be really powerful. From what I understand from your video, this is similar to creating a docker compose project.
We already tried this with Fabric. Plus no big company is going to use such a toy. When you have a db or even cache data needs to be strictly controlled. An image for the container would be pulled from a private repo that would be a specific version of redis + hardening, not some random nuget install. I'm sure all this can be cofigured, but why not just stick with k8s?
Unlike service fabric, this orchestrator is for development only. It can then map to your k8s or cloud specific container env for deployment
I don't see a Node.js component available (for now?). It would be great to see how this could integrate with Node.js projects.
Amazing!
nice informative video thanks. I need a kubernetes deployment description, because not much description about that, please add about this too.
"Best Practices" has become the phrase that directly translates to "Whatever will allow Microsoft to continue to take the maximum money they can from you". If they were truly interested in helping companies innovate, there would be comprehensive and simple upgrade paths from the last version of their web framework to the next. There is no "evolution path" because there's no money in that. However, there is money to be had in Microsoft Consulting rebuilding your product for you from scratch... again and again. I was on that side of the fence for a long time and I know how it works.
Small development teams cannot keep up with Microsoft's pace at the same time they are trying to implement their own company's internal requirements. And don't get me wrong... I've been 100% in the Microsoft development camp since the 80s and have never strayed from that path. Although, now, it's no longer a walking path but a 10-lane highway with no speed limit and everyone is getting run over.
How would you manage this with 1 repo per microservice? Would you have an aspire repo that submodules all the microservices / apps?
This is probably the most logical answer
How do you secure the dashboard. I mean if you run this in a production environment, can you add access rights to it?
And can you also see to it that some environment variables are masked, as in some situations there is one team handling the system and another team handling the development and they aint usually allowed to access passwords but they are interested in seeing logs.
So, what if I want to compile/run non .NET projects? Normally, I would just run a published docker image? How would this work with aspire? As far as I can see, it only has support for .NET right?
You can run any executable or container image as part of orchestration.
I love this!
.NET Aspire is amazing. Nicely explained @Nick. Thanks!
This is great, but how do you work with a true distributed application? For example when repositories are seperate and dont live in the same project?
this is exciting
When running an Aspire solution locally does the Aspire tooling build multiple Linux containers and launch them? Half way through Nick's video I was expecting him to switch to Docker Desktop and show the solution services running as containers under Windows Subsystem for Linux (WSL). Neither Nick's video or the Microsoft .Net Conf 23 presentations did this, so what is the local runtime model?
After upgrading to the latest VS2022 ( called preview ) and testing Aspire I can answer my own question. The Aspire tooling does not use Docker containers for regular C# projects when running locally. The Aspire dashboard shows the process ID of each project and for Blazor and WebAPI projects the process IDs seem to map to regular Windows .exe's. The launch time of the demo Aspire 3-project solution is impressive and much faster than Dapr which is container based even for local development. When an Aspire solution is first run VS2022 shows a prompt that suggests running Docker, this is optional and must be a default suggestion just in case a solution does include a container based service such as Redis. I assume that Aspire is capable of launching a hybrid solution comprised of both regular Windows projects and container based services with automatic network mapping between the Windows o/s localhost and container VNets within Docker Desktop.
It's using docker to run containers, but the orchestrator runs both containers *and* executables. Your projects do not run in containers.
@@davidfowl This is the answer I was hoping for. I had previously spent a few months working on a C# Dapr project and found that its container based build/deployment model did not result in an efficient development "inner loop". I am beginning to foresee a complementary set of technologies emerging for distributed system deployment in the Cloud namely Aspire > Dapr > Radius. My smaller pure C# solution (2 x Blazor UI, 5 MicroServices and 6 going on 10 to 15 Azure Durable functions) looks like a perfect fit for Aspire + Azure Container Apps) though I understand why larger orgs would deploy to a Dapr architecture and adopt Radius for higher level cloud architecture conformance.
So many questions left. Please continue describing the topic. For instance how service descovery exactly works. Do you know something about Microsoft Orleans?
What is Orleans?
I love this, but i really wants to see what it looks like with a lot of microservices in a fully fledged application. Also, we're gonna have to wait for extra tooling to bring none dotnet based web pages to aspire (because i'd love to monitor my react to the same interface while debugging). I also don't mind containers and apis to be different pages. There's other UIs choices (like the metrics filters being unreadable) that are more important to tackle first IMO
this is great!
What that is really insane dealing with all that will be tricky but reaching docker is crazy thing this is going to be the Futcher of distributed systems
@nickchapsas, thanks for the video!
I’d love to see your thoughts on Dapr someday.
awesome! thanks
What IDE do you use and what theme for the terminal?
Whether it can be used to react (frontend) and core (backend) project?
is it possible to stop, edit and start one of those sub projects while others are running? having few projects like api, some micro services that it uses and FE and needing to fix some bug in only one of them, it would take too much time to stop everything and then start again after change
There's no explicit restart in the dashboard today, we definitely need to add that (there's an issue). You can run dotnet watch and change individual services and it'll auto restart. You can also hot reload, or ctrl + f5 in VS and rebuild individual services. We need to improve this though.
Hi Nick, how is this different from Dapr?
You can use them together. It's one of the top questions in the repo
what is the terminal that you are using? Looks very nice :)
this is amazing
Looks very promising. I wonder will it be possible to run a single project after it's configured as a aspire component? For example, if I want to only quickly debug the api project.
Aspire components are nuget packages, but yes, if you configure your apps with the right configuration, you can still launch them individually.
How does this work in a multi-repo environment, where theses components/projects live in their own code repository?
I like the concept, but it seems like the only problem it actually solves is if you were using appsettings instead of something like Azure App Configuration, now you don't have to keep multiple copies of the same settings around. Which is nice, but why aren't you just using App Config instead...?
Otherwise, if you want to add redis caching, you still have to go into every project that wants to use it and register it individually, on each one, with magic strings and no compile-time errors if you got it wrong. That's the part that needs to be centralized, imo
And how are you supposed to test any individual service, now that they're all dependent on Aspire? It looks like you can't even try to run the Web service now, without running Aspire, which also runs the API - but maybe you just want to test the web service by itself.
Though there's not much reason to do that, but consider that maybe you add any Aspire feature, like redis caching, to the API - now you can't run the API without also running Web
And how does this work when the services are all hosted on different servers? It seems like you're expected to run just the Aspire application, which runs all the others from the same host
> I like the concept, but it seems like the only problem it actually solves is if you were using appsettings instead of something like Azure App Configuration, now you don't have to keep multiple copies of the same settings around. Which is nice, but why aren't you just using App Config instead...?
Azure App configuration is great if you're deploying to Azure and you're ok using it in development? I'm not 100% sure how you'd populate the configuration server with connection strings in development but maybe teams have workflows for doing that. Seems heavy for development, but great for deployed apps.
> Otherwise, if you want to add redis caching, you still have to go into every project that wants to use it and register it individually, on each one, with magic strings and no compile-time errors if you got it wrong. That's the part that needs to be centralized, imo
What if only 1 of my services is using redis? What if I'm using 2 different redis caches in one of my services? I think we can do better than magic strings with code generation, but one very cool thing about using code to represent the app model is that you can do things like share constants between the apphost and projects that consume those services.
> And how are you supposed to test any individual service, now that they're all dependent on Aspire? It looks like you can't even try to run the Web service now, without running Aspire, which also runs the API - but maybe you just want to test the web service by itself.
The aspire dependency is a light one. Running it standalone just means adding the required connection strings to the project's configuration.
> And how does this work when the services are all hosted on different servers? It seems like you're expected to run just the Aspire application, which runs all the others from the same host
You can run the application from your point of view. If you need to run something you don't have the source for, then you can point to a remote version of it. Otherwise, if you do have the source you can create an aspire configuration for running that subset of projects.
Hi, Data erased from the dashboard while we restart the editor. Any support / ideas to retain the data for local development?
This is very cool, the one thing missing is "how to work with multi-repo". By default works great in a monorepo, but in reality most of companies running microservices have repo/service setup. How would this work in that case?
Why would you want this for a multirepo? It is for running all your services together. You wouldn't do that for a multirepo anyway.
How does this compare with dapr?
The distributed glue of dapr is the dapr side-car. In a dapr deployment most application services need an extra buddy container to host the side car, this doubles the container count seen in Docker for Windows when testing locally. It would be good if Microsoft confirmed the side-car concept has been eliminated in Aspire.
@@flibbertigibbet6324 official document says dapr works on an abstracted api which enables easy swap of underlying components whereas aspire seems to be using them as is without an abstraction on top. I personally like dapr as it also offers right integration with azure container apps then again with most my projects being azure functions I find it out hard to justify doing all these wiring bits
In the traces, how does It work for database queries ? For example, If the backend runs a entity framework query, Will the trace show the query and How much time takes to run ?
Yes it will and it uses open telemetry to do so.
hmm does this mean that this only works if everything is in the same solution? Must use a mono repo?
Great intro video Nick, thanks for sharing it. MS documentation is also pretty sufficient to this point (e.g. I was wandering whether someone would still need Dapr and is answered in MS Aspire FAQs). I just wander if Aspire is tight to Blazor or you can have solutions with different frontend technologies.
Suppose I intend to build an AI ecosystem with 4 autonomous agents, including one for ML and others for LLM chat, direct-messaging, and analytics on text blobs from the ML data.
Because the agents are essentially distributed apps, would Aspire be good for this?
Sure why not?
@@davidfowl Tx the encouragement. 😉
The system will enable families in need to apply through a web portal for a grant, which will be either accepted or rejected based on ML-categorized data for thousands of prior requests having ~6 model parameters. An analysis agent will determine if more info is required from the family, and hand off to the DM agent to contact the family via the portal. Because many of these families are non-English speaking, or have a limited vocabulary, the DM agent will adjust the conversation as needed -- like telling ChatGPT to adjust for a Spanish-speaking 5-year old. The caseworkers will have access to another chat agent that they will train for final approvals. New caseworkers will learn from the same agent. I'm going to start from scratch -- Blazor\8 all the way. Wish me luck 😁
Some things that bother me is this was developed secretly. Project tye is dead, but as far as I remember, there was no clear announcement or communication that there will be a bigger better solution for the problem.
And as others already mentioned, what if you don't have everything in a monorepo. God forbid, not all dependencies are dotnet :o
And can it generate the needed code / config to run in prod? Or ppl still have to learn k8s, all the little details. Just now you run dev with a completely different configuration?
I don't see how will this scale out in a distributed system. ProjectReference won't work. Seems like a distributed monolith to me...
Can you do this say with an api in one solution and a frontend in another? (Without just putting them in the same solution)
what is this commandline highlighting that you have here?
Does it work only with blazer frontend? What about other frontend frameworks: Angular, React, Vue?