eclipse-emfcloud / emfcloud-modelserver

Modelserver component
Other
43 stars 21 forks source link

The ModelServer is not thread-safe #135

Closed CamilleLetavernier closed 2 years ago

CamilleLetavernier commented 3 years ago

When executing quick actions, the model server often throws unexpected exceptions, mostly in EMF APIs (For example, IndexOutOfBounds when serializing EMF-to-JSon, or when iterating over an EMF List, ...). These errors often indicate concurrent access to the model from different threads, which is not supported by EMF out of the box.

When integrating with GLSP, the issue becomes worse, as ModelServer-GLSP may also handle model updates and replies from the Model Server in the wrong thread. This causes a lot of instabilities, from which it is often not possible to recover (The only solution with a corrupt EMF Model is to restart the application/server)