- 授权协议: MIT
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: http://markevans.github.io/dragonfly/
- 软件文档: http://markevans.github.io/dragonfly/
- 官方下载: https://github.com/markevans/dragonfly
软件介绍
Dragonfly 是一个 Ruby gem 用于动态处理 Rails、Sinatra 等框架的图像上传。
示例代码:
如果你想生成缩略图:
class User < ActiveRecord::Base # model
dragonfly_accessor :photo
end
<%= image_tag @user.photo.thumb('300x200#') # view %>在 Sinatra 下生成文本图像
get "/:text" do |text| Dragonfly.app.generate(:text, text, "font-size" => 32).to_response(env) end
生成附件
wav = Dragonfly.app.fetch_url("http://free.music/lard.wav") # GET from t'interwebs
mp3 = wav.to_mp3 # to_mp3 is a custom processor
uid = mp3.store # store in the configured datastore, e.g. S3
url = Dragonfly.app.remote_url_for(uid) # ===> http://s3.amazon.com/my-stuff/lard.mp3
亿级流量网站架构核心技术
张开涛 / 电子工业出版社 / 2017-4 / 99
《亿级流量网站架构核心技术》一书总结并梳理了亿级流量网站高可用和高并发原则,通过实例详细介绍了如何落地这些原则。本书分为四部分:概述、高可用原则、高并发原则、案例实战。从负载均衡、限流、降级、隔离、超时与重试、回滚机制、压测与预案、缓存、池化、异步化、扩容、队列等多方面详细介绍了亿级流量网站的架构核心技术,让读者看后能快速运用到实践项目中。 不管是软件开发人员,还是运维人员,通过阅读《亿级流......一起来看看 《亿级流量网站架构核心技术》 这本书的介绍吧!
