[JBoss JIRA] Created: (ISPN-800) Infinispan inside OSGI
by luca stancapiano (JIRA)
Infinispan inside OSGI
----------------------
Key: ISPN-800
URL: https://jira.jboss.org/browse/ISPN-800
Project: Infinispan
Issue Type: Feature Request
Components: Core API
Affects Versions: 4.2.0.CR1
Reporter: luca stancapiano
Assignee: Manik Surtani
We need to import infinispan inside a OSGI repository. Tests are made with Felix.
I added the configuration to use infinispan inside a osgi repository. We need to ignore all listed dependencies. With this configuration we can install infinispan-core.jar inside OSGI. Its achievement will be as a base installation here: https://github.com/flashboss/infinispan
I added the Import-Package because you are forced to put manually in Felix all dependencies as jgroups, jboss marshalling, jcip, all apache commons. I've seen infinispan core working by default without all those libraries, so I think the same achievement should be replicated in OSGI.
Inside the Import-Package tag I excluded those libraries so Infinispan core can be started in default mode without errors. If we want use the replication in OSGI, it is enough add manually the other packages (jgroups.jar etc etc)
Actually the core bundle can be installed. But to be used it needs theese projects be installed as osgi bundles:
jboss transaction api 1.0.1.GA
(It is not yet a OSGI bundle. Waiting for a response to: https://jira.jboss.org/browse/JBEE-67)
jgroups 2.10.1.GA
(fixed in jgroups 1.12)
river 1.2.3.GA
marshalling-api 1.2.3.GA
jboss common core 2.2.14.GA
jboss logging spi 2.0.5.GA
rhq plugin annotations 1.4.0.B01
i18nlog 1.0.9
log4j 1.2.16
We should make sure proper 'Import-Package' property is specified in the MANIFEST.MF so that:
1- it fails to load obviously when there's any missing bundles that are essential in using the very core functionality of Infinispan.
2 - it does not fail due to the dependency that is not really essential.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] Created: (ISPN-375) Enable Hot Rod clients to start transactions
by Galder Zamarreno (JIRA)
Enable Hot Rod clients to start transactions
--------------------------------------------
Key: ISPN-375
URL: https://jira.jboss.org/jira/browse/ISPN-375
Project: Infinispan
Issue Type: Feature Request
Components: Cache Server
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 5.1.0.BETA1, 5.1.0.Final
It might be useful to allow Hot Rod clients to start transactions within Hot Rod servers. The possibility of clients participating in the actual transaction, i.e. being an XAResource, should not be imposed since this might be less than trivial to achieve in non-Java environments. The alternative would be to allow clients to start Hot Rod server local transactions only.
This would require enhancing Hot Rod spec to have some begin/commit/rollback commands that return a tx id, and for clients to be able to send this id as part of each command that should participate in the transaction.
Pitfalls to avoid include avoiding a transaction to be propagated over several Hot Rod servers. IOW, to simplify things, if a tx is started in server A, all ops within that tx should be directed to tx. Load balancing could still happen but would need to be tx sticky.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] Created: (ISPN-586) ManagedConnectionPool doesn't work in a transactional context
by Manik Surtani (JIRA)
ManagedConnectionPool doesn't work in a transactional context
-------------------------------------------------------------
Key: ISPN-586
URL: https://jira.jboss.org/browse/ISPN-586
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores, Transactions
Affects Versions: 4.1.0.CR2
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 4.1.0.CR3
>From the reporter:
"Anyways, what seems to be the real problem is that all the things that need to be persisted are saved in memory and then when the transaction is completing (either in prepare or commit phase) the loader attempts to get a connection from the datasource. Apparently this is illegal and throws an exception which is what causes the HeuristicMixedException further up the chain.
This only fails when using a ManagedConnectionFactory. If I swap out a PooledConnectionFactory it works fine. I presume the managed version fails because it returns the same connection that is part of the active transaction for that thread and you can't perform new operations on that connection once the transaction is already in prepare or commit. This feels like a bit of a design flaw to me... I didn't see an obvious fix."
This possibly has to do with the AbstractCacheStore doing the following in prepare():
"
public void prepare(List<? extends Modification> mods, GlobalTransaction tx, boolean isOnePhase) throws CacheLoaderException {
if (isOnePhase) {
applyModifications(mods);
} else {
transactions.put(tx, mods);
}
}
"
and later during commit actually writing the changes to the store. This generic, "abstract" behaviour is intended for non-transactional data stores (such as a filesystem). Behaviour should be different when it comes to transactional data stores.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 6 months
[JBoss JIRA] Created: (ISPN-999) Support eventual consistency
by Manik Surtani (JIRA)
Support eventual consistency
----------------------------
Key: ISPN-999
URL: https://issues.jboss.org/browse/ISPN-999
Project: Infinispan
Issue Type: Feature Request
Components: Distributed Cache, Locking and Concurrency
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 5.1.0.BETA1, 5.1.0.Final
Essentially, it is about supporting eventual consistency in Infinispan. Currently Infinispan is strongly consistent when using synchronous distribution mode. Each data owner receives updates synchronously so anyone anywhere on the cluster doing a GET will see the correct value. The only exception is during a rehash (when a new node joins or leaves), that consistency is eventual since the GET may reach a new joiner who may not have applied state it receives from its neighbours yet. However this is hidden from users since the GET is sent to> 1 data owner and if an UnsureResponse is received (determined by the fact that a new joiner responds and the new joiner wouldn't have finished applying state), the caller thread waits for more definite responses.
However, there is a use case for being eventually consistent as well: the main benefits being speed and partition tolerance. E.g., if we use distribution in asynchronous mode, the writes become *much* faster. However, anyone anywhere doing a GET will have to perform the GET on all data owners, and compare the versions of the data received to determine which is the latest. And if there is a conflict, to pass back all values to the user.
So in terms of design, what I have in mind is:
* All cache entries are versioned using vector clocks. One vector clock per node.
* When a node performs a GET, the GET is sent to all data owners (concurrently), and the value + version is retrieved from each.
* If the versions are all the same (or they can be "fast forwarded"), the value is returned
* Otherwise, all potential values and their versions are returned
* A resolve() API should be provided where application code may provide a "hint" as to which version should be "correct" - which will cause an update.
* In terms of implementation, this will touch the DistributionInterceptor, InternalCacheEntry and relevant factories, some config code (since this should be consistency model should be configurable), and a new public interface.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months