The initialization procedure of projection server may not working with rails plugins
I have a User model with Devise enabled. It can be loaded properly by rails server but not by the projectionserver. I found the initializer of Devise must be run before the User model is required. It seems that projection server is not running any initializers in the config folder. I could not find a way to get around this yet.
Your observation is correct. The projection server will not perform any initializers.
I have never tried to get something like Devise to run. But my approach would be to use it only on the Rails servers with the command "models". On the projection side everything is done already and should be part of the events.
Projection server and Rails server share the same model definitions and database. Did you suggest I need to decouple the User model with the other models and only load those models in projectionserver? But that will introduce additional overhead of keeping models separated.
My understanding is that the projection server is the "daemon" side of rails server, it realize the business logic part. They share the same resources, which brings the simplicity of this framework.
I cannot give you any advice, I simply have never tried it. I wish you good luck and I am keen to get to know whether you get it to work or not.
If you have to run some initializers in the projection server try it.