Book Image

Web Development with Julia and Genie

By : Ivo Balbaert, Adrian Salceanu
Book Image

Web Development with Julia and Genie

By: Ivo Balbaert, Adrian Salceanu

Overview of this book

Julia’s high-performance and scalability characteristics and its extensive number of packages for visualizing data make it an excellent fit for developing web apps, web services, and web dashboards. The two parts of this book provide complete coverage to build your skills in web development. First, you'll refresh your knowledge of the main concepts in Julia that will further be used in web development. Then, you’ll use Julia’s standard web packages and examine how the building blocks of the web such as TCP-IP, web sockets, HTTP protocol, and so on are implemented in Julia’s standard library. Each topic is discussed and developed into code that you can apply in new projects, from static websites to dashboards. You’ll also understand how to choose the right Julia framework for a project. The second part of the book talks about the Genie framework. You’ll learn how to build a traditional to do app following the MVC design pattern. Next, you’ll add a REST API to this project, including testing and documentation. Later, you’ll explore the various ways of deploying an app in production, including authentication functionality. Finally, you’ll work on an interactive data dashboard, making various chart types and filters. By the end of this book, you’ll be able to build interactive web solutions on a large scale with a Julia-based web framework.
Table of Contents (13 chapters)
1
Part 1: Developing Web Apps with Julia
5
Part 2: Using the Genie Rapid Web Development Framework

Improving application startup time using a custom sysimage

It’s important to understand that we’re talking only about the initial response times after the application is started when most of the codebase is JIT compiled. This is known in Julia parlance as time to first plot. Once the initial compilation is completed, the application will run and respond very fast, which is a great feature for web applications that can run for weeks and months between restarts.

Thanks to the efforts of the Julia stewards and the community, the time to first plot has been going down, and work is being done to allow ahead-of-time compilation for Julia apps. Meanwhile, one of the best solutions available today is to use PackageCompiler.jl (https://github.com/JuliaLang/PackageCompiler.jl) to create a custom Julia library, called a sysimage, that is optimized for our specific application, to reduce the startup latency of our app.

Technically, this process is about creating a custom sysimage...