Make a webapp framework/ecosystem as awesome as R's Shiny: a challenge to Julia's community

visualization

#21

Nice. Is there a way to publish it as well?

if instead of using Interact you did using InteractNext, Mux [1]

You can serve it as a web server:

ui = @manipulate for language in ["Julia", "R", ...]
    plot(...)
end
webio_serve(page("/", req -> ui))

[1] Pkg.clone("https://github.com/JuliaGizmos/InteractNext.jl.git"); Pkg.checkout("WebIO") – I’ve just tagged the WebIO fix needed for this.


#22

Has anyone tried getting appmode in Jupyter working with Julia?

This would be a nice step towards building shiny apps.


An example binder is below:


#23

Just following up. A precursor to a dashboard app can be seen at:

juliatetris.com

This combines WebIO and Binder (using the appmode described above). The binder repo is available at:


Putting it together,

@xiaodai, what do you think is still needed to get you there?


#24

Ok, so no more bullshit! I actually made a Julia dash app relatively quickly. See:

Julia Dash Binder – Tetris Challenge

You should now truly be in a good spot for forking this project and making your own.


As an aside, I think Julia would greatly benefit from package developers adopting a binder standard.

Exploring a package’s functionality without downloading it is usually one of the few perks reserved for javascript.


Can I build webpages and especially dashboards in Julia
#25

That’s very interesting! Did you also try something like Mux or HTTP.jl to serve a WebIO app?


#26

See some examples of that here


#27

My main argument against a Mux setup is it takes time (to code).

This binder took up very little time past setting up the Jupyter notebook. // i.e. the devops


Also, the idea was never could “I” build a WebIO app using Mux or HTTP.jl.

It’s can I build a dash app in a way accessible to Julia users without 5 years of web development experience.

See:


edit: One final remark is that I don’t think Julia is anywhere near close to being suitable for a backend server.

Although Genie.jl exists, there is just not the ecosystem in place to make an API that measures up to one from Rails or Django.

This is why all the links in this thread are for Dash apps. As proof, the API the Tetris Challenge uses for keeping scores is actually a Rails server I built in a day.


#28

We’ll get there.


#29

My understanding is that once people start re-jiggering LLVM, JVM etc to output to WebAssembly and it is universally supported in browsers, the JavaScript domination might come to an end shockingly quickly, no? (This is a question not an assertion, I have no idea what I’m talking about.)


#31

Well, I guess that was my question though, will it really take that long? I don’t see why it would take that long, all you need is to write the code that does LLVM IR to WebAssembly and things start changing really, really fast right? I suppose there is the barrier of all the front end developers not necessarily wanting to jump up and change to a different language, but the front-end developers I know don’t particularly like JavaScript.


#32

The Birth & Death of JavaScript


#33

I see. I don’t have a lot of experience on this, but I’d love to hear specifically what are the extra steps that are required (after the application is already done with WebIO) to set it up with Mux, how the Binder approach solves them and whether there is some tradeoff or the binder approach is just fine.


#34

Although I personally would love to see the death of JavaScript :nerd_face:, and have Julia -> WebAssembly take over as the preeminent language of the web, unfortunately, no matter what much better options are available, I don’t see JS going away anytime soon - just because of the shear momentum, all the resources available (books, on-line courses, tools, coding camps, money spent to make JS run fast), and all the programmers already skilled in getting JS to do what they want, no matter whether or not they are truly happy with it.

After all (as I commented on here), COBOL and FORTRAN are still around and in heavy use :scream::joy: after nearly 60 years!

I am cautiously optimistic that WA will help level the playing field, and in addition, just as LLVM has helped spark a lot of creativity in new programming languages (such as Julia itself), WA will spark just as much creativity in new languages designed for client side web programming.


#35

I want to report back with some great news.

I’ve been eying Predix UI for quite some time, wanting to use their components on top of Genie. If you’re not familiar with Predix UI, it’s developed by GE and they have a huge amount of high-quality UI elements implemented as Polymer components. Lots of them are focused on data science and data visualization as they’re used by GE to build software for monitoring their industrial equipment. They fit perfectly into Genie’s view architecture as they can be represented purely as a combination of HTML elements and data - so no ugly generation of JS from Julia! :nauseated_face: Ex: https://www.predix-ui.com/#/elements/vis/px-vis-radar

What’s been holding me back from pursuing this was the weird GE licensing of the code. The awesome part is that a couple of weeks ago GE started to migrate the Predix UI components over to BSD-3 and Apache licenses. (Amazing luck or maybe my constant nagging on all available channels, from Quora to Github, got them to review their licensing :blush:)

I’ve now begun experimenting with building Genie + Predix UI apps. There are some hurdles, mostly related to assets management: Polymer and Predix use Bower, which is deprecated, while Genie uses the modern Webpack + Yarn combo. Plus there’s gonna be some work to setup reactivity. But most of it Just Works by default and if I’ll have enough time I might have a demo in a couple of months. Fingers crossed!


#36

Way to go @essenciary, exciting!


#37

I think it basically boils down to:

  • do you want a notebook?
  • or do you want a website?

As a dashboard app is a single page thing, I’m guessing the easiest way to do this is through a jupyter notebook.

Binder solves the threading issue this causes by using docker boxes to house your jupyter notebooks.

Once InteractNext upgrades to the new version of WebIO that’s compatible with Binder, it should remove the javascript issues (for simple stuff like sliders)

// also, I think a Jupyter app looks a lot more iconic (at this point in time) than a home-rolled bootstrap app


#38

I’m picturing something very simple: a plot, a few sliders, some check boxes, some dropdown menus and I wanted to understand how much extra effort it takes from: “it works locally on WebIO” to “it is a web app everybody can use online”. Your approach seems to simplify this step drastically.

What were the drawbacks of the binder approach? For example, is the slowish page loading time due to using Binder or is it inevitable with Julia based web apps?


#39

Slow page loading isn’t a julia thing in general. I’ve written a recommendation system on top of HttpServer.jl and a small embedded webdemo application to explore the results in a web gui (the recommendation itself is meant to be used via a simple REST interface) and it’s lightning fast. But I just used HttpServer to process get requests and all the webpages are handwritten html (and a little javascript) directly on top of that.
Also I did load testing on the rest interface (again directly on top of HttpServer.jl) and I was pleasantly surprised how well it scaled on a simple PC with 4 cores it could easily handle hundreds of requests per second.