Using the embedded database (SQLite / SQL Compact) to send messages in an application?

Just out of curiosity, for applications that have a fairly complex module tree, is something like sqlite / sql compact edition good for messaging?

So, if I have modules containing data such as:

\ SubsystemA \ SubSubSysB \ ModuleB \ ModuleDataC, \ SubSystemB \ SubSubSystemC \ ModuleA \ ModuleDataX

Using traditional message passing / routing, you need to go through the intermediate modules in order to pass the ModuleB message to say say ModuleDataC.

Instead, if we just store "\ SubsystemA \ SubSubSysB \ ModuleB \ ModuleDataC" in the sqlite database, retrieving this data is as simple as a sql query, and does not need to route and transfer stuff around.

Has anyone done this before? Even if you did not, do you anticipate any problems and performance impacts? The only concern I have right now is passing custom types, for example. if ModuleDataC is a custom data structure or pointer, I need to somehow save the data structure in the database or save the pointer in the database.

Thank,

Jw

EDIT

One use case that I didnโ€™t think about is when you want to send a ModuleA message to ModuleB to force ModuleB to do something, and not just get / set the data. Can this be done using the built-in database? I believe that a callback from the database is needed, as far as possible?

+3
source share
2

, Tuple Spaces, , "" .

, , , .

"", , -, , , , , -, Gedanken .

, sqlite . SQL-, , , /, , , .

+3

, , , , , , . , , . , , , ... , . ,

  • DB?
  • ?
  • ?
  • ?

Sqlite, , , . , , , - .

, , - , , , .

+1

Source: https://habr.com/ru/post/1742991/


All Articles