codingteam / loglist

Reincarnation of the famous service
https://loglist.xyz/
MIT License
7 stars 4 forks source link

Autofill submit form via GET parameter #100

Open rexim opened 9 years ago

rexim commented 9 years ago

It should work like this:

This feature can be useful for https://github.com/codingteam/horta-hell/issues/306

ForNeVeR commented 9 years ago

I can propose a more robust solution to the mentioned problem:

Staging area quotes may be automatically cleaned up after a while - e.g. weekly.

rexim commented 9 years ago

@ForNeVeR that's a good idea!

rexim commented 9 years ago

@ForNeVeR I suggest to make a staging area as an in-memory map (id -> text) that has a limited size and deletes old entries on an insert operation. We don't need to persist this information and such approach doesn't require to clean up anything weekly.

ForNeVeR commented 9 years ago

I wouldn't say that such in-memory storage is widely accepted solution in web today. For example, if Heroku wants to stop our application (as it always do) - all staging data will be lost. Are you really sure we want exactly this? Are you really sure you are mixer?

rexim commented 9 years ago

@ForNeVeR the data in the stage area is needed only for 1-2 minutes. Or even less. Then it can be easily thrown away.

Heroku stops our application when nobody uses it for a while (this time period is definitely greater than 1-2 minutes, we can check the official documentation if you want). In case the application is stopped, staging the data by a POST request will trigger heroku to start it up. And then everything should work as expected.

ForNeVeR commented 9 years ago

Well, if you want then let's try to implement your proposal.

rexim commented 9 years ago

On the other hand, in-memory approach with size-limited map is not that scalable... I mean at some amount of active REST users the staging area will be wiping very fast. I'll think about it. :)

rexim commented 9 years ago

After a little conversation in our jabber conference we decided to use the database solution.