whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.2k stars 221 forks source link

Feature Request: Actor based model #385

Closed Bazmundi closed 2 years ago

Bazmundi commented 3 years ago

Given the resistance to CSP style channels for Lua-RTOS when suggested previously, mostly because it seems clunky semaphores and all the brittleness associated with that clumsy mechanism are preferred, then the question begs what offence can we muster for an Actor based idiom in Lua-RTOS.

Refer then to https://github.com/rlt3/Dialogue for a pThread based Actor model that might be a manageable port to Lua-RTOS. Understanding there is also a pure Lua attempt at Actors at https://github.com/xfguo/luactor.

Albeit both are stale. But interestingly, there was likely a point where real-time Lua tasks didn't make sense to people either. The luactor approach seems to rely on a reactor mechanism and so whether that might be a layer over the event mechanism in Lua-RTOS is an interesting question.

Yes, you can probably approximate with events but there may be utility in the higher order abstraction.

the0ne commented 2 years ago

This project is actively used a lot, but not so much actively pushed currently. That might be one of the reasons why there's not so much "pushing" into new features currently. But times might change. Feel free to provide a pull request so that you can give more insight into your proposal.