Git Product home page Git Product logo

Comments (15)

scott-wyatt avatar scott-wyatt commented on August 17, 2024 2

I'd like to chime in here. If this indeed being ported to TypeScript (💯 ), then browser support would be a really interesting effect and definitely eligible given the build targets. There's a high likelihood that some actors could even become isomorphic, which would give it an edge over node.js/redux apps. I'm also a huge fan of Actors acting as graph nodes for scenarios like GraphQL or even Gun.js between the client and servers. Is there a roadmap published somewhere for typescript? I might be able to help with that.

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024 2

Version 0.3.0 of Nact Core is now confirmed to work in the browser.

from nact.

attila-lin avatar attila-lin commented on August 17, 2024 1

Hi @attliaLin.

Bit of a longer project, but on the typescript branch of the project, removing dependencies on node and also converting the project to use ES modules. This should allow deno support, at least in theory.

Nice job!

from nact.

utnas avatar utnas commented on August 17, 2024

Can you explain why this issue has been closed ? @ncthbrt

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

Hi @nsewolo, I was using GitHub issues as a way to plan nact's roadmap. However I've been informed that using issues I'm this way (leaving something open for long periods of time) hurts npm rankings.

from nact.

pyrossh avatar pyrossh commented on August 17, 2024

I was thinking if the event sourcing/queries/aggregates part of nact be implemented on top of redux then the server and client can share the same reducer code. And when the client comes up it could establish a websocket connection and lazily load events/queries records it required. And now if an event is generated at the server which pertains to what the ui/client has subscribed to then it should receive those events and pass them through the same reducer/event processor.

This framework seems to have done it well. But it doesn't have persistance and es.
http://boardgame.io/

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

Hi @pyros2097
I think that'd be awesome.

I'm not too familiar with publishing libraries which can target the browser. There is really only one API right now that is not available in all browsers, setImmediate. setImmediate can be quite easily polyfilled however. My main concern is whether a library which usesmodule.exports can work in a browser context. Perhaps babel can do this? Not sure.

from nact.

pyrossh avatar pyrossh commented on August 17, 2024

Yes. Most node_modules, including some of the standard packages work using module bundlers like webpack, browserify. Webpack being the most widely used. What we would need to do is transpile the common code that could be shared between server and client so that when the module bundler requires it, it wouldn't need to transpile the code and then it would work seamlessly.
This has already been done by this es,cqrs framework with persistence and live syncing albeit its not completely free to use.
https://www.wolkenkit.io/
They also have a react integration.
Hmm.. time to think and experiment a bit. My current way of integrating it with the ui was to use graphql as an api layer at the backend and apollo store for the frontend.
But now thinking why use another layer like graphql/apollo where something like redux or an event sourcing engine for the frontend would be better and integrate very well with the backend.

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

@pyros2097 I've done something similar with websockets, redux and actors before using akka.net. Worked like a charm. Architecture was more or less as follows:

  • Authentication layer which identified the user by userId when the websocket connection is first opened
  • This connection was added to a set of connections linked to the user (we modeled this as an actor)
  • The connection set could be sent events pertaining to the user which would be broadcast to all the connections in the set.
  • If a message was received from a client, it was broadcast to subscribers of the user connection set.
  • On the client side, events received from the websocket connection were piped directly into the redux store

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

We could perhaps make the browser a target in the typescript port?

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

from nact.

scott-wyatt avatar scott-wyatt commented on August 17, 2024

@ncthbrt, it's definitely more of a nice to have then a need to have. On the other hand Typescript would have likely made onboarding a bit easier for me just from the intelisense alone (but we could just build a type definition). Then again, if "it ain't broke".

I'd much rather spend time getting some of the caveats working and then re-visit typescript.

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

As mentioned in the chat on discord, there are typescript bindings available, just to be clear.

The bulk of getting this feature working is more to do with the module system that typescript, though of course tsc could definitely help.

from nact.

attila-lin avatar attila-lin commented on August 17, 2024

I want to use it with deno while get error becasue of the node::crypto.

https://cdn.skypack.dev/error/node:crypto?from=nact:14:7

from nact.

ncthbrt avatar ncthbrt commented on August 17, 2024

Hi @attliaLin.

Bit of a longer project, but on the typescript branch of the project, removing dependencies on node and also converting the project to use ES modules. This should allow deno support, at least in theory.

from nact.

Related Issues (20)

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.