hbel / ts-actors

Minimal, Akka-styled actor system for TypeScript
MIT License
9 stars 2 forks source link

Progress / Production? #12

Open mikecann opened 2 years ago

mikecann commented 2 years ago

Hey, are you still making progress on this?

Im very interested in the actor model for Typescript / JS..

Did you ever try it in production?

justin0mcateer commented 1 year ago

I was wondering if there is interest or perhaps a design for implementing with Web Workers. I could be interested in helping with that.

SuheylZ commented 8 months ago

This is a very interesting implementation. however considering the fact that nodejs doesn't allow multiprocessing, there is less use of using this model in nodejs environment, perhaps mixing it with NodeJS clustering, could be more beneficial where parent can spawn child processes. this is the only way I could think of achieving multiprocessing. But the caveat is that using that you would have to resort to Javascript and leave typescript as node only recognize JS files.

hbel commented 7 months ago

@mikecann Hi there, although this is was just some kind of technical prototype, I already used the library in larger projects without any problems (including the distributed actor models). I still would suggest to test everything thoroughly though, especially if you use the distributed actor systems.

@justin0mcateer you are welcome to contribute. I already used the websocket-based distributed actor system to build a system spanning front- end backend, but only with treating the browser-based actors as some kind of state management on steroids. :) - Using a separate web worker sounds like an interesting idea.

@SuheylZ the distributed actor system works well with worker_threads, if you have some heavy lifting to do. In addition, message handling is completely promise-based, so individual actors can perform async IO, too.