English 中文(简体)
Server architecture question. (WCF+NServiceBus)
原标题:

First of all i will describe current state:
Server consists of several WCF services, hosted in one or several win services on diffirent machines.

  1. Service responsible for recieving data from diffirent devices. Communication with devices is implemented using sockets. Service instance mode - singleton.
  2. Data broker service - responsible for persisting data and sharing in by request. Instance mode - singleton.
  3. Configuration service - responsible for changing configuration database and working with administration console(WPF app, like SSMS). Handles connections from console, subscriber management, etc. Instance mode - singleton.
  4. Client access service - quite the same as above thith management of clients but also notifyes clients of new data, and acts like facade to service bus. And singleton again.
  5. Identity management service - Checks permissions and returns result. Singleton.

All of those services are connected with NServiceBus and i realy like how it works at this moment.

But:
Too many singletons. Mainly because to use servicebus i must have single instance of it afaik. I dunno maybe i can use nservice bus in session mode, but dont know how to handle issue that all of those services will use one queue.

And what if i will have 300+ clients? singleton can become unresponsive..

And i wanted to ask for some critics about all of this and maybe some one could suggest something.

Thanks in advance.
Alexey

最佳回答

Alexey,

While you should only have one instance of the bus per process, you can put that instance in a globally accessible place (as shown in the AsyncPages sample), and use that from non-singleton objects like web pages and WCF services.

Also, it is probably not appropriate to have all your services using one queue. Without better understanding your situation, I d give the default recommendation of one queue for each of the services you identified.

Hope that helps.

问题回答

暂无回答




相关问题
SQL Server - How many users do I *really* need?

I m setting up an application, and I m looking into purchasing a license for SQL Server. My question is pretty simple (though may have a complicated answer...) How many users accounts do I really ...

Object Graph / Persistence Question

I m currently working with an online application that requires multiple screens/steps in order to complete. The application domain is modeled using an object graph. Persistence to and from a database ...

Why does stack get truncated in Exception.StackTrace?

Why does the high part of the stack (in Exception.StackTrace) gets truncated? Let s see a simple example: public void ExternalMethod() { InternalMethod(); } public void InternalMethod() { try ...

ASP.NET MVC and Service Oriented Architecture

I would like to know how do i incorporate a feature like wcf within and MVC application. My current idea of the architecture is as follows: EntityFramework -> ASP.NET MVC (Views) ...

热门标签