-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Inter Plugin Communication (IPC) #148
Comments
One fundamental question is the model of these calls. Do they call the other plugin directly and get a response. Possibly with an custom interface. (eg. SendCoin and CheckBalance)? Are they able to make new TX and then execute a TX on another plugin and get the abci result. And then continue processing. Both of these are synchronous, which allows complex calls graphs and is more powerful but also more susceptible to errors and infinite loops and such Another approach is to model the asynchronous aspect of ibc and allow them to send message TXs that are executed in the next block. This allows us to control the communication much more at the framework level, but limits the actions the same way as ibc, as it is a one way message. Of course any protocol can be modeled by a series of messages, it would just make state handling more complicated, as we must persist intermediate state |
|
Okay, I agree point 1 is totally off the table. I can give a long rant why admins editing dbs directly outside of the business logic is a major cause of fragility of most long loved applications. But seems you agree. Point 4, also agree, too complex. But yes we need gas somehow... Roughly then, I see the second and third points as two directions to pursue and we should support both, with some notion of gas to avoid infinite loops maybe. The general case of dispatch another TX with the same context / permissions could work well and be quite flexible. Also make sure we always abide by the business logic. And I think this should he supported in some generalized manner. However, the exposed actions and return values are not always what we want to build other apps. For example, if the fee Middleware wants to check and later deduct the fee from the account, then S sendtx the proper way? Or creating an ibc packet? If we can fit everything in the TX callback format, it would be nice. I think we may sometimes need to pass in custom interfaces for lower level access to the modules, but still constrained by their business logic. I have no clear idea how this looks, but let's talk. |
Notes from talk:
|
This discussion is in the context of a refactored basecoin as a middleware (post 0.7). More context: each plugin, or instance of a plugin will have a unique domain within the state in which it is permissioned to use. However there are many situations for which a plugin may want/need to interact with a space which it is not inherently permissioned for such as:
We need to have as versatile an environment as possible without compromising safety or ease of use... IPC may allow what is currently one plugin to be further compartmentalized into a cluster of plugins, - right off the bat with tendermint/trackomatron I can imagine having separate but interacting plugin utilities for creating profiles, sending invoices, and paying invoices - These sometimes may need to interact in the same space.
The text was updated successfully, but these errors were encountered: