Coder Social home page Coder Social logo

What should the first interface be? about eva HOT 20 CLOSED

Procrat avatar Procrat commented on September 28, 2024
What should the first interface be?

from eva.

Comments (20)

TomNaessens avatar TomNaessens commented on September 28, 2024 1

Feels like overengineering a lot in my opinion. Peer to peer networks are hard to set up (the opening of ports only) unless the actual syncing is done using a file and something like Dropbox and even then, you'd still need the full scheduling power/code/core on each device you have.

Syncing with a central API server (single point of failure, how often is a website down anyways?) seems enough for the few offline moments I have. And even then, when I'm offline, I'm probably doing something where I have no need to schedule and/or add tasks.

I'm in favour of something that is easy to set up and is easily reachable. An API with a centrally hosted frontend (that could be packaged in an Electron/React-native/Cordova/... for those who really want an app).
The only downside I see with this approach is lack of notification support, which can be remediated by adding calendar-integration.

As Eva is open-source, people who actually want to run it on their own hardware can do so.

From a development point of view, an API + frontend is by far the easiest and quickest to get a POC up and running (short time to market) and available for everyone (least amount of investment for users).

from eva.

Procrat avatar Procrat commented on September 28, 2024 1

I have a minimal example running in this new eva-web repo with a demo here. It feels really nice to have all the benefits that were mentioned and almost no downsides! 😄

Thanks for the fruitful discussion everyone! I might not have thought about it this much what all your help!

from eva.

iasoon avatar iasoon commented on September 28, 2024

I'd go for a web interface! Web interfaces are the catch-all clause; they work everywhere. They are easy to create and use, are familiar, have a great on-boarding experience (no need to install anything) and in this modern day and age you can even make them available offline through something like electron (I'd guess alternatives for mobile exist as well).
If you want a 'proof of concept' UI that works sufficiently well and inspires people to write their own alternative interface, I think this is the way to go.

I think GUIs are great for overviews and managing, but for actual in-the-moment usage (entering tasks, marking them as complete, ...) I'd probably prefer an interface that keeps out of the way, like a CLI. A cool way to implement this for not-so technical people (and even for technical people) is having a chat bot on your favourite communication app. I feel the model of a normal conversation is the way I would actually like to interact with Eva, so I especially like this idea. It would probably be my preferred interface when I'm on mobile, as I don't want to review or organise when on the go, but just enter or fetch data quickly.

from eva.

wschella avatar wschella commented on September 28, 2024

If the goal is (ultimately) to create a cross platform (Linux, Windows, Smartphones, ...) application, that actively syncs between platforms, there's only one viable option that doesn't implicate a tremendous amount of duplicate work (Am I right in assuming this is the goal? ). The Web of course. At least a lot of technologies commonly associated with the web, a la HTML, CSS, JS. You immediately have a basic cross platform interface that is able to sync easily (assuming there is some server running somewhere).

To solve the problem of offline usage, you would need clients for every platform (Qt + React Native would cover most), but the problem would still not be trivial. What if the application is closed before the sync happens? Do you deamonize? Those are just the same questions, with a little more flexibility.

Another strong point for a web interface, you could run most of the same code locally on a headless browser, (something like Electron), if there is a need.

+ You force yourself to immediately separate concerns (API vs Visuals).

Edit: @iasoon sniped me

from eva.

ninewise avatar ninewise commented on September 28, 2024

What you guys seem to have forgotten, but I think would be the best interface, is a web GUI with a server on (e.g.) your own device. You get most advantages of a web GUI (familiarity, cross-platform graphical toolkit) and a local application (offline usage).

It also opens choices for the user: you might want to run Eva on a server somewhere. You lose offline usage, but you enable using a mobile site on your smartphone.

Furthermore, this would force Eva to have an awesome API and a lovely split architecture. This would also help me to write my own calendar stuff, because it's the architecture I'd use and this would allow to have a single interface for both backends 😸

from eva.

iasoon avatar iasoon commented on September 28, 2024

I think I disagree, @NoctuaNivalis . Running a server on your own is inferior to running an electron UI (since you don't have direct file system access, for example), and when you run it on a server you don't have offline access.

I think it is more useful to let the eva backend sync with other instances (such as your other computer, your phone, your server).

from eva.

wschella avatar wschella commented on September 28, 2024

@iasoon you still need a server running somewhere right? It doesn't have to be on your own device. Or would you have each client ( read platform application) also function as a server themselves and sync with the other clients? Cause to me that looks like a bitch to implement.

In the case that it doesn't, so we have a an API only server, it can run locally or not. As I assume it are only the more technical users that would set up an own server like @NoctuaNivalis proposed, they could, as I imagine this could will remain open source.

from eva.

iasoon avatar iasoon commented on September 28, 2024

@wschella As soon as you want offline funcitonality, you need the full eva core (unless you just want to add or view tasks, and not actually use eva). If you want both this and syncing, you need a distributed architecture, you can't really get around that.
Implementation is some additional work, yes, but it's the only 'real' solution.

from eva.

tivervac avatar tivervac commented on September 28, 2024

Can't we just mix both? A server can happily be a part of the distributed net.
I would like to have as good a sync as possible with as little as possible single points of failure. A distributed network that has a 99% uptime (even less would work I guess) seems like a good fit for that. Wouldn't this mean that the eva-core, doing the scheduling and stuff, would have to be implemented in something entirely cross-platform?

from eva.

ninewise avatar ninewise commented on September 28, 2024

As Eva is open-source, people who actually want to run it on their own hardware can do so.

You'd have procrat provide a server on his (hired) hardware?

By having each user deploy their own API-server on their (hired) hardware, you can avoid all user-management.

from eva.

iasoon avatar iasoon commented on September 28, 2024

@silox a distributed architecture does not imply peer-to-peer networking. Git is distributed as well, and probably a much better fit for this domain. As @tivervac notes, you can very well have an 'authoritative server', kind of like how we use github.

To clarify: I'm not saying this is what should be implemented, I'm just saying that if you want to schedule tasks offline and sync them, this is what you need.

For a simple first interface, I am very much in favour of the solution @NoctuaNivalis proposes: a simple locally-hosted web server.

from eva.

TomNaessens avatar TomNaessens commented on September 28, 2024

By having each user deploy their own API-server on their (hired) hardware, you can avoid all user-management.

You'll probably need a form of authentication when deploying your own API too. It will need to be available publicly if you (for example) want to sync your phone and you don't want anyone else to be able to query your tasks.

There are of course easier ways without actual users (a secret key would be enough), but eventually, if wanted in the far future, it would be an option to offer the service as a website alongside a self-hostable solution.

from eva.

iasoon avatar iasoon commented on September 28, 2024

I'd forget about the users. Supporting multiple users requires significant effort, and I would prefer this effort to go into awesome functionality.

from eva.

rien avatar rien commented on September 28, 2024

I think Eva needs to have two interfaces: one with the user and one with persistent data.

User Interface

This needs to be as cross-platform as possible, while remaining flexible and open enough to slap something very OS specific on it. So I suggest the following flow:
Web client <- Web API -> Web server <- Rust API -> Eva
This could all be packaged in one application, if needed. But parts can be interchangeable (if @NoctuaNivalis wants to write his calendar thing he could use the Rust API if he plans to run his program on the same machine Eva is running, or he could let his program speak to the Web API if they have to run on different machines).

An example of the 'default' configuration could be a React app, talking to a Rust server running in a Docker container built on top of Eva. This could all run locally, or you could use a VM to host the server if you like.

Data Interface

This is something I talked about earlier. Now, Eva uses a SQLite database, but how I imagined it to work was on a file system. This has the benefit that git can be used to decentralize storage, but keeping a central syncing point. I very readable format would be nice to have, so our simplest user interface (for inserting data) could be your favorite text editor.

from eva.

Procrat avatar Procrat commented on September 28, 2024

Thank you all for your valuable inputs! If I try to distil the main ideas of what has been discussed so far, I notice that you all really like web technologies and you're in favour of either

  1. a local server serving Eva's core wrapped in HTTP API and a front-end, accessible from a browser or SSB, (optionally) backed by a remote server to do syncing; or
  2. a remote server serving Eva's core wrapped in HTTP API and a front-end, accessible from a browser or SSB.

These seem both like very valid options for different reasons.

  1. With a local server, offline usage is always available and the reactivity is not dependent on your wifi signal strength.
  2. A remote server is the easiest to set up and get running very quickly for us, it has no quirks for distribution and is presumably more accessible because it doesn't require downloading things.

For these reasons, I would hope that at some point, both options would be available. However, I currently see no way of getting to that point without a bunch of duplication or hacks. One of the main reasons being that in the first case authentication is needed for syncing, but you explicitly don't want authentication for interacting with Eva, whereas in the second case authentication is needed for interacting with Eva and no syncing is needed. If anyone has ideas on how to make both options compatible, I'd love to hear it!

It seems like a reasonable roadmap to start out with option 2 but keeping these future possibilities in mind and ensuring that the storage/sync backend is nicely separated, potentially already going as far as to run it as a separate daemon on the server.

(Thanks for your reaction, @R13N; I just noticed that I forgot to tag you the first time around.)

from eva.

iasoon avatar iasoon commented on September 28, 2024

@Procrat I don't really follow your conclusion. If you don't implement user management in Eva core - which sounds like a needless complication to me - you can't really offer a hosted solution, so the user will have to host himself anyways, thus downloading and setting up things.
Unless you do want to implement separate users?

from eva.

rien avatar rien commented on September 28, 2024

from eva.

iasoon avatar iasoon commented on September 28, 2024

@R13N The logic should be made aware of multiple users, and every thing in existence should be scoped under their user.

from eva.

rien avatar rien commented on September 28, 2024

from eva.

Procrat avatar Procrat commented on September 28, 2024

I had some ideas along the lines of what @R13N is saying indeed. I agree that the core of Eva shouldn't be concerned with user management. It does make things a tad bit harder though.

Lately, I have been reading up on the interop between Rust and JavaScript by compiling it to asm.js. This is a quite recent thing and hasn't reached a very ergonomic state yet, but it works! I played around a bit with it, as you can see here. Having Eva's core run on the client is very interesting from an architectural point of view. The client can deal with the storage so our remote entity doesn't have to. And we get offline usage and bandwidth independence for free!

Implementing this with client-side storage also means that we'll move towards having a pluggable data interface like @R13N suggested. Despite the unergonomic-ness, I strongly feel like this is the right way forward.

@iasoon: If you feel like I missed something in my conclusion, feel free to add to it or propose something different.

from eva.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.