Download the PHP package pyaesone17/s3-reducer without Composer

On this page you can find all versions of the php package pyaesone17/s3-reducer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package s3-reducer

S3Reducer

Small ,minimalist but effective Laravel library to reduce your s3 billing dramatically just by calling custom asset function. Song interesting ? Let's try and check your monthly billing. You will ever want to treat me beer for that.

Theory

I found out that I have to bill $50 per month for one of my application that is using s3. For read requests, it is like 46$. But only 4$ for put and delete requests. Therefore, If I can reduce the amout of read requests, I only have to pay like $6 per month. And this library emerge.

Library Design

This is the concept of chaining the responsiblity. When you use s3_reducer

like this, the library will check local filesystem first. If the library exists in local it will server from local cache. If the libary cant find it on local server, it will download the asset from the s3 server and store it on local server. After that it will serve assets to the user. Therefore, you will only have to pay for s3 when no local cache file is exist.

Why Just Dont Use Local Filesystem

You might claim that why just don't use local file system if the libary behind the sense store image in local to cache the s3 assets. Well, what happens if your server crush, your important assets will lost forever. And your vps server have limited data storage, mean while you can upload unlimited to the s3.

Your local won't full storage ? You said library download from s3 and serve from local server ?

No, you can clear those cache, at a certain time by running cron job. Your server won't full with storage. Daily, weekly or monthly ? It just depends on your configuration.

Structure

If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.

Install

Via Composer

If you are using below laravel 5.4, you have to register service provider like this.

Usage

I recommend to use unique image path when uploading to s3 server. Because this library will make folder like s3 bucket style.

Purge Cache

If you are using unique path style for every image upload. You don't have to purge the cache of assets. To clear the local cache image, you can even use this function.

Cron Job

To avoid, you local server full with s3 images. You should add task scheduling like this in App\Console\Kernel.php

Testing

Note

It is just for showing frequent read requests to s3 assets. But for manipulating media, you should try to do it on actual s3 storage. For developer with devops experienced, I still recommend to use nginx cache to do this better performance.

License

The MIT License (MIT). Please see License File for more information.


All versions of s3-reducer with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
php Version ~5.6|~7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pyaesone17/s3-reducer contains the following files

Loading the files please wait ....