-
Notifications
You must be signed in to change notification settings - Fork 36
Serverless Functions #22
Comments
Hi Eaba, I must admit that I am not entirely sure about how an I must admit that it's been a long time since I actually fiddled with this myself, but if my memory serves me correctly, and I haven't created some breaking changes that somehow destroyed this little Console application, I think its syntax was roughly like the following.
If you're on Linux or Mac, you must prepend The above will "execute" the "hyperlambda-file.hl" (assuming it exists). This project only loads some few of the core assemblies, but you can load additional plugins with This project even has an If you fiddle around with this project, and look at its code, I am certain you'll figure out how to use Active Events and the core assemblies in "non-web" scenarios, which I think is kind of your question ... And in fact, the project is only 300 lines of code, so using it as a starter-kit for your own (non-web apps) would probably be easily achieved. Hopefully this answers at least to some extent your question :) |
Thanks @polterguy |
NP |
Hi @polterguy looking at this line |
Well, I have considered creating Active Event hooks that allows you to (even more) dynamically load assemblies, which would be beneficial while for instance installing apps through the "Desktop" module. Being able to load these from "where ever" might come in handy. I am not sure I would implement the above myself, since I am a fan of having files in the filesystem myself though - But, if I provided a generic event to load them from Hyperlambda, I guess the step to being able to load them also from "anywhere" would be small enough to justify allowing for it, by allowing developers to create their own loading logic, which again could of course load them from the database. My personal use-case for dynamically loading assemblies from Hyperlambda, is to make it possible to create "modules" which have custom C# Active Events and code. In fact, the reason why that MSSQL data adapter issue thing is still open (even though it's a year old), is because I have played with the idea of using this type of logic for it. (I don't want to have closed source dependencies in the core project) Unfortunately, I am now feature complete for the current release cycle though (8.1), so this would be something I would have to re-iterated in a later release (8.2?). Besides, it's a pretty massive change, so I'd need a lot of time to make sure I got it right ... PS! Just be careful with this though, since all users (including "guest" accounts) happens to have write access to the above (example) folder. However, if you do not create/expose any UI that actually allows any "guest" users to write to it in any ways, you should be safe. An alternative (and safer way) would be to create a custom folder for instance at the root of your system, and then create a startup file, that dynamically loads all assemblies from that folder, after having extracted them from the database, and saved these to your custom folder. Notice, I am not really sure if I can say that this would be "good practice" though, however it is possible ... |
This feature will be worth it, I perceive!, when you eventually get to implement it. |
Hi @polterguy just checking up on this issue! |
Hi Eaba, I'm sorry to say I just haven't found the time for this :( But it's actually not that difficult to implement yourself, in p5.core everything needed to dynamically load up assemblies is already implemented. You just have to implement something that allows you to invoke it with your own paths to an assembly ... |
Hi,
Given the way
phosphorusfive
works, a thought came to my mind: If I were to create aserverless
platform, can phosphorusfive be used for things like invokingCustom Functions
just the wayAzure Functions
works? It is just a thoughtThe text was updated successfully, but these errors were encountered: