-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fable as a Service (Repl) #82
Comments
Currently the fable-repl is just static files so there's no backend service. I guess it shouldn't be difficult to create a dotnet/node simple server to provide such an end point, but you'll have to deploy it somewhere by yourself as we don't have a server infrastructure for Fable at the moment. The tricky part is you need to keep the FSharpChecker alive to avoid huge load times, so using a serverless function is not an option. @nojaf and @jindraivanek have created similar REST services, maybe they can give some hints. |
Even a serverless function can have static variables. It would not cold start with every call. It only cold starts when it's provisioning a new instance and that's rare. But in these cases you definitely have slow down. So if you want to guarantee fast results for every single call then you need something else. |
Hmm, its not impossible as mentioned above, however the things we did always had a cold start. |
I was able to use fable-splitter with Fulma minimal template. This combination seems to be the simplest for a laic. Now I assume it shouldn't be a problem to update F# script file on the fly and trigger fable-splitter command having deamon always being alive. I only need this strange setup for the PoC. Then I plan to dive into the real internals or other possibilities |
I wrote blog post about my setup: http://jindraivanek.gitlab.io/blog/2018-10-22-FAKE-continuous-deployment/ Cold vs hot start is big diff, something like 5s vs 0.5s. After I figured out deployment process, I didn't have any problem with server, it just works(TM). However as my server have only 1GB RAM, bigger input can bring the service down, so I limit input size to 10kB. Code from F# compiler is good test case for this :) |
Thanks @jindraivanek , I will test it as well. I do not have any hardware limitations from the server point of view |
I'm struggling with building fable-splitter.
It requires to be comfortable with the stack (npm, yarn, dotnet, webpack, fake, packet) and I'm not yet there.
But if I 'm not mistaken I have noticed once on some video that somebody was running F# script through fable-repl online with the POST request. Is this feasible? If not could you Guys think about such a solution?
I really need the simplest possible "fsx2js for the PoC I'm creating for my team leader/product owner.
The text was updated successfully, but these errors were encountered: