RR 320 Shrine and File Uploads with Janko Mahronic episode artwork

EPISODE · Jul 25, 2017 · 43 MIN

RR 320 Shrine and File Uploads with Janko Mahronic

from Ruby Rogues · host Charles M Wood

RR 320: Shrine and File Uploads with Janko MahronicJerome Hardaway, Dave Kimura, and Charles Max Wood discuss Shrine with Janko Mahronic on this episode of Ruby Rogues. Janko is a Ruby developer. He is the creator of Shrine, which handles file uploads. Shrine tries to solve existing problems and gives many ways to upload files. It tries to accommodate and provide every option for whichever types of file you may be uploading. Tune in to find out more about Shrine!Questions [00:03:56] What does Shrine do that CarrierWave doesn’t do? One of the main reasons Shrine was created was to support background jobs. CarrierWave was missing support for background jobs. There is a CarrierWave extension for uploading in back-end but it doesn’t work reliably. It doesn’t delete files in the background and is missing the ability to have stable basic grounding capability. Shrine was created because of this reason. [00:06:06] Does Shrine have good support for Rails? Yes, you can hook up any backgrounding library. It has a designed interface in the way that Shrine can realize data for you. Shrine can call the background library directly. It can be an active job or custom background library. Inside the job, call Shine again to load all objects back up to finish the job. [00:07:40] Does Shrine work across multiple file types or is it geared towards images? Shrine works for any types of files. It is called the Ruby method. It can be implemented in any way you want. It has a functional style. You give the original file for the input and then move it to the processed files on the outputs. The processing can be anything: as long as you produce a file object on the output, you can call whatever you want to call, even an external service. [00:09:04] What’s the biggest file that you’ve tested Shrine with? Have you run into any kind of memory leaks? In Shrine nothing is done through memory, everything is done via streaming. When you’re streaming you don’t lose anything. It works for both small and large files. [00:11:48] Explain what goes into building a file upload system. What are the concerns? The framework handles the way the file is uploaded for you. Once the file is uploaded it’s stored into a temporary file. A gem handles most of the heavy work. Shrine makes a wrap around it. A lot of work goes into deciding which file attraction process needs to go in which order. It is important that you don’t upload in a data based transaction (?) 14:41 if processing lasts for longer time, whole time. There is a lot of time and decisions about what to do when. [00:15:10] Do you have any blog posts about a migration plan? Do you have a good way to switch to Shrine? Yes, Janko wrote migration guides. They include what codes you need to have to transition to Shrine. None of them involve re-uploading file because files are already there, they just need to be assigned ids. Then records can be updated with the file in a way that Shrine would be able to find them, just need to do record updates. [00:17:29] What do you think active storage will do to the future of Shrine? Janko may not be the best person to ask. He created Shrine for people who are not using Rails. It is difficult to tell at this point what active storage will do for the future of Shrine. [00:19:50] How is the community adoption implementation? What is your process with that? There is a Google group for people to ask questions. The setup doesn’t look that much different. Adoption is more that Janko tries to write a lot of blog post emphasizing some of the things that are better in Shrine. Most of the adoption started from the Go Rails screencast. When the author started to release videos. People were able to see what it looks like from start to finish. Go Rails is a great way to bring a library closer to a wide population. [00:23:26] What stack are you using? The preferred web framework is Roda and Sequel. [00:25:00] Is there anything out there that you feel that these uploading that you adding to Shrine? He feels like there is integration missing, which would be nice to have but he started working on he already knew what he wanted Shrine to support up front. Most of those features were added in the first and second release of Shrine. People won’t find on demand processing in Shrine because he decided not to add that. [00:29:54] Security Points of Shrine Uploads have to be authenticated. If a file is uploaded to a URL another person should not be able to review that file. If you want to authenticate files, you need to serve the files from your Rail set. [00:32:55] How much time have you spent doing Shrine? Two years. Picks: Dave: Wallabag: https://wallabag.org/en Charles: Stair Points Skil Saw: http://www.amazon.com/dp/B0731Q92BY/?tag=chamaxwoo-20 Janko: Event Machine: http://www.rubyeventmachine.com/ Links: GitHub: https://github.com/janko-m Twitter: https://twitter.com/jankomarohnic?lang=en Special Guest: Janko Mahronic. Advertising Inquiries: https://redcircle.com/brandsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter of this podcast: https://www.spreaker.com/podcast/ruby-rogues--6102073/support.

RR 320: Shrine and File Uploads with Janko MahronicJerome Hardaway, Dave Kimura, and Charles Max Wood discuss Shrine with Janko Mahronic on this episode of Ruby Rogues. Janko is a Ruby developer. He is the creator of Shrine, which handles file uploads. Shrine tries to solve existing problems and gives many ways to upload files. It tries to accommodate and provide every option for whichever types of file you may be uploading. Tune in to find out more about Shrine!Questions [00:03:56] What does Shrine do that CarrierWave doesn’t do? One of the main reasons Shrine was created was to support background jobs. CarrierWave was missing support for background jobs. There is a CarrierWave extension for uploading in back-end but it doesn’t work reliably. It doesn’t delete files in the background and is missing the ability to have stable basic grounding capability. Shrine was created because of this reason. [00:06:06] Does Shrine have good support for Rails? Yes, you can hook up any backgrounding library. It has a designed interface in the way that Shrine can realize data for you. Shrine can call the background library directly. It can be an active job or custom background library. Inside the job, call Shine again to load all objects back up to finish the job. [00:07:40] Does Shrine work across multiple file types or is it geared towards images? Shrine works for any types of files. It is called the Ruby method. It can be implemented in any way you want. It has a functional style. You give the original file for the input and then move it to the processed files on the outputs. The processing can be anything: as long as you produce a file object on the output, you can call whatever you want to call, even an external service. [00:09:04] What’s the biggest file that you’ve tested Shrine with? Have you run into any kind of memory leaks? In Shrine nothing is done through memory, everything is done via streaming. When you’re streaming you don’t lose anything. It works for both small and large files. [00:11:48] Explain what goes into building a file upload system. What are the concerns? The framework handles the way the file is uploaded for you. Once the file is uploaded it’s stored into a temporary file. A gem handles most of the heavy work. Shrine makes a wrap around it. A lot of work goes into deciding which file attraction process needs to go in which order. It is important that you don’t upload in a data based transaction (?) 14:41 if processing lasts for longer time, whole time. There is a lot of time and decisions about what to do when. [00:15:10] Do you have any blog posts about a migration plan? Do you have a good way to switch to Shrine? Yes, Janko wrote migration guides. They include what codes you need to have to transition to Shrine. None of them involve re-uploading file because files are already there, they just need to be assigned ids. Then records can be updated with the file in a way that Shrine would be able to find them, just need to do record updates. [00:17:29] What do you think active storage will do to the future of Shrine? Janko may not be the best person to ask. He created Shrine for people who are not using Rails. It is difficult to tell at this point what active storage will do for the future of Shrine. [00:19:50] How is the community adoption implementation? What is your process with that? There is a Google group for people to ask questions. The setup doesn’t look that much different. Adoption is more that Janko tries to write a lot of blog post emphasizing some of the things that are better in Shrine. Most of the adoption started from the Go Rails screencast. When the author started to release videos. People were able to see what it looks like from start to finish. Go Rails is a great way to bring a library closer to a wide population. [00:23:26] What stack are you using? The preferred web framework is Roda and Sequel. [00:25:00] Is there anything out there...

NOW PLAYING

RR 320 Shrine and File Uploads with Janko Mahronic

0:00 43:38

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

JFK The Enduring Secret Jeff Crudele An in depth tutorial and discussion around the assassination of John F. Kennedy, (JFK) the country's 35th president who was brutally murdered in Dallas Texas on November 22, 1963. The series comprehensively explores the major facts, themes, and events leading up to the assassination in Dealey Plaza and the equally gripping stories surrounding the subsequent investigation. We review key elements of the Warren Commission Report , and the role of the CIA and FBI. We explore the possible involvement of the Mafia in the murder and the review of that topic by the government's House Select Committee on Assassinations in the 1970's. We explore the Jim Garrison investigation and the work of other key figures such as Mark Lane and others. Learn more about Lee Harvey Oswald the suspected killer and Jack Ruby the distraught Dallas night club owner with underworld ties and the man that killed Oswald as a national TV audience was watching. Stay with us as we take you through the facts and theorie Explicit 暗黑森林 The Dark Forest 榮忠豪/Ruby 盧春如/Joanna Wang 王若琳 社會總是希望人人都活在明亮。但一旦人的黑暗面露出的時候,社會會怎麼反應? 人性的黑暗總是被壓抑的而不被允許顯露, 但若這些邪惡的行為無法被壓下來 會有什麼事情發生? 本播客想透過真實殺人案件與其他暗黑的故事來探索人的黑暗面,但就像暗黑的森林,在黑暗的樹枝之中還是看得到光芒,提醒人們黑暗之處還是有希望的存在。 除了只關注故事的黑暗,『暗黑森林』也會專注在人們對於彼此的關懷,同情,與自我保護的重要性。來吧!跟著主持人 榮忠豪/Joanna 王若琳/Ruby 盧春如 一起走進 「暗黑森林」 Powered by Firstory Hosting Explicit Rogues Gallery 27th Letter Productions Kristen, M.J., and Chris investigate pop culture's most memorable villains, antiheroes, and misunderstood monsters to find out how they make being bad look so good. New episodes every other Thursday. Explicit Ruby Ryder – Pegging Paradise Ruby Ryder Your guide for pegging, anal sex, and bdsm Explicit

Frequently Asked Questions

How long is this episode of Ruby Rogues?

This episode is 43 minutes long.

When was this Ruby Rogues episode published?

This episode was published on July 25, 2017.

What is this episode about?

RR 320: Shrine and File Uploads with Janko MahronicJerome Hardaway, Dave Kimura, and Charles Max Wood discuss Shrine with Janko Mahronic on this episode of Ruby Rogues. Janko is a Ruby developer. He is the creator of Shrine, which handles file...

Can I download this Ruby Rogues episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!