Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Scala-JS-compatible zio-actors-api module #299

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

nightscape
Copy link
Contributor

I'm just trying to get a subset (a local-only version) of zio-actors to run in the browser.
I'm trying to change the API as little as possible, let's see how far that works.
Currently, I've extracted all the stuff that doesn't require a JVM (transitively via zio-config and zio-nio) into a new api directory that gets cross-compiled.
One open question is how to do serialization. Depending on whether one envisions ActorSystems between the browser and the JVM interacting, it would have to be a serialization library/format that works on both platforms.

I assume you have already considered this, so I'd be happy for any input.

@nightscape
Copy link
Contributor Author

The ActorsSpec now runs successfully in both JVM and JS 👍

@nightscape
Copy link
Contributor Author

@mtsokol I'm running into quite a bit of trouble in zio-actors-persistence because zio-config is embedded quite deeply in the process of constructing a Journal. Right now I'm trying to do a lot of Inversion of Control (passing stuff via constructor), but that changes the API quite a bit.
Do you happen to have a better idea?

@mtsokol
Copy link
Contributor

mtsokol commented Dec 11, 2020

@nightscape Hi! 🙂 Thanks for a mention, I can take a look later next week if you don't mind.
When it comes to Scala.js - I've never used it TBH and haven't thought about it during initial design, so I might not be the right person to ask for assessment (how to incorporate support for Scala.js in zio-actors). But still I can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants