Feb 4, 2019

@sboesebeck sboesebeck released this Nov 12, 2018 · 13 commits to master since this release

4.0 contained a rather nasty bug, that is fixed with this version. Bug was affecting Messaging.

Assets 3

@sboesebeck sboesebeck released this Nov 9, 2018 · 13 commits to master since this release

What was that again? Morphium is a sophisticated Object Mapper and Messaging System for MongoDB. It adds a lot of features to MongoDB, for example a dedicated InMemoryDriver, so that you can run all your Tests just in RAM without the need to install a MongoDB.

and good things need some time... so we are happy to announce, we just released Morphium 4.0.0. This release contains a ton of changes and improvements.

  • Simplifying the API at a lot of places in code
  • a lot new features and improvements for the Messaging System (Rejecting of Messages, Pausing/Unpausing of message processing, message replay upon startup, ...)
  • Code quality improvements
  • adding a new jackson based ObjectMapper (has to be enabled in Settings)
  • Transaction Support
  • Improvement of Enum handling
  • lots of improvements with aggregation
  • the InMemDriver does now support ChangeStreams
  • and countless other changes

this is a big update which took 8 Release Candidates to test.

Morphium is available at maven central:

<dependency>
    <groupId>de.caluga</groupId>
    <artifactId>morphium</artifactId>
    <version>4.0.0</version>
</dependency>

or here at releases.

Assets 5
Pre-release

@sboesebeck sboesebeck released this Nov 5, 2018 · 27 commits to master since this release

this fixes some things, moved back to a more reliable object mapper, improved in-memory driver

Assets 4

@sboesebeck sboesebeck released this Oct 18, 2018 · 46 commits to master since this release

This is a release candidate for V4.0.0. It does not contain more features, just a ton of enhancements, bug fixes and improvements. Especially in the messaging part of morphium.

Assets 4
Pre-release

@sboesebeck sboesebeck released this Sep 14, 2018 · 78 commits to master since this release

lots of new features, improvements

most importantly: new auto versioning feature, new type id feature and a transaction support (Mongodb4.0 only).

A lot of improvements for messaging!

Assets 4
Sep 14, 2018
Merge branch 'master' of github.com:sboesebeck/morphium

@sboesebeck sboesebeck released this Jul 17, 2018 · 168 commits to master since this release

Lots of features added to this Release:

  • revamped messaging, using Push-notififications in ReplicaSets
  • support for Transactions (MorphiumDB V4.0.0)
  • support for synchronized Caches using watch
  • support for watch of collections or dbs
  • minor changes and tweaks for updating performance / simplifying APIs
  • bugfixes
Assets 5

@sboesebeck sboesebeck released this May 24, 2018 · 243 commits to master since this release

Minor bugfix for the messaging part...

Assets 4

@sboesebeck sboesebeck released this May 20, 2018 · 263 commits to develop since this release

This release introduces JSR107 compatibility (see also here https://caluga.de/v/2018/5/20/custom_caching_in_morphium)

since the first version of Morphium it provided an internal cache for all Entities maked with the annotation Cache. This cache was configured mainly via those annotations.

This cache has proven its usefulness in countless projects and the synchronizing of caches in clustered environments via Morphium Messaging is working flawlessly.

But there are new and more sophisticated Cache Implementations out there . It would not be clever to built all those features also into morphium, better leverage on those projects. So we decided to include JCache-Support (JSR107) into morphium.

Of course, we had to adapt some things here and there, especially the MorphiumCahce-Interface needed to be overhauled.

Morphium itself always had the option to use an own MorphiumCache Implementation. But thsi was not always easy to achieve. But we use that now in order to be able to offer both the old, proven implementation and the new, future-implementation.

As always, morphium can be used out of the box, so we implemented a JCAche-Version of our cache as well into morphium.

##How to use
With the upcoming V3.2.2BETA1 morphium will use the JCache compatible implementation. If you want to switch back to the old, proved Version of caching, you just need to change the config:

    MorphiumConfig cfg=new MorphiumConfig();
    cfg.setCache(new MorphiumCacheImpl());

if you create your MorphiumConfig via properties or via JSon, you need to set the class name accordingly:

  cacheClassName=de.caluga.morphium.cache.MorphiumCacheImpl

JCache Support

If you leave all those settings to default, the JCache API is being used. By Default the cache creates the cache manager using Caching.getCachingProvider().getCacheManager(). This way you get the default of the default 😏

If you want to configure the cache on your own (ehcache properties for example), you just need to pass on the CacheManager to the morphiumCache:

  CachingProvider provider = Caching.getCachingProvider();
   morphium.getCache.setCacheManager(provider.getCacheManager());

of course in this example, there are no additional options set, but I think you see, how that might work.

BTW: the morphium internal JCache implementation can be used via JCache API in your application also, if you want to. Just add the system setting -Djavax.cache.spi.CachingProvider=de.caluga.morphium.cache.jcache.CachingProviderImpl and with Caching.getCachingProvider() you will get the Morphium Implementation of the cache.

Attention
All JCache implementation support expiration of oldest / least recently used entries in cache. Unfortunately the policy of morphium is a bit more complex (especially regarding the number of entries), so moprhium implements an own JCache-Housekeeping for now.

Additional Info:
Whatever Cache Implementation you use, you might still use the CacheSynchronizer in order to synchronize caches. And this synchronization should be working via Mongo even if you are not storing any Entities!

known bugs

There are some minor known bugs in the current Beta, you might want to know:

  • the CacheListener Callbacks do not seem to work properly with JCache implementations. That is when using EHCache at least. The Morphium Internal implementation works
  • there is a bug with Global Cache override Settings, that are not properly passed on to the underlying Caches
  • Messaging seems sometimes be affected as well by that. For some reason, we get a mongo exception here and there
Assets 4