سؤال

I need to build an "execution engine" that will listen to requests from variety of systems and will perform those requested tasks.
I want to expose in the "execution engine" a web-service and each system can go to this web-service, ask for some operation to be done. all operation will be saved in the disk to handle failures (all tasks are async)

for example, add_email_to_block_list, one of our websites can ask the "execution engine" to perform this task in the mailing system.

the "execution engine" suppose to handle more than 100 requests in a minute (in the future).

Most likely I will have to use C# for this kind of task. (also a chance for JAVA).

  1. What do I need to take into consideration when designing this kind of core engine?
  2. Do you know some kind of a use-case over the WEB about this kind of system?(some article/tutorial maybe?)
  3. What is the professional name for this "Execution Engine" that I am talking about (so i can search better in google)?

Thanks

هل كانت مفيدة؟

المحلول

You are describing a classic Remote Procedure Call interface. Usually, the primary consideration for designing a web service for RPC is scalability. In order not to handle too much data while blocking the system from receiving other requests, it is usually best to offload the data to other job threads. However, you should not create a one-thread-per-request system except as tiny toy systems, because that can be a major system resource hog. Instead, you should look at using some kind of Thread Pool to handle the incoming tasks.

This kind of system is used all over the place, and really is the primary use of web services. Just look at any description of Web Services as RPC for more details.

نصائح أخرى

Minimize the use of global data and protect accesses to them with critical sections (or mutexes, semaphores or whatever). The same is true for external resources like files etc. Then create a new thread (a new process could be even better in some cases if your server is Unix based) for each incoming request and you should be fine.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top