Designing an always-on service that needs to be able to handle new types of requests

I need to design a service that preforms calculations, the calculations are of the form of invoicing a method and returning a value in some manner.

One of the requirements is that when a new calculation is made available I won't need to take down the entire system.

I thought of one of the method for achieving this, but I am not satisfied with my design which basically is not type-safe and error prone (and in this way achieves its dynamic abilities), I would like to show you what I had in mind and hope that the answers would help me make implements to achieve goals such as type safety. I am writing in C#, but this shouldn't matter too much.

My way: I thought about doing this is by having a server that receives XML's (basically a string) that includes the name of the calculation followed by the input parameters (different calculations can receives different amount of input arguments). The server would then use the name of the calculation requested to write the request to another server which preforms the specific calculation requested and writes the resulting output as XML to a dedicated area where the requester can read it. I intended to use an MQ for implementing sending and routing messages, but this is more of an implementation detail.

The advantages in my way is that the requester can send an XML requesting a new service and my server would know how to handle the request (just route it to some queue so that a new program doing the new calculation would be made) - this is without having to update Dll's on the client side and more importantly is that all existing calculations offered by the service are available (e.g the sever doesn't know which calculations actually exists thus no need to take it down).

The disadvantages are that the XML is a basically a string with all related disadvantages about type safety (moreover - someone can get the number of parameters wrong!).

One way to mitigate this is giving the client a new dll for each service with an interface with a method and an implementation that serializes the data correctly and sends it to the server - but this isn't ideal mainly because I don't want my code to sit at the client (say I have bugs or upgrade my IO component, now I have to notify and update code for my users).

What do you think about my solution ? I would appreciate any improvements, especially ones that can make the design more robust and less error prone.

Replay

Category: design Time: 2016-07-31 Views: 4
Tags: Design

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.165 (s). 12 q(s)