Recently cloud storage has been growing rapidly, whether it is free or paid. SkyDrive, Google Drive, iCloud Drive, and other services are available for free or for a fee, with almost unlimited capacity. In addition to simply uploading data, users can easily share with others via the web via the provided DNS and URL, and because of this feature, many people simply can not share resources such as documents, Upload and use between multiple users. In recent years, AWS S3 has provided RestAPI and SDKs with a number of programming languages because web developers have been unable to use Cloud Drive, which offers almost unlimited capacity as the costs of hosting and operating the server themselves increase. It is a tendency to transfer image servers and the like because they can be utilized in their web development. In this paper, we uploaded images using Swift similar to AWS S3 to these web developers, and uploaded them with the image compression. When the Cloud Drive was used as an image server, It is aimed at promotion.
Image Compression Storage Policy for Openstack Swift
1. Final Project
Image Compression Storage Policy for Openstack Swift
Group 7
Ikwhan Chang / PriyaVishnu / Prashanth Iyengar
Prof.Younghee Park
12-Dec 2016
1
2. Team
Ikwhan Chang
Class ID: 4
Student ID: 010754103
Priya Vishnu
Class ID: 25
Student ID: 010739261
Prashanth Iyengar
Class ID: 9
Student ID: 010711233
2
From Computer Engineering..
4. Background
• Why Image Compression Storage Policy?
• Recently, individuals have started using cloud storage services to back up their personal files
including images.
• 64% percent of the website content are image types [Source: http://httparchive.org ]
• Cloud platform has been used as Storage as a Service to store the web page image contents
4
5. Why Image Optimization is needed?
5
KeyCDN - 18 Tips for Website Performance Optimization
Forbes - How To OptimizeYour Website's
Performance And Keep Customers Happy
Many expert recommend image optimization to increase web performance
6. Our Approach
• Analyzed the Swift Code as our first step
• Understood the swift proxy code flow
• Identified the files that we need to modify to
implement an additional storage policy
• Identified the most suitable image
compression technique
• Modified the Swift code to add the new
image compression policy and integrated the
compression procedure
• Developed a web page to demonstrate the
usage of the new policy
6
_finalize_put_()
9. Image Compression Technique
• Ref: https://pillow.readthedocs.io/en/3.4.x/handbook/overview.html
9
• We have made use of the Pillow library to achieve image
compression
• It is a free Python Imaging Library (PIL) that adds image
processing capabilities to the Python
• PIL supports multiple image file formats
• It is efficient and has many powerful features to support the
manipulation of the image files
10. Challenges
• Understand the swift proxy server code flow
• Understand how the existing storage policy has been implemented
• Understand the swift code base to identify the files that needed to be modified
to implement the compression policy
• Integration of the compression policy with the existing storage policy
• Developing the web page to demonstrate the usage
10
11. Flow Diagram Comparison
11
Swift Proxy
File Upload
Zone
Ring
Storage Server #1
without Image
compression policy
Container #2
Container #3
Container #1
Region
Response:
image1.png
500 MB
500MB
curl -v -X PUT image1.png http://10.240.0.5/v1/AUTH_test/Normal
Swift Proxy
File Upload
Zone
Ring
Storage Server #1
with Image compression
policy
Container #2
Container #3
Container #1
Region
125MB
curl -v -X PUT image1.png http://10.240.0.5/v1/AUTH_test/Compressed
Request:
image1.png
500 MB Response:
image1_compressed.png
125MB
Request:
image1.png
500 MB
Request:
image1.png
500 MB
500MB
12. 1.Test Upload 2. Middleware
3. Save image into Swift
with Compression Policy
4. Run the demo
5. Check the loading speed of resources
17. Future Scope
• Read the chunk file within the proxy server and compress the
chunk and then send the compressed chunk to Object Server
• Deduplication can be added as an enhancement to the storage
policy
• Support multiple/widely-used image format
17
18. References
• Swift All In One http://docs.openstack.org/developer/swift/
development_saio.html
• Swift Command Line http://docs.openstack.org/cli-reference/swift.html
• Adding Storage Policies to an Existing SAIO http://docs.openstack.org/
developer/swift/policies_saio.html
• OpenStack Object Storage (Swift) Essentials by Amar Kapadia;
SreedharVarma; Kris Rajana, Published by Packt Publishing, 2015
• Uday’s swift policy code https://github.com/udaykd09/swift
18