create account

Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching. by hernandev

View this thread on: hive.blogpeakd.comecency.com
· @hernandev · (edited)
$113.78
Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching.
#### About the Project

Pixie is a simple, effective and smart image proxy for Steem blockchain applications. 
#### Repository

https://github.com/blocker-solutions/pixie

##### Pull Request for the Contribution
[PR #2](https://github.com/blocker-solutions/pixie/pull/2)


### New Features

This contribution introduces **IPFS integration**, **PHP-PM server** for easy server-load and **Smart browser caching** hints.

#### IPFS Integration

Every image parsed by Pixie now is also stored on IPFS, meaning IPFS servers both as a caching layer and redundant URLs for the parsed images.

#### PHP-PM

Nginx was replaced with PHP-PM, a pure PHP process manager and web server.

PHP-PM enables lowering the resources consumed by PHP, meaning a huge amount of images can be proxied in parallel with modest server hardware.

#### Smart Browser Caching Hints

Since IPFS is now integated, when a given URL is proxied and added to IPFS, the response contains the following headers:

#####  `content-location`

   Content location provides the alternative direct IPFS URL for loading the same image, on applications that use a fetch API this header can be used as fallback.

   Example: `https://ipfs.blocker.press/ipfs/QmRyo61SD3Zk2rxsPhTtrX1cjfBZmCUAnFN6PSsoLQAbeR`

##### `etag`

   The eTag header contains the IPFS hash for the proxied image, effectively working as caching helper for the server.

   When a request hits the server, if previously proxied, that header will be sent back to the server by the browser, and the server can just return a 304 (not-modified) response.

  Notice this rule is evaluated on the server by the expiration also, meaning the server will return fresh content after a sensitive caching period.
 
   Also notice, that 304 responses do not include a content body, they just confirm the content on the browser cache is still valid.

   Example: `W/"QmRyo61SD3Zk2rxsPhTtrX1cjfBZmCUAnFN6PSsoLQAbeR"`

##### `link`

   This header contains the same URL on the `content-location` header, but for pre-fetching purposes.

   Take a look on the example: 

   `<https://ipfs.blocker.press/ipfs/QmRyo61SD3Zk2rxsPhTtrX1cjfBZmCUAnFN6PSsoLQAbeR>; rel=preload; as=image; crossorigin`
   
   This header actually tells the browser to preload the IPFS URL after receiving the content, this creates a cache on the browser on both Pixie URL and IPFS URL, meaning any of those that later be hit, will already be present on browser.

   Also, this would allow caching 302 redirects to IFPS links.


#### GitHub Account

https://github.com/hernandev
šŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 144 others
properties (23)
authorhernandev
permlinkpixie
categoryutopian-io
json_metadata{"tags":["utopian-io","development","steemdev","php"],"app":"steemit/0.1","links":["https://github.com/blocker-solutions/pixie","https://github.com/blocker-solutions/pixie/pull/2","https://github.com/hernandev"],"format":"markdown"}
created2018-06-04 13:12:39
last_update2018-06-04 13:14:33
depth0
children7
last_payout2018-06-11 13:12:39
cashout_time1969-12-31 23:59:59
total_payout_value81.734 HBD
curator_payout_value32.044 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,556
author_reputation12,363,992,512,822
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries
0.
accountsteem-plus
weight500
1.
accountutopian.pay
weight1,500
max_accepted_payout100,000.000 HBD
percent_hbd10,000
post_id59,202,729
net_rshares37,138,518,833,364
author_curate_reward""
vote details (208)
@biogirl ·
Parece ser bem útil para quem trabalha na Ôrea. 

###### projeto #ptgram power | [faƧa parte](https://ptgram.tk/participe) | grupo [steemit brasil](https://t.me/steemitbrasil)


---

[![](https://steemitimages.com/DQmY1gSJFRYQGvchT4BdR6YR13fLLHD7ghk1JKpR6C7tyPF/image.png)](https://ptgram.tk)
properties (22)
authorbiogirl
permlinkre-hernandev-pixie-20180611t165430914z
categoryutopian-io
json_metadata{"tags":["utopian-io","ptgram"],"image":["https://steemitimages.com/DQmY1gSJFRYQGvchT4BdR6YR13fLLHD7ghk1JKpR6C7tyPF/image.png"],"links":["https://ptgram.tk/participe","https://t.me/steemitbrasil","https://ptgram.tk"],"app":"steemit/0.1"}
created2018-06-11 16:54:30
last_update2018-06-11 16:54:30
depth1
children0
last_payout2018-06-18 16:54:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length292
author_reputation180,960,159,917
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,323,456
net_rshares0
@casberp ·
Boa Hernandes!

**ptgram**
properties (22)
authorcasberp
permlinkre-hernandev-pixie-20180607t225020487z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-06-07 22:50:21
last_update2018-06-07 22:50:21
depth1
children0
last_payout2018-06-14 22:50:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length26
author_reputation10,544,987,063,205
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,757,230
net_rshares0
@codingdefined ·
Thank you for your contribution. Some nice and useful features added. Though commit messages are ok, if it would be little more descriptive then that would be great.


Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2322121).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
properties (22)
authorcodingdefined
permlinkre-hernandev-pixie-20180605t110019436z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2322121","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-06-05 11:00:18
last_update2018-06-05 11:00:18
depth1
children0
last_payout2018-06-12 11:00:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length657
author_reputation540,741,032,404,150
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,354,900
net_rshares0
@guifaquetti ·
Boa, parabéns pela contribuição!


---

 ###### projeto #ptgram power | [faƧa parte](https://ptgram.tk/participe) | grupo [steemit brasil](https://t.me/steemitbrasil) 

---
properties (22)
authorguifaquetti
permlinkre-hernandev-pixie-20180609t041957695z
categoryutopian-io
json_metadata{"tags":["utopian-io","ptgram"],"links":["https://ptgram.tk/participe","https://t.me/steemitbrasil"],"app":"steemit/0.1"}
created2018-06-09 04:19:21
last_update2018-06-09 04:19:21
depth1
children0
last_payout2018-06-16 04:19:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length172
author_reputation41,874,484,856,029
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,941,095
net_rshares0
@joaoprobst ·
NĆ£o entendo muito sobre esse assunto


---

###### projeto #ptgram power | [faƧa parte](https://ptgram.tk/participe) | grupo [steemit brasil](https://t.me/steemitbrasil)

---
properties (22)
authorjoaoprobst
permlinkre-hernandev-pixie-20180612t143410335z
categoryutopian-io
json_metadata{"tags":["utopian-io","ptgram"],"links":["https://ptgram.tk/participe","https://t.me/steemitbrasil"],"app":"steemit/0.1"}
created2018-06-12 14:34:03
last_update2018-06-12 14:34:03
depth1
children0
last_payout2018-06-19 14:34:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length174
author_reputation1,021,933,925,318
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,454,014
net_rshares0
@rodrigozottis ·
Nice sharing!
properties (22)
authorrodrigozottis
permlinkre-hernandev-pixie-20180606t182706061z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-06-06 18:27:06
last_update2018-06-06 18:27:06
depth1
children0
last_payout2018-06-13 18:27:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation91,377,546,906
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,568,413
net_rshares0
@utopian-io ·
Hey @hernandev
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Contributing on Utopian**
Learn how to contribute on <a href='https://join.utopian.io'>our website</a> or by watching <a href='https://www.youtube.com/watch?v=8S1AtrzYY1Q'>this tutorial</a> on Youtube.

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-pixie-20180605t131507z
categoryutopian-io
json_metadata"{"app": "beem/0.19.29"}"
created2018-06-05 13:15:09
last_update2018-06-05 13:15:09
depth1
children0
last_payout2018-06-12 13:15:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length506
author_reputation152,955,367,999,756
root_title"Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id59,370,955
net_rshares0