Automatic reading routine between 2 C#databases

Asked

Viewed 308 times

4

I need to create a C# routine that reads 2 databases and feeds the reading data into another database. The development part of the system itself I can do without problems, but I don’t know what kind of project to develop. This routine will be run weekly and it should be published/allocated on a server.

My question is: "What is the correct way to develop such a routine? Would be the creation of an executable that would be triggered by windows? Or create a service?"

1 answer

5


The answer depends on the type of hosting your app might have.

If you’re staying somewhere that gives you accommodation web shared (Shared web hosting), you are limited to ASP.NET. In this case you would make a web application with a call point (i.e.: a web service), and on the outside you’d need a cron job (a service that accesses a page or web service at specified times).

If you can launch an executable or server service (which can be your personal machine, or a company machine), then those are the pros and cons for each model:

  • App: you can use the Scheduler, as you said, to call your app. Scheduler plays the role of cron job. The main disadvantage is security... Any person with access and malicious can replace its executable by another Assembly malicious.

  • Service: you can write the routine of own routine activation, and the service is itself cron job. If the service fails, it can restart automatically. It is much harder to replace your service with something malicious and the authentication/account settings it will use are much easier. The only important disadvantage is that it is a little bit, but just a little, more complex than an executable application. Ah, and you need to be the machine administrator to get it running, but I think in your case this shouldn’t be a problem.

I would personally take the job.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.