I am a software engineer, I work in c# development.
The software I am working on has a server and client layout. The server is more of a Database Layer, only it has direct ‘access’ to the Database. The client simply sends requests and receives the data in form of strings according to the requests, and not data sets or data tables. The database layer interacts with the database thru a dll file.
example:
Client requests that operation 144 is to be executed.
Server receives the operation number, sends it to the dll main routine:
Client:
string command = "144";
buffer = asci.GetBytes(command);
socket.send(buffer);
Server:
socket.receive(buffer);
str = asci.GetString(buffer);
op = Int32.Parse(str);
Dll.MainRoutine(op);
Dll main routine:
switch (op)
{
case 0: blah blah blah ; break;
case ..........................
case 144: i++ ; break ;
default : ;
}
Lets say the software is running on the actual server. I now want to introduce changes to the client and dll file only (add functionality). Yet I do not want to compile the server again. If I add a new command on the client side called 200, and I add a case to the dll main routine: case 200, will it work? Or do I need to recompile the sever as well?
Client:
string command = "200";
buffer = asci.GetBytes(command);
socket.send(buffer);
Server:
socket.receive(buffer);
str = asci.GetString(buffer);
op = Int32.Parse(str);
Dll.MainRoutine(op);
Dll main routine:
switch (op)
{
case 0: blah blah blah ; break;
case ..........................
case 144: i++ ; break ;
case 200: i+=10 ; break ;
default : ;
}
What I am trying to say is I want to be able to add functionality thru updates to the dll and client only. The server must always be running. Can this be done with dlls or is there another way?
Thank you…
No need to recompile the server if it just passes the command number to the DLL. It is completely sufficient to just re-compile the DLL and deploy it on the server.