[0.17 released] Mirrormonkey: A synchronization framework for jMonkeyEngine

Hi!

First of all, I hope this is the right board for this announcement. I was wondering if I should post here or in contributions, but I’m not actually going to commit something to SVN, so here we are:

After trying multiple times over the past six months, I managed to develop a synchronization framework for the jMonkeyEngine that I am finally content with. For lack of a better name, I call it mirrormonkey.

Mirrormonkey is a framework aimed at small-scale projects with few developers, where resource consumption is of less concern than actually getting something done with hobbyist-effort. It is designed to contain a vast amount of features while being as easy to learn and use as humanly possible. This has led to a mostly declarative approach.

Mirrormonkey features:


  • Multiple update frequencies and reliabilities can be declared for each field of the entity classes

  • Automated tracking of hash values of synchronized fields to prevent any unnecessary serialization costs and network trafic

  • Bidirectional field synchronization (but: Clients may NOT create new entities)

  • Bidirectional, asynchronous RMI and RMI-Broadcasts

  • Identity-aware reference injection: If synchronized fields, RMI parameters and results are entities, then they can be substituted for the correct entity references without any user interference

  • Automated extrapolation

  • Field virtualization: Tired of declaring intermediate fields for your sync framework to access and then keeping track of the references? Override getter and setter, add an annotation and you're set.



19.08.2012

0.17 has now been released. It contains all the modules, but no commons classes yet. You can find further information on the project page. Alternatively, you can visit these direct links:



Warning: This thread contains documentation that is really, really old. Most of the API - especially the core module - has been completely redesigned. For current documentation, please check out the trac wiki linked above.
9 Likes

Ok its been moved :slight_smile:



Cool idea for a project, any links or demos?

Sounds very cool! I actually have something similar to this, but it looks like you made much more progress. Are you using SpiderMonkey (jME3 networking) for this, by the way?

i’ve no idea what you just said, but good luck

wezrule said:
i've no idea what you just said, but good luck

I think I'm on the same boat here.

I understand what he says, but don't get what it could be used for/with.

@all: Its basically what MonkeyZone does, synchronizing a set of entities and their data (e.g. location etc) between server and clients so you just have “the same” on both sides at all times. When some value changes on a server entity, the client entities are updated.

@mirrormonkey: Sounds cool, maybe you want to add this to the contributions update center?

Thanks @normen



That’s pretty much what I thought it was. Although, I’m not sure what the differences would be with MonkeyZone and what more it could bring. We’ll see I guess.

Well as any API, ofc you can do anything it does yourself in assembler :wink: Its just better when theres one API that gets improved by everybody instead of many isolated solutions.

normen said:
Well as any API, ofc you can do anything it does yourself in assembler ;) Its just better when theres one API that gets improved by everybody instead of many isolated solutions.


This runs contrary to maybe the best discussion of Java I've ever seen where the slide looked like:

Q: "What's your favorite Java framework?"
A: "public static void main(String[] args)"
1 Like
sbook said:
Ok its been moved :)

Cool idea for a project, any links or demos?


No, not yet. Although I'm going to finish the implementation this evening, I have yet to test or document a single line of code. I will start writing usage documentation as soon as I've finished testing the basic functions.

Momoko_Fan said:
Sounds very cool! I actually have something similar to this, but it looks like you made much more progress. Are you using SpiderMonkey (jME3 networking) for this, by the way?


Yes, I use the newer, thread-safe version of spidermonkey.
Apart from that, only java-builtins. Some time ago, I even experimented with a less complicated version of this project and AspectJ because of the enormous amount of mapping that is required and because it would simplify RMI greatly, but I was somehow reluctant to have it as a dependency. Probably should not have dropped it, after all.

normen said:
@mirrormonkey: Sounds cool, maybe you want to add this to the contributions update center?


Maybe ;)
Just searched it, and at first glance it seems that I would need to install some other IDE than eclipse to retrace the steps exactly. Maybe I'll try to get my head around that when it's all done.

madjack said:
Thanks @normen

That's pretty much what I thought it was. Although, I'm not sure what the differences would be with MonkeyZone and what more it could bring. We'll see I guess.


To be honest, I don't know what exactly MonkeyZone does. By the time I last checked (which was even before I started developing the first version of this project), I found no fully functional framework that did exactly what I wanted. If there is, well, I have tried this so many times now that it's just a personal thing to finally get it done ;)

Of course, this framework will be miles behind specialized solutions performance-wise and I'm guessing it will hog a lot of memory, too...
1 Like

Monkeyzone was synchronizing its entities since it was first committed to svn, but its not a library, its a demo game project. About creating the plugin, you only need to install jMP, install the plugins for developing other plugins and wrap your jar library as outlined in detail here. You don’t need to do much else in that project except update the jar file in svn after you first created it.

a) MonkeyZone is a full fledged game, basically… nothing as generic as what you are producing. It sounds cool.



b) Once the code is up, I’m sure you will hear lots of ways to evolve it into something more efficient without breaking the utility you’ve achieved… if efficiency ends up being a problem, after all.

This post contained outdated information. For tutorials and API documentation, please look at this website: mirrormonkey.pcloewner.de

This post contained outdated information. For tutorials and API documentation, please look at this website: mirrormonkey.pcloewner.de

@normen

Thank you for changing that, I’ll try it out after I update to the next nightly build.


@normen said:
It should be in the SDK Engine package, you sure you can't compile? Maybe its just a display issue.


Yes, I am positive. If this helps, I created a basic game project and the import can not be found there, either.

As I said, both eclipse and ant (as in ran from eclipse or command line with a buildfile that I've written, not the ant files that jME SDK runs) can compile everything just fine, as they find the class in jMonkeyEngine3.jar. I tried adding that jar to my jME SDK buildpath, which will let jME SDK find the class and compile, it's just that I wonder whether the jar should be part of the SDK Core or SDK Engine modules, which it apparently isn't at the moment.

@normen said:
The library itself doesn't need to use the plugins class path.. Its just a "J2SE Library", you can create it according to the recipe in the manual with a wizard and you don't need to add any libraries to the *plugin* really to make a new library for *projects*.


Sorry, but I'm not entirely sure what you are saying here.

If I can not use the Asset class in a BasicGame or in a module that I created in the jME SDK because it is not added to the build classpath, then wouldn't it be reasonable to assume that it also isn't available in the run classpath?
So I can add the jar to my own build path and then upload the module to the Community Repository. If someone downloads it, that person would not run into any build problems (if not using the Asset class themselves). Rather, running the project would fail because the Asset class is not available, but linked against by my module. Now as Asset is likely considered a jME internal class and the project built fine, it would be pretty confusing to a user that expects every internal dependency resolved by downloading the module through a plugin system with automatic dependency resolution.


Edit: jMonkeyEngine3.jar is not part of any module, as far as I know. I right clicked on the module in the Projects explorer, then chose "Properties" in the context menu. In the Project Properties window, I klicked "Libraries" -> "Add Dependency", then entered "jMonkeyEngine" in the filter box. This method will find e.g. every jar file that starts with jME3-* in the SDK Core and SDK Engine packages.

This post contained outdated information. For tutorials and API documentation, please look at this website: mirrormonkey.pcloewner.de

Looking very good! Nice jME-ish api and apparently modular by design, really cool.

normen said:
Looking very good! Nice jME-ish api and apparently modular by design, really cool.


Thanks! It's a mixed blessing, though; for most projects I start, I add layer by layer of abstraction until at some point, there are none of the original features present but a framework that can be used to implement them. At that point of time, I have lost all interest in the project in most instances ;)

@normen

Thanks for your response. I already had SDK Engine added to the dependencies, so I added SDK Core in addition to that. Yet, the import com.jme3.asset.Asset remains unresolved. Even when adding every single dependency from the list that it gives me, it still can’t find the class.



I updated to the latest nightly using the plugins function, but the problem persists.

It should be in the SDK Engine package, you sure you can’t compile? Maybe its just a display issue.

Edit: I found that com.jme3.assets.cache wasn’t public and changed that, maybe that caused it, should be in the next nightly. Still… The library itself doesn’t need to use the plugins class path… Its just a “J2SE Library”, you can create it according to the recipe in the manual with a wizard and you don’t need to add any libraries to the plugin really to make a new library for projects.

1 Like