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

Can you provide more convenient examples #108

Closed
burakakca opened this issue Feb 9, 2023 · 14 comments
Closed

Can you provide more convenient examples #108

burakakca opened this issue Feb 9, 2023 · 14 comments
Assignees

Comments

@burakakca
Copy link

I look the existing example in the repo but I didn't quite understand. Also Tutorial documentation It's okay but I want to run these tutorial examples. For example

@hnaderi hnaderi self-assigned this Feb 9, 2023
@hnaderi
Copy link
Owner

hnaderi commented Feb 9, 2023

I'll soon create an example project from tutorial, is that OK?
Are there any other thing that might help?

@burakakca
Copy link
Author

burakakca commented Feb 9, 2023

  • scalajs
  • more examples for eventsorcing and cqrs
  • I saw you in the zio documentations maybe you can add zio-edomata example

@hnaderi
Copy link
Owner

hnaderi commented Feb 9, 2023

I just created an example here https://github.com/hnaderi/edomata-example
Take a look and feel free to start a discussion if you had any problems.
About ZIO, I had created an example for ZIO docs, but I'm not sure if that's a repo or not, so I'll add them too, in few days maybe.

@burakakca
Copy link
Author

Thanks, I'm looking at the example, I would like to see examples of scaljs and zio. I especially want to see how I can use edomata in scalajs

@hnaderi
Copy link
Owner

hnaderi commented Feb 9, 2023

Edomata can be used in ScalaJS on the server side using the same exact code that runs on JVM (if you don't have other dependencies that prevent that).
To use it on the client side, you can use the same exact services (which is very handy for demonstration and/or dev usage, as you are running your server logic on browser). However, running a complete Edomata application on the browser (while possible and easy to do) is an uncommon or rather eccentric task IMO, as the main usage of such systems is on the server side.
Could you please elaborate on what do you mean by scalajs example? so I can add a few helpful examples.

@burakakca
Copy link
Author

It is nothing special just an example. Also, I try to migrate cats effect to ZIO but I didn't succeed. Can you share the ZIO example

@burakakca
Copy link
Author

How can I listen to the events that I run in Edomata. It comes as a date, but for example, how can I catch this notification and take action when the deposit is updated. Also is it possible for me to stream this on zio

@hnaderi
Copy link
Owner

hnaderi commented Feb 12, 2023

Listening to events is done using the storage backend,
see here for example https://github.com/hnaderi/edomata-example/blob/05609b7f54388dae89b9a925eea21b794db9fd39/core/src/main/scala/dev/hnaderi/example/Main.scala#L63

Also there is a helper named OutboxConsumer that lets you handle events as they come and run a side effect.

@hnaderi
Copy link
Owner

hnaderi commented Feb 12, 2023

On the ZIO example, I'll update in a few days;
Basically it is nothing but ZIO interop on this example, and all the features are supported as edomata doesn't care about the effect type is written in a tagless style.

@hnaderi
Copy link
Owner

hnaderi commented Feb 12, 2023

So, I just updated https://github.com/hnaderi/edomata-example
And it also includes ZIO.
please take a look and let's have a discussion if there are anything missing or needs more examples.
@burakakca

@BNationsDEV
Copy link

BNationsDEV commented Feb 13, 2023

Hi @hnaderi,
Thank you for your support! I think about integrating Edomata Event Sourcing model with a Bi-temporal Database like "XTDB". What do you think about it? There is no open-source FSM library that support bi-temporal sourcing and queries. Edomata could be best option to do this. Please help us with examples to develop Edomata with XTDB queries!!

@BNationsDEV
Copy link

@hnaderi
Copy link
Owner

hnaderi commented Feb 13, 2023

Hi @hnaderi, Thank you for your support! I think about integrating Edomata Event Sourcing model with a Bi-temporal Database like "XTDB". What do you think about it? There is no open-source FSM library that support bi-temporal sourcing and queries. Edomata could be best option to do this. Please help us with examples to develop Edomata with XTDB queries!!

Hi @BNationsDEV
Thank you for your interest in Edomata,
That would be interesting! we can have a discussion about it, I'll open a new issue to talk about it

@burakakca
Copy link
Author

So, I just updated https://github.com/hnaderi/edomata-example And it also includes ZIO. please take a look and let's have a discussion if there are anything missing or needs more examples. @burakakca

Thanks a lot.

@hnaderi hnaderi closed this as completed Feb 17, 2023
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

No branches or pull requests

3 participants