EnTT as a core for REST server? #1122
Replies: 1 comment
-
Hi there, All identifiers contain the entity and the version (or generation). The latter is incremented when an entity is destroyed. This is usually how entity's life time is managed with this kind of tools. No reference counting at all. When you have an identifier, the version tells you if it's still valid even if the entity was recycled in the meantime. As for the parallelism, EnTT doesn't provide a built-in method because it's not required actually nor it tries to take over your loop. You can have both inner and outer parallelism easily with it though. Consider that all storage are separated. Therefore, as long as you don't have threads that operate on the same type at the same time, you're done. |
Beta Was this translation helpful? Give feedback.
-
Hi. We have a large project that implements a RESTful API. It has a lot of legacy code and I think could benefit a lot from using a registry with an API like yours. I am interested in ways to implement concurrent CRUD operations for the entities and reference counting (or other means to track and manage Entity's lifetime cycle).
I am aware that the library doesn't provide built-in methods for concurrency, although I am sure that there might have been attempts to use EnTT for stuff like that. Do you know of any? Or maybe an advice for a direction to approach this problems.
Generally, I am considering using ASIO for events and networking and EnTT for in-memory storage (and maybe for saving persistent data instead of using Sqlite/using as an adapter).
Beta Was this translation helpful? Give feedback.
All reactions