Comments (5)
Need discussion re: using storj-lib
, ES6, etc.
from storj.js.
So my thoughts are that eventually we can support a majority of storj-lib
in browser, so it makes sense to bring that in as a dep.
The challenge is two fold:
- Size: Without minification, the bundle is about 1.8M as it stands right now. That will probably grow a bit. With gzip and minification, I could see it as low as 512kb. That is still pretty heavy for a dependency.
- ES6: Assuming we only do it for the browser, we should be able to transpile back to ES5 for proper support. This would let us ship two bundles
storj.es6.js
andstorj.es5.js
. When yourequire('storj-js')
server-side you would get non-transpiled code.
from storj.js.
From cpollard1001/storj.js#1 (comment)
Thanks @faddat! I agree re: HTTP for the first pass. The problem is HTTPS, farmers will need to issue certs and we will need to resolve to domain names to get around browser security. This also ties farmer availability to DNS resolution and brings up the question of NAT traversal strategies (and tunneling) for farmer's HTTPS endpoints. HTTP is incredibly straightforward (I have an example working now minus the OPTIONS endpoint), but HTTPS adds a layer of complexity that I'm not quite sure we want to take on.
What I'm working on today is a SIPS proposal for Contract that includes the protocols the shards need to be served over for the contract to be considered valid. This will allow us to propose new protocols for different target platforms and let farmers adopt them as desired, essentially letting the market decide. From there, we can talk through our options for the browser protocol.
As of now, I'm thinking the initial alpha of storj.js will be HTTP only. Other protocols will be implemented pending a larger project we are kicking off the beginning of next year to make some changes to core. Those changes will make plugging in new protocols unobtrusive, perhaps even pushing protocol implementation out into userspace.
from storj.js.
That's what I'd do if I were in your shoes:
Get er shipped, weather or not it's fully-polished. (Http was good enough for a very long time, chances are good that it is still OK)
:)
from storj.js.
Closing as current library supports HTTP.
from storj.js.
Related Issues (20)
- Error on upload: Not Enough Entropy HOT 1
- More than one instance of bitcore-lib HOT 11
- Travis builds are broken HOT 2
- Reduce size of final bundle HOT 2
- Need to populate file properties
- appedTo is recursive
- File API methods should be safe to call before `ready` HOT 1
- Document makePublic
- Implement removeKey
- Implement getKeyList
- Improve stack traces for tests HOT 2
- Update render-media
- Implement file.on('data' HOT 4
- UMD bundle exported as storj HOT 1
- Add `updateBucketById` method HOT 2
- Fix errors in README.MD HOT 1
- Add support for erasure coding HOT 1
- Update docs for `keypair.sign(message)` HOT 1
- Error: Cannot find module 'storj' HOT 1
- Unable to install storj via npm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storj.js.