Code Monkey home page Code Monkey logo

Comments (5)

prestwich avatar prestwich commented on August 22, 2024

Need discussion re: using storj-lib, ES6, etc.

from storj.js.

retrohacker avatar retrohacker commented on August 22, 2024

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:

  1. 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.
  2. 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 and storj.es5.js. When you require('storj-js') server-side you would get non-transpiled code.

from storj.js.

retrohacker avatar retrohacker commented on August 22, 2024

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.

faddat avatar faddat commented on August 22, 2024

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.

retrohacker avatar retrohacker commented on August 22, 2024

Closing as current library supports HTTP.

from storj.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.