1

The Java end is a Bukkit plugin, so I don't have the freedom to build on a servlet engine like Tomcat. I don't need arbitrary access to any object; I just want to expose a subset of functionality available to plugins to my wrapper application.

The Cocoa application, I am building from the ground up, so the restrictions are a bit looser. It's a wrapper for the server with limited support for configuring certain plugins.

Something that can communicate over Unix sockets would be ideal since the processes are running on a single host, but TCP sockets are ok too. I'm not really picky. If I end up using TCP then I'll consider adding support for remote management, but it's not a priority. I don't want Unix sockets badly enough to bother with all the hoops I'd have to jump through to use them.

Eris
  • 150
  • 7

2 Answers2

1

You might want to look at zeromq, it has bindings for Objective-C and Java, supports IPC, TCP, and more.

Zach Kelling
  • 52,505
  • 13
  • 109
  • 108
  • I'm a little wary of the GPL (not up for debating its merits), so I'll have to look into just what LGPLv3 entails. Looks promising otherwise. – Eris Jun 01 '11 at 21:03
0

Java does not support UNIX sockets out-of-the box, but this question gives some alternatives.

Or you can just open a tcp socket on localhost to keep in the standard library.

There are a lot of solutions out there, but if you want to stay lean and mean, a simple socket is not too bad. All the boxed solutions are quite complex, as they need to deal with complex issues over the net. You will face only a small subset of these, so might be better of with a simple home-grown protocol over a socket.

Just make it asynchronous to avoid blocking.

Community
  • 1
  • 1
Peter Tillemans
  • 34,983
  • 11
  • 83
  • 114
  • As I said, Unix sockets are ideal, but really that is the least of my concerns. :) I'm not too keen on rolling my own because I don't feel like dealing with how to determine the end of a message or parse basic data types. – Eris Jun 01 '11 at 21:18
  • You can use one of the lightweight JSON libraries to serialize between the apps. However if you want a cooked solution : Activemq on Java and Stomp (ObjC) are nice. Activemq is pretty much zero-configuration. – Peter Tillemans Jun 01 '11 at 21:29
  • Hmm, ActiveMQ looks like it does way more than I need. Also, the getting started guide seems to make some assumptions about what I know, but I'm not terribly familiar with the Java ecosystem! I'm looking into it but not sure I'll get very far. – Eris Jun 01 '11 at 21:55
  • Life got in the way and this got pushed onto the back burner. I think I'm going to end up rolling my own solution despite my initial resistance. The Java side is regrettably flooded with bloated enterprisey solutions. Thanks for the help at any rate! – Eris Jun 12 '11 at 16:24
  • These solutions do serve their purpose, but they often solve a lot more than is needed. That too has a price, in this case a steep learning curve and umpteen dependencies. – Peter Tillemans Jun 12 '11 at 18:02