Impact of distributed localStorage usage


#1

Hello everybody,
I have a question related to the architecture of packages and best practices.

In my environment, I have several packages that share a common configuration. So far, this is achieved with a configuration package that exposes all the configurations in a service.

What I am thinking right now, is to use the atom localStorage in order to save all the most common pieces of configuration. This will allow me to get rid of an overly long configuration screen in atom and to save all the initial configurations in a file that can be shared among machines and users.

How does the atom developer community see the usage of localStorage for such purposes? Is there any best practice out there in order to store and share configurations?

Thank you very much!


#2

I’m a long-time node dev so I would use a normal file instead of localstorage. I store config in ~/.atom if it is global for all projects and in the project folder if specific to a project.

I’m not sure what using localStorage would buy you.


#3

Thank you for your opinion, I realize now I did not provide details enough.
Some of these configurations are used pretty often. Let’s say, I have one package that has to intercept all the events that were and will be dispatched. After every event, I have to check for a flag in the config file and see whether that’s true or false. Using a configuration file means reading from disk after every event is triggered! That does not sound so right to me, that’s why I decided to use the localStorage.


#4

I’m just playing devil’s advocate here, but why not keep an in-memory copy? I create memory structures that are 10’s of megabytes.