Replies: 2 comments 16 replies
-
Basically, you just need to understand the actor model itself. Its a bit different way of thinking :) To work with DB, you do not need to use meta-process. It was created to work with things that require keeping read/write handler running (TCP socket, for example) while the actor handles messages sequentially. Think of your program design as a nano-service architecture in which actors are services that communicate to each other by message passing. |
Beta Was this translation helpful? Give feedback.
-
As the original poster mentioned, I also want to understand actor-based solutions for databases like MongoDB or Redis. Should operations on the database be handled like other actors using Call or Send for synchronous or asynchronous data retrieval, or is it better to use global functions in the traditional Go way? |
Beta Was this translation helpful? Give feedback.
-
The Ergo model is very interesting to me, and I would like to try building some stuff in it. But as someone who's completely unfamiliar with the methodology, it's really unclear how exactly certain things are supposed to work within this model. Stuff like database access (do I want to have a pool that sits in front of a meta-process? wait, I need a regular process to run the meta process, and how do I handle errors? Do I need to have a result type?), or API access (am I supposed to have a meta-process for the connection and then call into it?). Point is, I don't think these are going to be the only questions I run into, it took me a few hours to grok how stuff is supposed to get composed together, and I still have yet to figure out how to actually build stuff in this (and I'm pretty sure I'm not stupid).
Basically, this is a long-winded way of saying that having an example application(s) that has some degree of complexity would make it a lot easier for me (and I imagine a lot of other people) to learn the patterns here (which seem to be somewhat different from traditional Go).
Beta Was this translation helpful? Give feedback.
All reactions