Skip to content
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

Would like a KRL editor for apps #4

Closed
b1conrad opened this issue Jul 26, 2022 · 6 comments
Closed

Would like a KRL editor for apps #4

b1conrad opened this issue Jul 26, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@b1conrad
Copy link
Owner

The last few commits, ending in this one, have prepared a form with the code of an app (base64 encoded) so that we can send an event to our pico. That event could open up an editor, primed with the current code of an app. In order to install edited code into our pico though, we'll have to spawn a child pico to contain and share the edited code. Then, we can install from a query to that pico.

We would do most communication with the child pico using family channels, but it would need a channel giving access to the query for external use.

@b1conrad b1conrad self-assigned this Jul 26, 2022
@b1conrad b1conrad added the enhancement New feature or request label Jul 26, 2022
@b1conrad
Copy link
Owner Author

The child pico could be just a repository of KRL code keyed by the RID of each ruleset held. Editing could be done in the participant pico. The child pico would just receive changed code for a RID and provide the code given the RID.

@b1conrad
Copy link
Owner Author

b1conrad commented Aug 1, 2022

Decided to refactor the com.vcpnews.introspection ruleset and add a ruleset named com.vcpnews.ruleset which will take care of all ruleset related introspection, including editing of KRL for apps. Like the byu.hr.connect ruleset, introspection will install the additional ruleset as part of its own installation as an app (but the ruleset ruleset will not be an app per se).

@b1conrad
Copy link
Owner Author

b1conrad commented Aug 1, 2022

The com.vcpnews.ruleset ruleset now provides ruleset introspection. But, it needs to be installed when the introspection app gets installed. The former uses the latter as a module, but that doesn't cause a timing issue (it is actually the reverse of issue #77 in the byname repo).

So after introspection knows it has been installed, it needs to request the installation of the ruleset ruleset.

@b1conrad
Copy link
Owner Author

b1conrad commented Aug 1, 2022

Conversely, when the byu_hr_manage_apps:app_unwanted event comes in with attributes {"rid":"com.vcpnews.introspect"} the ruleset ruleset should uninstall itself (is that possible?), because it needs to be uninstalled first, since it uses the introspect ruleset as a module.

And will it be soon enough? There is a race condition. It depends which of the manage_apps and ruleset rulesets gets scheduled first. Hm.

b1conrad referenced this issue in Picolab/fully-sharded-database Aug 2, 2022
@b1conrad
Copy link
Owner Author

b1conrad commented Aug 2, 2022

With this commit and installing introspection through the Manage Apps app and installing the ruleset app directly in the developer UI, it all works as it did before all the refactoring.

@b1conrad
Copy link
Owner Author

b1conrad commented Aug 2, 2022

With this commit, the pattern is complete. To have a byname app use an auxiliary ruleset that uses the main app ruleset as a module, the main app on installation installs the aux ruleset. The aux ruleset eavesdrops on the manage_apps event informing it that the main app is no longer wanted and uninstalls itself immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant