I
I
iluxa18102016-02-05 01:26:23
Database
iluxa1810, 2016-02-05 01:26:23

How to properly design a service?

The task is to make a client to MS SQL database that communicates with the service on the server. The service itself responds to user requests and provides the necessary data from MS SQL Server. In addition to the fact that the service responds to client requests, the service must perform some actions with the database in the background (These are not actions at the request of the user).
Tell me, can this be done within the framework of one service or not?
I read that there are WCF services that just fit the first item of the task (Communication with the client), but I did not find information on whether they can do anything else in the background.
I have never worked with services before and would appreciate links to resources and articles.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2016-02-05
@Nipheris

First, you need to VERY CLEARLY understand the fundamental difference between the terms "WCF service" and "windows service", because little in common between them. The first is about web services, the second is the same as demons in * nix systems. The first is about the architecture of a distributed system, the second is about the life cycle of the program (how, when and by whom it starts / stops).
Therefore:
1) if the development is for Windu, and
then read about Windows Service - such ones are written relatively simply on Sharpe. This is not the only way to start a process that will spin around and do something in the database itself, but it is preferable.
2) if interaction with the client is not implied by a home-made protocol, but, for example, by HTTP, then you urgently need to familiarize yourself with what web services / web APIs are and what they are. If you already understand what it is, then you need to choose a way to implement it under Dotnet.
If the service is understood as a Windows service, then you can. Is it worth it - another question, it depends on the actions that you want to perform in the background, the database architecture and the policy of working with it.

X
xmoonlight, 2016-02-05
@xmoonlight

services (services) for that and services to serve)
of course everything in one "bottle" can be done.
a service is the same process, only controlled by the OS according to the flags in the registry.
https://msdn.microsoft.com/en-us/library/zt39148a%...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question