Skip to content
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

Separate out encoding.py as multicodec ? #73

Closed
heaven00 opened this issue Sep 24, 2016 · 7 comments
Closed

Separate out encoding.py as multicodec ? #73

heaven00 opened this issue Sep 24, 2016 · 7 comments

Comments

@heaven00
Copy link
Contributor

heaven00 commented Sep 24, 2016

The encoding.py code seems a lot like multicodec implementation, should we separate it out ? so that it can be used in py-ifps too ?

@heaven00 heaven00 changed the title The encoding.py code seems a lot like multicodec implementation Separate out encoding.py as multicodec Sep 24, 2016
@heaven00 heaven00 changed the title Separate out encoding.py as multicodec Separate out encoding.py as multicodec ? Sep 24, 2016
@whereswaldon
Copy link
Contributor

I looked around a little, but didn't find the multicodec specs. What is it responsible for? encoding.py basically just handles, JSON and a couple other formats. Is that the purpose of multicodec?

@heaven00
Copy link
Contributor Author

yeah, that's the purpose of it, more details https://github.com/multiformats/multicodec

so its one of the requirements listed here too ipfs-shipyard/py-ipfs#23

@ntninja
Copy link
Contributor

ntninja commented Sep 25, 2016

I like the idea, but reviewing the current multicodec spec it seems the current encoding.py only handles the “how do I decode data with the given type” part; it doesn't actually provide a multicodec parser yet.
My suggestion would therefore be to start an independent project that provides a full multicodec implementation (optionally based on encoding.py). Once it reaches the level of maturity required to be usable on it's own (particularly by the py-ipfs project), we can then integrate it into this project and (possibly) make it an official ipfs project (at least I would do some lobbying towards that goal).

@fredthomsen
Copy link
Contributor

I have started a python multicodec implementation https://github.com/fredthomsen/py-multicodec. I believe only json works correctly right now. I'll look and seeing if we can integrate this.

@heaven00
Copy link
Contributor Author

heaven00 commented Oct 3, 2016

lets complete the module first and then integrate ?
I would love to help out too on this :)

@fredthomsen
Copy link
Contributor

Another problem is that we need to make py-multicodec support streaming, currently it only takes fixed length rather than streams.

@ntninja
Copy link
Contributor

ntninja commented Feb 15, 2019

I've looked at https://github.com/multiformats/py-multicodec (now existing multicodec implementation in Python) and it doesn't look like encoding.py at all. Leading me to believe that this was some kind of misunderstanding here. If anything, encoding.py (or rather the library written by @fredthomsen) seems to more closely resemble what https://github.com/ipld/py-ipld-dag would like to achieve if it contained any code. With recent changes encoding.py is now hardly more than a glorified JSON parser and even before that there wasn't much to “separate out” in the first place.
This will therefor be closed, open a new issue if you think that you can provide a replacement for encoding.py but for now we'll stick to the required JSON and byte stream handling.

@ntninja ntninja closed this as completed Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants