Hi Tal,

More than the database used, I was referring on how the model storage is being 
initialized and exposed.
The sqlalchemy has by its own a sessionfactory and a scopesession to have 
sessions being exposed as thread local. 
But With ARIA I feel this is not properly utilized as it is initialized the 
ModelStorage only once. 

Please find the below code snippet from env.py where the model storage is 
initialized.
    @property
    def model_storage(self):
        if not self._model_storage:
            self._model_storage = self._init_sqlite_model_storage()
        return self._model_storage


Regards,
DJ
-----Original Message-----
From: Tal Liron [mailto:[email protected]] 
Sent: Friday, December 29, 2017 11:41 AM
To: [email protected]; Maxim Orlov <[email protected]>
Subject: Re: Database session management with model storage.

The default storage, SQLite, has certain concurrency limitations, but if you 
use a more robust server (MySQL, Postresql) there should be no issues.

Maxim, any thoughts?

On Fri, Dec 29, 2017 at 12:01 AM, D Jayachandran < [email protected]> 
wrote:

> Hi,
>
> We have built a REST Interface on top of ARIA. With the current 
> implementation of ARIA, the "model storage" is seen as a singleton 
> class, thereby the database session is also restricted to a single session.
> By exposing ARIA over REST, In a multithreaded scenario we are ending 
> up in having the same database session over multiple threads. This 
> will bring about issues during various db related actions across multiple 
> requests.
>
> ARIA being a CLI at this moment will not have any issues with this 
> approach but to be used and exposed over other interfaces it will be a 
> challenge.
> Please let us know if the session management can be handled properly 
> with the model storage ? Do you already have any plans to work on this 
> item or kindly provide your feedback on this issue.
>
>
> Regards,
> DJ
>

Reply via email to