new TwitterHandler("@pardahlman");
$ git remote -v> origin https://github.com/pardahlman/
http://pardahlman.se
Mikroarkitektur
Monolithic application1
[mɑnəlɪθɪk æpləkeʃən]In software engineering, a monolithic application describes a software application which is designed without modularity. One application to rule them all.
// request customer over httpvar httpClient = new HttpClient("http://example.com/api/v1/");var customer = await httpClient.GetAsync<Apartment>(“apartments/1");
Can phone1
[bərk tɛləfon]Means of communicating through a direct line. Communication is established between two knownparties. Eavesdropping is difficult.
// request apartment over message busvar request = new ApartmentRequest { Id = 1 };var response = await busClient.RequestAsync<ApartmentRequest, ApartmentResponse>(request);
Message bus1
[mɛsədʒ bəs]An infrastructural component that connects applications (typically known as services) in a loosely coupled manner. A message bus specializes in transporting messages between applications.
ApartmentRequest
ApartmentUpdated
ApartmentAvailable
public interface IBusClient : IDisposable{
Task PublishAsync<T>(T message);Task<TResponse> RequestAsync<TRequest, TResponse>(TRequest request)Task SubscribeAsync<T>(Func<T, MessageInformation, Task> subscribe);// more methods here…
}
Integrationstester
Systemövervakning
protected virtual HealthReport GenerateHealthReport(){
var report = _healthFactory.CreateReportFor(this).WithIntegrations(
i => i.ScanConfigurationFile(),i => i.MongoDb("mongoDb"),i => i.SqlDb("slqDb"),i => i.HttpGet("http://elastic.local/")
);return report;
}
<appSettings><add key="DisableHealthReports" value=“false" /><add key="HealthRefreshInterval" value="10000" />
</appSettings>