-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next Steps #49
Comments
I've ported datastore to py3 (passed the existing test cases) at dheatovwil/datastore |
@dheatovwil: I saw your message, but I didn't respond in text (the OP was updated through). Sorry for this! I've updated the OP to outline what I believe should be happening next in order for this to become useful in terms of |
@Alexander255 I would like to work on the bitswap implementation. Resources I know of: I would work using a bottom-up approach. |
@AliabbasMerchant: Any help is appreciated! Particularly on that front! And I'll say it up front: It's not going to be easy, I'll help were I can, but you'll may have to do some reverse-engineering of the source code and definitely is going to involve some guesswork – there is no close-to-final spec and it shows (so ideally document any and all findings in whatever form while you're at it). (One important thing I also realized however, while writing this reply is that we do not actually have any implementation for transport security yet and hence all data will have to sent as plain text; at the current stage of development I don't believe this is problem however as it allows for better debugging.) The first thing required will be establishing a It probably won't work exactly the way I described, but should be close. Please don't hesitate to ask any questions you may have and I'll try to answer them to the best of my abilities. 🙂 |
Sure. |
@Alexander255 I need the python versions of some of the above for py-ipfs-bitswap. So I am making them. |
Also, 1 more thing. |
@AliabbasMerchant: Don't read to much into it, it's not uncommon in JS that every subroutine ends up in a different package. It's not uncommon to have packages such as module.exports = function isBuffer (obj) {
return obj != null && obj.constructor != null &&
typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
} (The end.) Apparently JS people like it that way and everybody does it there, so it's not surprisingly that JS-IPFS would do it to. In Python it's more common that packages are written for groups of related functionality instead so packages are bigger but more versatile. TL;DR: Never mind that JS has subpackages for everything, in Python everything Bitswap and up can be one package (py-ipfs). BTW: |
Python support will be very important. It's one of the most popular scripting languages after JavaScript and used by numerous projects. To name just a few from my area of knowledge: The Blender 3D animation software and Godot game engine both use Python (named GDScript for the later) for addons and development. With a native Python implementation of IPFS, the daemon could be included in such software allowing it to directly work with files within the IPFS network... this is just one huge advantage I can immediately point out. |
@AliabbasMerchant: Thank you for bringing up this important subject! I'll try to answer from my perspective, but do remember that different people have different visions of what this software should actually be. The discussions of #40 and #1 are good illustrations of this I think. My vision for Py-IPFS: I'm interested in your, and others!, vision as well however. |
I have started with python bitswap. /cc @Alexander255 |
Out of sheer morbid curiousity, has anyone thought about re-thinking this library as a light wrapper around the C++, Rust, or Go implementations instead? (Using C API, PyO3, or gopy) Python is a great systems integration language, but a pure Python implementation seems like it'd be very slow and lagging behind the other compiled implementations with more funding. Also, I am aware of the HTTP client library... just seemed like a direct integration with Python bindings might be safer with less overhead than communicating over HTTP. I've not had a great experience with the HTTP client either. |
Is this still happening or is it completely abandoned? |
Since #1 is clogged with all the many comments I open a new issue here. Feel free to continue the discussion below and I'll keep the following updated as things develop. Also feel free to create separate issues / repos to coordinate and I'll add the relevant links below.
Next steps (networking, stalled – please see the “storage” section below):
py-libp2p
librarypy-ipfs-bitswap
library: https://github.com/AliabbasMerchant/py-ipfs-bitswapipfs block *
API for fetching blocks of nodes we are connected to – fetching blocks of non-connected nodes needs the DHT.ipfs daemon --disable-transport-encryption
, but note that you will not be able to connect to any regular peers until one of the transport encryption methods is implementedmultistream-select
code ofpy-libp2p
to support actually dialing other nodes (MOSTLY FIXED UPSTREAM –ls
is still missing and anmss-nc
implementation could still be useful)mss-nc
like utility on top of this code to demonstrate that you are able to connect togo-ipfs
nodes and negotiateTo do this you'll need to create an async stream based version of https://github.com/fmoo/python-varint/blob/master/varint.py
ls
mode in which MSS will return a list of supported protocols, see https://github.com/multiformats/multistream-select/blob/master/README.md for the complete speclibp2p
py-multistream-select
library and updatepy-libp2p
to use it (Easy!, stalled – needs your help!)py-multistream-select
library: https://github.com/dheatovwil/py-multistream-selectNext steps (storage, simpler):
(Suggestion: Use Python's
lib2to3
and just drop Python 2 entirely.)Current port: https://github.com/dheatovwil/datastore(maybe https://pypi.org/project/aiofiles/ ?) for file accessThetrio
framework is used for async I/O nowpy-ipfs
“implementation” that can fetch blocks from the local$IPFS_PATH
directory and expose them with an API similar to what https://github.com/ipfs/py-ipfs-http-client currently offers (goal here is to eventually have a drop-in replacement)block/{get,put,rm,stat}
API that serves blocks from the local$IPFS_PATH
directorytrio-quart
ASGI web microframework for this. (Whatever you choose it will have to be compatible with trio as that is the AIO framework used in the stack.)dgraph-io/badger#984
The text was updated successfully, but these errors were encountered: