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

MTL style behaviour algebra #50

Merged
merged 40 commits into from
Oct 31, 2018
Merged

MTL style behaviour algebra #50

merged 40 commits into from
Oct 31, 2018

Conversation

notxcain
Copy link
Owner

No description provided.

@notxcain notxcain mentioned this pull request Oct 30, 2018
build.sbt Outdated
lazy val akkaHttpVersion = "10.0.11"
lazy val akkaHttpJsonVersion = "1.19.0"
lazy val circeVersion = "0.9.3"
lazy val http4sVersion = "0.20.0-M4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 the latest I can find is 0.20.0-M1

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I might have looked at v0.19.0-M4, too much coffee yesterday.

@notxcain notxcain mentioned this pull request Oct 31, 2018
@notxcain notxcain merged commit 30a5858 into master Oct 31, 2018
@notxcain notxcain deleted the mtl-style branch October 31, 2018 14:25
@SemanticBeeng
Copy link

SemanticBeeng commented Oct 31, 2018

@notxcain would this compile to scalajs to the extent necessary to call from an ajax client application?
context higherkindness/mu-scala#16

"mu, it brings the ability to combine RPC protocols, services, and clients in your Freestyle program, thanks to gRPC."

Would you agree to add a scalajs module for cross-build?

@notxcain
Copy link
Owner Author

notxcain commented Nov 1, 2018

@SemanticBeeng I'm not sure that all modules are Scala.js compatible. Never used it. What module do you need?

@SemanticBeeng
Copy link

SemanticBeeng commented Nov 1, 2018

Hmm... some familiarity is required to understand but think is very important in order make aecor usable on the "client side" of ajax apps.

Would you be willing to develop some familiarity while I come up with a better explanation and examples?
https://www.scala-js.org/doc/project/cross-build.html
https://github.com/scala-js/scalajs-cross-compile-example

Roughly speaking everything could cross-compile except the akka specific stuff.
Plainly speaking scalajs cannot compile things that have equivalent in the browser like akka, spark,

In previous interactions I gave links to how frees-io does it : http://frees.io/docs/
Will improve this answer.

@notxcain
Copy link
Owner Author

notxcain commented Nov 1, 2018

What are the use cases that you see for Aecor on the client side?

@SemanticBeeng
Copy link

SemanticBeeng commented Nov 1, 2018

To implement immutable domain models and event sourced apis that can run on the client and then have effects (especially state mutations) replayed / interpreted on the server when the remove calls are eventually made.

See https://tech.zilverline.com/2011/02/10/towards-an-immutable-domain-model-monads-part-5 for examples.

I have used this design to implement complex domain models with complex business rules without having to keep track of mutations on the client. Now applying same with aecor seems the perfect evolution.

All this could be cross compile except boopickleWireProtocol which a server-side remoting aspect only. https://github.com/SemanticBeeng/aecor/blob/1791d3de0ddf83f67c1a3cd5371aaf0c14714e45/modules/tests/src/main/scala/aecor/tests/e2e/Counter.scala#L11-L55

Also, monix, circe, cats, cats-mtl, etc cross-compile already.

@notxcain
Copy link
Owner Author

notxcain commented Nov 6, 2018

@SemanticBeeng I see. BTW WireProtocol could also be used for client server RPC-like interaction. As for Scala.js support. I'm not sure that I'll have a free time in the near future. So PR is welcome.

@SemanticBeeng
Copy link

SemanticBeeng commented Nov 6, 2018

Agreed about WireProtocol.
So am I correct to infer that you agree aecor based algebras, events, etc could be used on "the client" - you cannot see issues in principle, right?

@notxcain notxcain mentioned this pull request Nov 8, 2018
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.

3 participants