Disabled architecture with .NET.

I am working with n-tier application using WinForm and WCF

Service Service (Windows Service) => WCF Service => Windows Form Client Application

The problem is that the WinForm client application must be 100% available to run even if the Engine service is down.

So how can I make the architecture disabled to make my winform application always available?

Thank.

0


source to share


3 answers


Typically, you will implement a queue internal to your application.

The queue will send requests to the web service. If the web service is disabled, it remains in the queue. The queue engine has to check each one so often to see if the web service is alive and when it will move whatever it has stored.

Alternatively, you can go directly to the web service and then simply submit it to the queue in case of initial failure. However, the queue still needs to check the web service as often.



EDIT: To clarify, yes, all business logic should be available on the client side. Otherwise, you will need to provide a verification mechanism when the client connects to the backup.

However, this is not a bad thing. Since you have to place the business logic in your own assembly (s) anyway.

+3


source


Have a look at Smart Client Factory: http://msdn.microsoft.com/en-us/library/aa480482.aspx

Just to highlight targets (this is the sniper from the link above):

  • They have a rich user interface that takes advantage of the power of the Microsoft Windows desktop.
  • They connect to multiple internal systems to exchange data with them.
  • They present information from multiple and varied sources through an integrated user interface, so the data looks like a back-end system.
  • They use local storage and processing resources for operation during periods of no network connection or intermittent network connection.
  • They are easy to deploy and configure.

Edit

I'm going to answer this with the usual CYA instruction, it really depends. Let me give you some examples. Take an application that will monitor the filesystem for files that will be generated in any number of different formats (DB2, Flatfile, xml). The application will then import the files, presenting a single view of the document to the user. And let him place e-commerce orders.



In this application, you can define how files are encrypted and uploaded to the server, make transformations (applying business logic, such as data normalization, etc.). But then what happens if the internet connection doesn't work. The user must now wait for their connection before they can place their e-commerce order.

The best solution would be to run the business rules on the client converting the files. Now let's say you had some sort of order-based business logic that would define additional rules like the seller to direct it or price discounts ... It might make sense to sit on the server.

The question you need to ask is what I need to make my application function when there is no server. Anything in this category should be client-side.

I also never used Click After deploying, we had to collapse our own update editor, which is a fairy tale for another thread, but you should submit updates easily. You can also code your business logic in the assembly that you load from the url, so when it runs on the client side it can be easily updated.

+1


source


You can do all your processing off-line and use something like Microsoft Sync Framework to synchronize data between client and server.

Assuming both server and client are .net, you can use the same codebase to validate data on both server and client. This way you will have a single code base that will serve both the server and the client.

You can use frameworks like CSLA.NET to make this validation process easier.

0


source







All Articles