BOUNTY: $7500 in STORJ token -- Uplink PHP Library binding

Requirements for Uplink PHP Library Bounty

Proposed Bounty: $7,500 in STORJ utility token (ERC-20)

Submissions Deadline: June 15, 2020

We’ve gotten some great interest in building integrations with platforms built in PHP. Native Nextcloud integration would be excellent and definitely help people who want more of an app experience than a developer tool but to get there fast, we need an Uplink library in PHP. This is where you come in!

Have you got awesome PHP chops? Do you want to help drive adoption of the Storj project? We’re looking for one member of the community to build a set of software bindings for PHP.

If you’re interested, the process we’re going to follow is:

Workflow for Bounty Hunters

Step Timing
Bounty Open: Express interest by sending an email to jocelyn@storj.io. Please include your experience with PHP and a link to any relevant GitHub repositories with code samples of your work Now - June 16, 2020
Candidate Evaluation - Internal, review the GitHub repo, code samples Now - June 15
Project Kickoff - If you’re selected, you’ll be assigned the project. We’ll jointly agree upon an expected timeframe to deliver (if you aren’t able to meet the deadline, the issue may be assigned to someone else) Please don’t start work until you have approval. We’ll also need to do a little paperwork for the project. June 15-22
Code Development - Create your solution (Don’t worry, we’ll have open communication channels and regular check-ins) Date may vary based on agreed-upon timeline June 22 - July 13*
Pull Request - Open a Pull Request to get your code reviewed July 13
Code Review - acceptance testing on the bindings July 13-17
Code Cleanup - Incorporate any feedback fromus July 20 -24
Merge PR - PR is reviewed, approved, and merged by us July 27
Once your PR is approved it’s time to get paid! July 31

The purpose of this document is to describe the requirements for the development of an Uplink library in PHP. It is expected that the library will be based on the Uplink C library available at:

GitHub

storj/uplink-c

Uplink C library. Contribute to storj/uplink-c development by creating an account on GitHub.

The Uplink library contains all the logic for efficient and secure communication with the satellites and storage nodes; encrypting, encoding, and sharding the data before uploading it, as well as decoding and decrypting the data after downloading it back from the storage nodes. We don’t want to reimplement and maintain all this logic in pure PHP, but rather build a PHP wrapper on top of the Uplink C library.

This bounty provides for the Uplink PHP library and documentation that enable developers to build 3rd party applications to store data on, retrieve data from or otherwise interact with the Storj network.

Documentation

The library and associated documentation should be substantially similar in function to the other programming languages supported by the uplink library, including:

Node.js: https://github.com/utropicmedia/storj-nodejs

Python: https://github.com/utropicmedia/storj-python

Android: https://github.com/storj/uplink-android

.NET: https://github.com/TopperDEL/uplink.net

Documentation provided should be written in markdown and include code samples for all of the functions exposed in the library. Documentation should be hosted as Github Pages on the Github repository of the library.

The documentation should give detailed instructions of how to use the library in PHP applications.

API

The API of the PHP library should follow the structure of the Go and C libraries while reflecting the idiomatic best practices of the PHP programming language.

We use semantic versioning for the uplink library. Once the API is declared as v1.0, we plan to support it backward-compatible for the foreseeable future. Hence, the API should be carefully crafted.

An API review will be conducted by the Engineering Team of Storj Labs before declaring v1.0.

Tests and continuous integration

The Github repository should follow best practices for implementing CI quality pipeline for Pull Requests. This CI should use the Jenkins server of Storj Labs, similar to the Uplink libraries for other programming languages.

Unit and integration tests should be implemented to ensure that the PHP library won’t break if the underlying Uplink C library is updated to a newer version. One possible way to implement integration tests is through the Storj Test Network: https://github.com/storj/storj/wiki/Test-network.

Making a new release on the Github repository should be automated as much as possible. For example, if the library is delivered as a Composer package (see below), the release should be automatically published on Packagist. If the delivery is a PHP extension, the binaries should be attached to the Github release.

Demo application

Successful completion of the library should include a demo application that demonstrates the basic operations of the library, including: listing buckets and files, uploading and downloading files, sharing access, etc.

Packaging

Ideally, the Uplink PHP library should be available as a Composer package. However, we acknowledge the added complexity of having the dependency to the native Uplink C library. If this makes it technically impossible to have it as a Composer package, the fallback is to make it available as a PHP extension.

Large files transfer

The Uplink PHP library should be capable of uploading and downloading large files with size of tens and hundreds of GBs, if not more. Ideally, this should be possible without modifying the max_execution_time directive. If this is not possible, possible alternatives should be discussed with the Engineering Team of Storj Labs as soon as possible.

(workflow for bounty hunters inspired by the work of Open Collective)

9 Likes

its been called to my attention that a member who tried sending a meesage to bounty@storj.io had it bounce back. I ve already flagged this to our team, so it should be resolved soon. However if that happens to you, please email me direct - jocelyn@storj.io - and Ill make sure your application is handled. Thanks and good luck :four_leaf_clover:

1 Like

Update: we have selected a winning entrant for the PHP Bounty – we’re reachng out to them to check on availability before announcing the name. thank you to everyone!!

2 Likes

Any news about PHP bindings?

1 Like

Hi d4rk4,

The bindings are implemented but the final sign-off isn’t done yet.

You can see the code here: https://github.com/storj-thirdparty/uplink-php/pulls

To install, add this to the composer.json of your project:

"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:storj-thirdparty/uplink-php.git"
    }
]

Then install the branch which you need:

composer require storj/uplink:dev-uplink-c-1.2.1

You have a bunch of errors in composer.json, look like your not tested your composer file. Please fix.
Here is the working version - GitHub - D4rk4/uplink-php: Uplink library bindings for PHP
Composer.json in the project must look like:

{
“minimum-stability”: “dev”,
“repositories”: [
{
“type”: “vcs”,
“url”: “git@github.com:d4rk4/uplink-php.git”
}
],
“require”: {
“storj/uplink”: “dev-master”
}
}

Could you please make a PR?

Sorry for belated response.

You have a bunch of errors in composer.json, look like your not tested your composer file. Please fix.

@d4rk4 there was a small typo in the command above which i fixed now (storj/uplink-php should have been storj/uplink)

The instructions work, there is no need to change the library.

The install procedure will probably change in the near future. The library will be probably hosted from Jenkins instead of Github. (https://github.com/storj-thirdparty/uplink-php/pull/1#issuecomment-784854107)

Hi guys,

Can we use this library in a production website?

I’m looking to create a website which will host documents using storj, but it’s made in PHP.

I’ve tested it extensively and it’s ready to use.

Obviously it’s fairly new so do let us know if you run into a problem. Preferably through a Github issue because I may miss it on the forum.

4 Likes

Hi Lije, please keep us posted on your progress. We’re always looking for community projects to showcase and promote

I was wondering if it’s still updated. I have, indeed, a project which involves what storj has to offer. It will be built in PHP 7.4

Also, the project has been created in 2014. What is your roadmap? I’m planning to build something big which has to last, at least 10 to 30 years. My clients need trust. They will probably has me things (which are unrelated to this topic, sorry about that) like:

  • my files are hosted in a decentralized way. What is half of the network gets shut down (massif hack, breakdown, etc). Will my data be lost?
  • what is storj wil give up in 5 years. What will happen to my data?
  • do you have backups? What if I remove files by errors. What solutions offers storj about that?

You got me, I just can’t afford to loose data and I want to be sure I’ve pick the right candidate.

1 Like

these are great questions and I would be asking the same, if I was in your shoes
We’re resistant to 51% attack . I will hunt up the post which explains it, and the platform is deliberately written in a way to allow it to survive if Storj-the-company ever goes away

Let me find the exisiting materials that explain why, and also address the backups issue. I will post a thread later with those resources and tag you in it

Happy to hear you’re actively moving toward such a major project, congrats

Hey,

I can’t wait to see your post :slight_smile:

I talked to our CTO about the third question you had, and we have backups in case we have a malfunction, but not in a way that’s exposed to users.

Storj whitepaper
https://storj.io/whitepaper

1 Like