Webapp Deployment

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Webapp Deployment

Reuben
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Adrian Salceanu
Sounds like the answer is https://github.com/shashi/Escher.jl 

It was built exactly for your use case and it's actually inspired by Elm 



marți, 1 noiembrie 2016, 06:08:01 UTC+2, Reuben Brooks a scris:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Reuben
When I try to run the examples or basic hello.jl file in Escher, always get this in browser: ".../Escher/examples/hello.jl did not return a UI function"

I don't see any issues filed on github with this, suspect it's something on my end. What would be the appropriate channel for me to get some help on this?

On Tuesday, November 1, 2016 at 1:10:18 AM UTC-5, Adrian Salceanu wrote:
Sounds like the answer is <a href="https://github.com/shashi/Escher.jl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;">https://github.com/shashi/Escher.jl 

It was built exactly for your use case and it's actually inspired by Elm 



marți, 1 noiembrie 2016, 06:08:01 UTC+2, Reuben Brooks a scris:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Adrian Salceanu
My experience with Escher is limited to reading the docs and looking at the sources, but it seems to be related to loading the file (or it's content): 

function loadfile(filename)
if isfile(filename)
try
ui = include(filename)
if isa(ui, Function)
return ui
else
warn("$filename did not return a function")
return (w) -> Elem(:p, string(
filename, " did not return a UI function"
))
end
catch err
bt = backtrace()
return (win) -> Elem(:pre, sprint() do io
showerror(io, err)
Base.show_backtrace(io, bt)
end)
end
else
return (w) -> Elem(:p, string(
filename, " could not be found."
))
end
end

in https://github.com/shashi/Escher.jl/blob/master/src/cli/serve.jl

So maybe make sure the example files are accessible (readable)? 

You can use the usual communication paths: a new issue in GitHub or StackOverflow. Also, check if there's a Gitter channel for Escher. 


marți, 1 noiembrie 2016, 09:38:11 UTC+2, Reuben Brooks a scris:
When I try to run the examples or basic hello.jl file in Escher, always get this in browser: ".../Escher/examples/hello.jl did not return a UI function"

I don't see any issues filed on github with this, suspect it's something on my end. What would be the appropriate channel for me to get some help on this?

On Tuesday, November 1, 2016 at 1:10:18 AM UTC-5, Adrian Salceanu wrote:
Sounds like the answer is <a href="https://github.com/shashi/Escher.jl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;">https://github.com/shashi/Escher.jl 

It was built exactly for your use case and it's actually inspired by Elm 



marți, 1 noiembrie 2016, 06:08:01 UTC+2, Reuben Brooks a scris:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Tomas Mikoviny
I'm not sure Escher works with v0.5 if that's what Adrian runs....
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Reuben
In reply to this post by Adrian Salceanu
The dukes are definitely accessible, I get a different error if i try to open a nonexistent file. Some example files just simply do not load. I suspect it may be a v0.5 issue, as Tomas notes below. Will follow up on Github / gitter.

On Tuesday, November 1, 2016 at 3:17:18 AM UTC-5, Adrian Salceanu wrote:
My experience with Escher is limited to reading the docs and looking at the sources, but it seems to be related to loading the file (or it's content): 

function loadfile(filename)
if isfile(filename)
try
ui = include(filename)
if isa(ui, Function)
return ui
else
warn("$filename did not return a function")
return (w) -> Elem(:p, string(
filename, " did not return a UI function"
))
end
catch err
bt = backtrace()
return (win) -> Elem(:pre, sprint() do io
showerror(io, err)
Base.show_backtrace(io, bt)
end)
end
else
return (w) -> Elem(:p, string(
filename, " could not be found."
))
end
end

in <a href="https://github.com/shashi/Escher.jl/blob/master/src/cli/serve.jl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl%2Fblob%2Fmaster%2Fsrc%2Fcli%2Fserve.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHGFBLIBiESgf_7f-TSW5OAZjg27Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl%2Fblob%2Fmaster%2Fsrc%2Fcli%2Fserve.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHGFBLIBiESgf_7f-TSW5OAZjg27Q&#39;;return true;">https://github.com/shashi/Escher.jl/blob/master/src/cli/serve.jl

So maybe make sure the example files are accessible (readable)? 

You can use the usual communication paths: a new issue in GitHub or StackOverflow. Also, check if there's a Gitter channel for Escher. 


marți, 1 noiembrie 2016, 09:38:11 UTC+2, Reuben Brooks a scris:
When I try to run the examples or basic hello.jl file in Escher, always get this in browser: ".../Escher/examples/hello.jl did not return a UI function"

I don't see any issues filed on github with this, suspect it's something on my end. What would be the appropriate channel for me to get some help on this?

On Tuesday, November 1, 2016 at 1:10:18 AM UTC-5, Adrian Salceanu wrote:
Sounds like the answer is <a href="https://github.com/shashi/Escher.jl" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fshashi%2FEscher.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFkEN59-EOa4AP_DYtThy34ph7qTw&#39;;return true;">https://github.com/shashi/Escher.jl 

It was built exactly for your use case and it's actually inspired by Elm 



marți, 1 noiembrie 2016, 06:08:01 UTC+2, Reuben Brooks a scris:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Alex Mellnik
In reply to this post by Reuben
Hi Reuben,

I largely work in this space.  I can walk through a few possible architectures that I have used:

1)  If the data pull and processing is fairly decoupled from the display, it is often easiest to use Julia only on the back end.  I have a few systems that pull new data every hour and add it to a database.  I then use Julia to do a bunch of processing and analysis, then load the results back into a different portion of the database.  You can then build a normal data-driven web app using standard tools that only looks at the database, and doesn't need to interface with Julia anywhere.  If you don't have any experience building web pages, I would suggest using Angular 1 and Plotly for the front end, and Node/Express for the back end.  Some basic data manipulation can be done via SQL if you use MySQL or similar, or in the web app itself using things like d3 and lodash.  I don't have any publicly available examples of this, but I could put one together if you like.

2) If the data pull and processing is strongly coupled to the data display, you can call Julia directly from a server-side web application rather than look at cached data.  You have a few options for the server-side code.  One is to call Julia from Node using node-julia. I have a rough example of how you would do this here.  One risk is that while node-julia works, it's a bit tricky to use, and I don't know what Jeff's plans for the package are.  You would again use a normal front-end tools like Angular/React for the front end.  

Alternatively, you could write the back-end in something like Mux.jl rather than in Node.  I don't do this, because I need to use things like https and SSPI in an enterprise environment, but I think it should work fine.  

3) Lastly, you could write the whole thing in Julia using something like Escher or Genie.jl.  These are both very interesting projects and represent an incredible level of work, but I don't think they are ready for production use yet.  

I strongly recommend the first option if possible.  It might seem like a bunch of different parts that all need to work together, but I think it's actually the easiest to set up and maintain, and lets you use the use the best tools in each domain.  Failing that, try the 2nd.  

If you have any questions or would like to discuss this further just let me know.  Cheers,

Alex


On Monday, October 31, 2016 at 9:08:01 PM UTC-7, Reuben Brooks wrote:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

WooKyoung Noh
In reply to this post by Reuben
Hello, I'm a developer of Bukdu.
https://github.com/wookay/Bukdu.jl

it's an web development framework on top of HttpServer.jl
Thanks!

On Tuesday, November 1, 2016 at 1:08:01 PM UTC+9, Reuben Brooks wrote:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?
Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Shashi Gowda
Hi Reuben,

what's in hello.jl ? There isn't a examples/hello.jl in Escher is there?

A file you are trying to serve should end with a function definition such as:

function main(window) # must take an argument
end

And this function should return the UI object you want to render.


On Tue, Nov 1, 2016 at 9:50 PM, wookyoung noh <[hidden email]> wrote:
Hello, I'm a developer of Bukdu.

it's an web development framework on top of HttpServer.jl
Thanks!

On Tuesday, November 1, 2016 at 1:08:01 PM UTC+9, Reuben Brooks wrote:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?

Reply | Threaded
Open this post in threaded view
|

Re: Webapp Deployment

Reuben
Hi Shashi,

I was following example 1 at escher-jl.org:

hello.jl contains:

function main(window)
    plaintext("Hello, World!")
end

I get a similar result for most of the example files. Some don't show anything, just a blank screen; I don't remember which was which.

-Reuben

On Tuesday, November 1, 2016 at 2:23:49 PM UTC-5, Shashi Gowda wrote:
Hi Reuben,

what's in hello.jl ? There isn't a examples/hello.jl in Escher is there?

A file you are trying to serve should end with a function definition such as:

function main(window) # must take an argument
end

And this function should return the UI object you want to render.


On Tue, Nov 1, 2016 at 9:50 PM, wookyoung noh <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OK2awzCnAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">wooka...@...> wrote:
Hello, I'm a developer of Bukdu.
<a href="https://github.com/wookay/Bukdu.jl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fwookay%2FBukdu.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXCA3Tcz1XFux5kfD62-crmilWwA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fwookay%2FBukdu.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFXCA3Tcz1XFux5kfD62-crmilWwA&#39;;return true;">https://github.com/wookay/Bukdu.jl

it's an web development framework on top of HttpServer.jl
Thanks!

On Tuesday, November 1, 2016 at 1:08:01 PM UTC+9, Reuben Brooks wrote:
Context: I love julia, and I've never built any kind of webapp. Most of my programming experience is in Mathematica and Julia...hacking things together (poorly) in Python when nothing else works.

Problem: I have a script  / notebook in julia that pulls data from sources, analyzes it, builds fancy plots, and has lots of nice information. Now I want to build a basic webapp that will allow me to access this information anywhere, anytime (will be updated regularly). 

Question 1: is there a julia package that suits my needs well, or should I look at using some other fronted to create the frontend? Elm intrigues me, as much for the learning as for the actual solution. 

Bottom line: I don't know enough about what I'm wading into to choose wisely. What does the community suggest?