roboconf / roboconf-platform

The core modules and the platform
Apache License 2.0
35 stars 11 forks source link

How does the DM work in multi-user environment? #661

Open vincent-zurczak opened 8 years ago

vincent-zurczak commented 8 years ago

We should verify the behavior of the DM when several users try to perform the same actions. :fearful: :tada:

Those that are critical and not clear at the moment are:

In case of potential conflict, we may integrate a prevention mechanism with the permissions management.

vincent-zurczak commented 8 years ago

We may also redesign partially the DM. In the same way there is a worker thread for the messaging, there could be one for the DM's REST API. REST requests would be processed sequentially, which would guarantee coherence. We may even have one processor for non-critical actions (such as reading).

Or we could use locks in the REST API. But we should verify clients run in their own thread. Otherwise, locks are useless. Locks would be more simple. We would only have to secure the REST services.

vincent-zurczak commented 8 years ago

Or we can just use locks or synchronized blocks in the REST API. We really need to verify the multi-threading apsect in the REST services. Are there many instances of our REST resources at once?

vincent-zurczak commented 8 years ago

Or we can make more simple... Use synchronized blocks where necessary in the DM. Since we handle an internal cache, these blocks should not have a major impact on the manager's performances.

vincent-zurczak commented 8 years ago

... are solved. Jobs have generated IDs. Even if two jobs have the same parameters, they will never collide.