Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple a CalcWorker that does the Quant calc from BlackScholesOptionPricerService #20

Open
bleunguts opened this issue Oct 7, 2023 · 0 comments

Comments

@bleunguts
Copy link
Owner

Extract into separate BackgroundService execution engine
See C:\Dev\projects(AspNetCore) Background Services\asp-dot-net-core-6-dot-net-6-creating-background-services\src\TennisBookings.ScoreProcessor\BackgroundServices

Design1:

  • PricingTasksController (WebApi)
    • Ping endpoint
    • PricingTaskRequested endpoint drops request onto queue
    • PricingTaskCompleted endpoint notifies via signalR bus that task has completed
  • QueueReaderService (BackgroundService) picks messages off MQ and calls Calc() on relevant calculator
  • On Task Completion POST to TaskCompleted endpoint
  • WPF read signalR bus to update results on screen
    Tech: SlimMessageBus (abstractionLayer) and NServiceBus or RabbitMQ

Design2:

  • PricingController API
  • PricingTaskProcessor : BackgroundService interacts with API via channels. So this will be in process
  • On PricingTaskProcessor.Execute() will trigger Invoke of AnalyticsLib.Price()
  • On PricingTaskProcessor.Execute() completion it will talk via channel to ASPNetCore Controller
  • On Subscribing To FX prices use ServerSentEvents https://dev.to/masanori_msl/aspnet-core-try-server-sent-events-5db2 or higher level SignalR
    Tech: BackgroundService, Channels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant