Releases: sboesebeck/morphium
V4.0.0-BETA1 Release Candidate
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
Bugfix release
Minor bugfix for the messaging part...
JCache (JSR107) Implementation
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
Messaging supplemental Release
This releae contains some minor bugfixes especially in regards to the Messaging subsystem in Morphium.
one new Feature made it into that release: Using custom Message-IMplementation. Just create your cutstom Message by extending the Msg-Class:
public class MyMessage extends Msg {
private String customText;
private MyStoredEntity aSubDocument;
}
Objects from this class can be used as standard Msg...
Messaging improvements
this release introduces a pushing based messaging system for mongodb, some minor bugfixes and API changes (especially for the messaging subsystem), additional Tests and some code improvements.
Bugfix and Messaging Feature Pre-Releasse
This release includes some changes to messaging, API simplifications and other minor bugfixes.
Newest Feature: Messaging now supports push from Mongodb! (only if connected to a replicaset)
Feature and bugfix pre-release
- moving from own logger implementation to slf4j / logback
- bugfixes with logging
- replicaset-monitoring bugfixes
Feature and Bugfix release
This release contains both feature enhancements and bugfixes:
- performance increase insert vs upsert
- update handling of non-mongoid ID-fields (bugfix)
- updated Tests
- new strategy for buffered writer: WAIT
- setting maxwait / timeout for waitstrategy in bufferedwriter
- moving id creation to morphium, implementing proper inserts, fixing bugs
- fixing buffered writing on sharded environments
- performance increase
- mongodb driver version update, checkfornew default fix
Feature and improvement Release
This release is mainly about tidying up:
- fixed some statistics
- removing drivers into different project
- improving byte array / binary data handling
- fixing some tests
- fixing checkForNew behaviour on creationTime
Feature and bugfix release
We added some minor tweaks and enhancements to this release:
- better support for non-replicaset installations
- fixing some nullpointer exception
- addes support for references in maps
- ability to ignore fields or limit them in addition to transient
- improvements to text search
- issue #38 fix
- driver dependency fix
- some code maturity improvements