Comments (6)
Not discussing the - still ugly - fix of using async_lock to use logger in the second thread, I think it should not be that hard to include a simple asynchronous HTTP(S) client into the current framework of asyncore and AsyncLibrary. I am going to investigate on the problem.
I also wanted to use this thread also to remember that the two actions of assigning a score and to send it to the RWSs are quite different in nature and probably should be split into two different services.
from cms.
Not discussing the - still ugly - fix of using async_lock to use logger in the second thread, I think it should not be that hard to include a simple asynchronous HTTP(S) client into the current framework of asyncore and AsyncLibrary. I am going to investigate on the problem.
I'm against it. Firstly because you used "simple" and "HTTP" in the same sentence, secondly because I don't like giving too much weight to AsyncLibrary (in terms of things that rely on it).
I also wanted to use this thread also to remember that the two actions of assigning a score and to send it to the RWSs are quite different in nature and probably should be split into two different services.
Splitting the services seems a good idea. In this way the new service could use logger again, since there would be no risk of simultaneous access from different threads.
from cms.
I'm against it. Firstly because you used "simple" and "HTTP" in the same sentence, secondly because I don't like giving too much weight to AsyncLibrary (in terms of things that rely on it).
Simple because we already have the infrastructure to send things asynchronously on a socket, the only thing that changes is the format of the messages you send on that socket.
Splitting the services seems a good idea. In this way the new service could use logger again, since there would be no risk of simultaneous access from different threads.
If you use a synchronous HTTP library the problem remains: you need one thread per RWS to handle things well, and you can't use the logger anyway with multiple threads.
from cms.
I can come up with two solutions:
- One is to pass the message to be logged to the main thread (the one entitled to deal with async), which takes care of sending it to LogServer.
- The other is to directly instantiate a socket, without going through async, and use it to communicate with LogServer.
Both solutions are quite horrible, but among them I really prefer the first one. Since I hope this problem to be solved at a deeper level, I think we can tolerate it until we have more clear ideas about what to do with async.
Any objections?
from cms.
I'm okay with the first option.
from cms.
There is also the async_lock we used in the Worker. Otherwise, option 1 is better of course.
from cms.
Related Issues (20)
- Option to stop evaluation of a subtask on first 0 score.
- Cannot evaluate communication tasks with at least 10 user processes HOT 2
- Documentations
- Deterministic assignment of sandbox IDs
- IntegrityError when compiling the same code twice in parallel HOT 3
- CMSEvaluationService gets overloaded with too many workers
- CMSEvaluationService gets overloaded with too many workers HOT 3
- Testimonial update request HOT 1
- Implementation for alternative sandboxes? HOT 1
- How can I run cmsContestWebServer in background? HOT 1
- html comments are ignored on condition HOT 2
- DumpExporter fills up RAM
- CI feature: integrate pull request preview environments
- HELP: Get last submission timing HOT 1
- Backdoor is not working due to changes in gevent
- Avoid bind-mounting temporary dirs within sandbox HOT 2
- Add support for C# compiled by .NET SDK HOT 2
- sudo cmsAdminWebServer HOT 1
- cmsAdminWebServer HOT 1
- Switch to Isolate v2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cms.