ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo Macarron <eduardo.macar...@gmail.com>
Subject Re: MyBatis and Apache Ignite integration
Date Wed, 27 Jan 2016 17:35:42 GMT
Hi Denis, and people from the ignite project.

I have just created an empty project at Github for the integration:
https://github.com/mybatis/ignite-cache

As we spoke before, the interface is really simple. Probably we may have
gone too far with the simplicity because some things need to be explained.

The cache adapter just needs to implement the Cache interface:
https://github.com/mybatis/ignite-cache/blob/master/src/main/java/org/mybatis/caches/ignite/IgniteCache.java

One instance of this class is created for each namespace. The namespace is
an String received as a paremeter to the constructor:

  public IgniteCache(String id) {
    super();
    this.id = id;
  }

The namespace is just a set of statatements. They are held in the same
mapper xml file or in the same mapper interface. From the cache
perspective, all the statements in a namespace have only one thing in
common: they are flushed all together and share the same properties (like
eviction policy, size...)

There is no special method to bootstrap the underlying cache system so this
has to be done in an static block. See the Redis cache adapter for an
example:
https://github.com/mybatis/redis-cache/blob/master/src/main/java/org/mybatis/caches/redis/RedisCache.java

Properties are read from the cache elament and passed to any setter method
in the adapter class. The code is here:
https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/mapping/CacheBuilder.java

Hope this basic info is enough to start.

Apart from that... the only condition is that any code contributed will be
licensed under the Apache License 2.0 which I suppose that is not going to
be a problem ;)

And that we can start with pull requests but have no problem at all in
giving direct commit rights to the creator (or creators) of the plugin.

Regards.

2016-01-25 17:16 GMT+01:00 Denis Magda <dmagda@gridgain.com>:

> HI All,
>
> I've opened an Ignite ticket with tasks description [1]
>
> Is there anyone in Apache Ignite community who is interested in this kind
> of work and will be able to complete it in the nearest couple of weeks?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-2448
>
> Regards,
> Denis
>
>
> On 1/23/2016 11:28 AM, dmagda@gridgain.com wrote:
>
> Hi Eduardo,
>
> It's nice to hear from you! Thanks the help and details!
>
> Absolutely agree with you that the interface is straightforward and I
> don't see any difficulties that can arise during its implementation.
> I'll open an Apache Ignite JIRA ticket soon describing the integration
> details and hope that someone from Ignite community will pick it up the
> next week starting working on the plugin.
>
> As per the hosting I would host everything on MyBatis GitHub repo as it is
> already done for other plugins and in addition would add a documentation to
> Apache Ignite [1]. This way both MyBatis and Ignite community will be aware
> about the integration and we don't need to host the plugin in different
> repos.
>
> I've copied Ignite dev community to the discussion - dev@ignite.apache.org.
> So please make sure that this dev list is copied when you reply ;)
>
> If someone else from either MyBatis or Ignite community has any thoughts
> on this topic please share.
>
> [1] https://apacheignite.readme.io
>
> Regards,
> Denis
>
> On Saturday, January 23, 2016 at 12:46:08 AM UTC+3, Eduardo wrote:
>>
>> Hi Denis,
>>
>> First of all. Wellcome to the list!
>>
>> AFAIK all the cache integration plugins have been developed by ourselves.
>> The interface is quite easy so the task is usualy pretty straight forward.
>>
>> I will be very happy to help with the integration! I would suggest
>> creating a new repo and work on it. Probably it will be better that that
>> someone from the Ignite project builds the plugin and we provide
>> information about how the interface works.
>>
>> Regarding the future hosting, I suppose there will be no problem in
>> hosting the new project at our home in Github but is also perfect that you
>> host it as part of the ignite project. No problem at all with any option!
>>
>> Looking forward to starting! :)
>>
>> 2016-01-21 10:30 GMT+01:00 <dma...@gridgain.com>:
>>
>>> Hi MyBatis community!
>>>
>>> I'm a committer and PMC of Apache Ignite [1] project and writing to you
>>> on behalf of our community (+ CC-ed) to discuss an integration between our
>>> projects that should be useful for both sides.
>>>
>>> In short, Apache Ignite is a high-performance, integrated and
>>> distributed in-memory platform for computing and transacting on large-scale
>>> data sets in real-time, orders of magnitude faster than possible with
>>> traditional disk-based or flash technologies.
>>> Inside of our community we see a growing interest in a field of usage
>>> MyBatis along with Apache Ignite. There are use cases when developers/users
>>> wants to use Apache Ignite as MyBatis second level cache. Since such an
>>> interest is growing constantly we think that it's a right time to make this
>>> happen.
>>>
>>> As I see MyBatis already supports second level cache for Redis,
>>> Hazelcast and Ehcache.
>>>
>>> How do you usually add such components? Were they added by MyBatis guys
>>> or were developed by guys from Redis, Hazelcast, etc.?
>>>
>>> [1] https://ignite.apache.org/
>>>
>>> Regards,
>>> Denis
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "mybatis-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to mybatis-user...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "mybatis-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mybatis-user/CxSqG1dprm4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mybatis-user+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mybatis-user+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message