Eve icon indicating copy to clipboard operation
Eve copied to clipboard

Implement persistent database

Open thSoft opened this issue 8 years ago • 6 comments

It would be great if there was a persistent database that keeps its state between sessions.

thSoft avatar Mar 14 '17 10:03 thSoft

I'm new here, but I wonder if that's what @session is? It's docs are...sparse: http://docs.witheve.com/handbook/session/.

alexispurslane avatar Mar 16 '17 03:03 alexispurslane

@christopherdumas

@session (like all Eve databases right now) is ephemeral, and will clear on a refresh of the browser or a restart of the Eve server.

In the runtime-refactor branch, we've departed with the idea of multiple databases, and instead we have a single database with namespacing conventions, so you can't put records and facts in different places and lose track of them. One of the most common bugs I encounter when writing programs is forgetting to reference the database in which the record I'm searching for resides.\

@thSoft

Thank you for the suggestion! As I alluded to in the response above, the runtime is undergoing a refactor, and we will be adding this feature to the runtime-refactor branch, which will eventually be merged into master. I'll keep this issue open to track the issue, and close it when it's ready.

cmontella avatar Mar 16 '17 16:03 cmontella

@cmontella Great, I totally agree (see e.g. #537 :)).

thSoft avatar Mar 16 '17 16:03 thSoft

@cmontella That runtime refactor sounds sad, at least to me. It's your language, and I haven't done much in Eve yet so I don't know how much it hurts, but having multiple databases was one of the things I really liked about Eve's database paradigm. I'll just have to wait and see what the new setup looks like, I guess.

alexispurslane avatar Mar 17 '17 17:03 alexispurslane

@christopherdumas

Multiple databases did seem like a good idea, which is why we went that way in the first place. But in practice, it just lead to more confusion than it was worth.

The problem solved by multiple databases was that of scoping/namespacing. It also allowed a degree of organization. We'd like to still preserve these properties of the language. But it introduced a problem of having to think about the location of records, in addition to their shape.

So let me ask you this: what specifically draws you to the idea of multiple databases? What do you think it will help you accomplish or make easier? I'm definitely interested in hearing your thoughts.

cmontella avatar Mar 17 '17 18:03 cmontella

I'd like to answer all those questions, but this is getting off-topic for this issue, so I'm creating a new issue for this. See: #800

alexispurslane avatar Mar 17 '17 19:03 alexispurslane