Progress bar and Storage Mechanism

Progress bar

I started this week with implementing a progress bar on the code editor component to indicate the status of a background process. I always thought that progress bars were cool, especially the one used by YouTube. Luckily for me i did not have to built one from scratch. NProgress bar has it all sorted out for me. Being a leech, all i had to do was include the script and use it. On top of basic usage, such as NProgress.start() and NProgress.done(), a trickle speed configuration is also possible.

Storage mechanism

Now that the storage mechanism is almost complete, I think it is worth to mention the overall flow of it.

  1. Project creation
    A default project will be created both in the cloud and cache.
  2. Opening the project
    The project is searched in the cache. If not found, a download request will be sent to cloud storage. Consequently, the project will be sent over to the code editor.
  3. Update mechanism
    There are few events that will trigger an update to the storage backend, which will not be discussed here. The updated project will be sent back to the storage backend and stored in the cache.
  4. Cloud syncing
    To reduce on the cloud request, project will not be uploaded for every minor change.

You may also like...

Leave a Reply