Git Product home page Git Product logo

Comments (5)

isoos avatar isoos commented on August 26, 2024

@gedw99: At this point I don't think that this library would be anything more than handling "remote" APIs calls through a simplified local API. I believe that it should be easy to build other functions on top of it, but it would be helpful for me if you could explain what you are looking for here, explaining a bit more in details.

from message_hub.

 avatar commented on August 26, 2024

Ok so he bigger picture is to build a type of cqrs setup using service workers and web workers.
Hopefully you know cqrs. If not there is already one for dart called Harvest that is very well done. Just Google for it.

So the web workers do off GUI thread process and communicate via message passing and so they are just like a microservice and talk to the main GUI thread by the message hub.

I am writing the web workers in golang and compile to Js or WASM. Each recieves event command from the message hub queue and does computation and updates it own indexdb database. The data is essentially an aggregation if a materialised view ( as a DB admin calls it) I will build various indexers in golang with it so you can do high quality indexing and hence queries.

So a query from the dart GUI thread is passed into the hub and is returned. These queries are described by graphql which is then able to query each data store inside the web worker.

Why built it this way ?
Offline first
Move the golang to server, flutter or web with no dependency other than the message passing.
No need for a Reflux or Reflux pattern in the dart code. The basic cqrs architecture replaces reflux and has the big advantage of working anywhere.

There is a dart package called "PWA" which also helps this.

You can catch me via Gmail using my GitHub user name if you want to discuss further.

from message_hub.

 avatar commented on August 26, 2024

https://pub.dartlang.org/packages/pwa

https://pub.dartlang.org/packages/harvest
A bit old but can get working with strong mode

from message_hub.

isoos avatar isoos commented on August 26, 2024

@gedw99: what would you expect from this library?

from message_hub.

 avatar commented on August 26, 2024

nothing. i am just shooting an idea of how to extend and use the library

from message_hub.

Related Issues (1)

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.