msgpack / msgpack-ruby

MessagePack implementation for Ruby / msgpack.org[Ruby]
http://msgpack.org/
Apache License 2.0
763 stars 117 forks source link

Merge with msgpack-jruby #3

Closed minad closed 9 years ago

minad commented 11 years ago

See https://github.com/iconara/msgpack-jruby/issues/3

mbulat commented 11 years ago

I'd like to second this request. At the moment if you've got a gem using msgpack in ruby, you have to build separate gems for each platform.

frsyuki commented 11 years ago

I'm sorry for being too late...

Actually msgpack-ruby v0.5 changed its API (mainly, it added Buffer class). So I think we need extra work to merge it. But even just providing MessagePack.pack() and MessagePack.unpack() methods (meaning that not providing streaming deserializer/serializer) will still help a lot of people. How do you think this idea?

Here is some code I wrote for JRuby + v0.5. It's quite incomplete, though: https://gist.github.com/frsyuki/5198321

minad commented 11 years ago

@frsyuki : Thank you for replying!

@frsyuki , @iconara: So it seems there is some agreement on that both projects should be merged :)

iconara commented 11 years ago

I'll have a look at the new API. Even if we don't merge I want to keep the JRuby version in sync. I'd also like to throw out the dependency on the Java library, it's a bit kludgy to fit the Ruby API on top of it. @frsyuki could be a starting point for something.

xeger commented 11 years ago

Even if the two gems offer compatible APIs, authors of other gems have a problem because RubyGems has no way to represent platform-specific dependencies.

For instance, my gem "global_session" needs mgpack and must declare either a msgpack dependency or a msgpack-jruby dependency. I can use an "if" statement in the gemspec, but this is not strictly legal.

luislavena commented 10 years ago

@xeger I don't think that is a problem.

You can build the same gem and version targeting different platforms, for example, sqlite3:

http://rubygems.org/gems/sqlite3

Or Atomic:

http://rubygems.org/gems/atomic

If you depend on atomic gem, it will use the proper for your platform, or fall back to the (ruby) one, which will require compilation.

In the case of JRuby, that wouldn't be a problem.

Hope that makes sense and help understand that merging both codebase might be beneficial for the project.

Cheers.

tagomoris commented 10 years ago

:+1: for this issue. It seems that msgpack-jruby gem has enough interoperability for public APIs (described on its webpage) with msgpack gem. (except for Buffer API, that seems not be used by anyone currently.) http://ruby.msgpack.org/

repeatedly commented 10 years ago

:+1: for this issue too.

Currently, I have a plan which Fluentd supports JRuby and it needs msgpack and msgpack-jruby together. Merging msgpack-jruby into msgpack makes supporting JRuby easy.

frsyuki commented 10 years ago

@tagomoris @repeatedly thank you for head-up for this issue. I guess we should merge msgpack-ruby and msgpack-jruby. One concern is that I couldn't take time to improve msgack-ruby constantly. In fact I want to welcome another committer and package release manager to work on this issue.

iconara commented 10 years ago

FYI: https://github.com/iconara/msgpack-jruby/pull/14

swistaczek commented 10 years ago

:+1: good idea

tagomoris commented 10 years ago

@iconara seems good for new maintainer about merging jruby gem. How do you think @iconara ?

iconara commented 10 years ago

My plan is to submit a PR, but may take a month or so before I have time, unfortunately.

frsyuki commented 10 years ago

@iconara Sounds good. I'm sorry for taking too long time and thank you for your positive comments. Do you have interests to work on basic merging work (like Rakefile), say @tagomoris or @repeatedly? I guess having a good start point will help development. It's more than welcome for me to review code.

tagomoris commented 10 years ago

@frsyuki Of course, I can do it.

repeatedly commented 10 years ago

@frsyuki Yeah. I can help it. This is important for growing msgpack usability :)

tagomoris commented 9 years ago

47 merged.

funny-falcon commented 9 years ago

Is there any chance that Unpacker api will be compatible? I talk about #read_map_header, #read_array_header, #read methods, ability to check buffer, ability to iterate over input stream. It looks like there is no such abilities at the moment.

tagomoris commented 9 years ago

More APIs will be supported in JRuby, for more compatibility. @funny-falcon Could you open another issue for Unpacker api? (or pull-request? :-)

@frsyuki I think that this issue is to be closed now.