I am looking at quickly implementing a hazelcast in-memory cache for a web application.
The web application is written in perl...
...so is there a way to access a hazelcast Map via perl?
Or, in worst case, must I write a thin hazelcast client in java, and call that from perl?
Thanks
Steve
I'd suggest looking at Cache::Memcached as this post to the hazelnut google groups seems to imply that someone else has already done this using this module.
For other solutions, you could continue searching on cpan for Memcache. Or for a non distributed solution, can just go with the core library Memoize.
If there a memcached client for Perl? If so you can use the memcached protocol to connect to Hazelcast.
Chris
Hazelcast could be used through its REST Api so you need a JVM with Java library to support this feature.
Related
I want to access Neo4j db concurrently through a rest client in java.
I have already found two clients neo4j-rest-graphdb 2.0.1 and neo4j-jdbc 2.3.2 .
Since first one is no longer maintained I'm afraid to go with it.
Can someone please tell me what is the best java rest client for Neo4j which support concurrent access?
I think what you're looking for is Neo4j-OGM
Neo4j OGM is a fast object-graph mapping library for Neo4j, optimised for server-based installations and utilising Cypher via the transactional HTTP endpoint.
It's created and maintained by Neo4j team.
Concurrency is managed by Neo4j itself, you can use any client without worrying for concurrency problem.
Can someone point me to example of Java code that can work both with Memcached server and Couchbase server. If i understand correctly one can use spymemcached for communicating with both server. Does that mean i can use same code to connect(obviously using different url) get and put values to them or there are some differences?
Any particular reason to use the memcached protocol directly?
The best practice when working with Couchbase is to use the Client SDK (many languages are supported as you can see here http://www.couchbase.com/develop , including Java) ?
The reason why it is better to use the SDK (and for the same reason you have to use Moxi) is because to be able to support the clustering from your application.
You client SDK will direct the operations to the correct cluster nodes, but also the cluster map will automatically be updated when you add new nodes (or when nodes are failing).
The Java SDK tutorial will guide you through the different steps of developing an application using Couchbase:
- http://www.couchbase.com/docs/couchbase-sdk-java-1.1/tutorial.html
So, can you use the Java client SDK?
According to the couchbase documentation it support textual memcached protocol. So you can use any of the available java memcached client and reuse the same code used for memcached. Couchbase supports memcached protocol only through moxi.
In one of our recent projects, we have decided to use a message based solution to integrate an existing .Net app to a new JAVA based application. There is a requirement to not use a Application Server. So I am trying to look into some alternative options. Currently we are planning to use ActiveMQ as the JMS provider. Also the Java application needs to interact with an backend database. So, when trying to figure out options, I found that the Spring framework would be quite helpful. It appears that Spring may need some additional components (e.g, Atomikos) to provide transaction support for JMS & JDBC operations.
I am trying to limit the user of additional components as much as possible.
So, Is this the right approach to use ActiveMQ with Spring. If so, can I just use the built-in transaction module available in Spring to support transactions?
Any advice would be very helpful?
Leo
Use WebSphere MQ .NET interface (.NET native or XMS .NET) for sending/receiving messages from your .NET application. At the Java app end use MQ JMS interface. MQ JMS interface supports two phase commit, so you can synchronize your message gets and database updates.
Keep the integration through MQ and WS. More tight coupling may lead to problems and complexity.
I'd go with a messagequeue that has good .NET and Java clients - e.g. RabbitMQ That builds on AMQP. As well as serialization technology that has good cross-language capabilities (Thrift, Protocol-buffers etc.)
So here it is that BlazeDS will totally play on GAE
BlazeDS Version: 3.2.0.3978 Status:
COMPATIBLE To workaround an
EMFException thrown by
flex.messaging.io.amf.AbstractAmfInput,
follow Martin Zoldano's workarounds at
http://martinzoldano.blogspot.com/2009/04/appengine-adobe-blazeds-fix.html.
You will need to enable sessions to
get BlazeDS working.
But I wonder does it mean that messages from the server to the client, server push notifications from BlaseDS (I mean we connect to server from flex client but do not require data and server sends data to us when it wants), and BTW does any one know where to get a tutorial on doing that (Flex + BlazeDS)?
Are there any more features of Blaze v 3.2 that are under question?
well i recently try a flex-blazeds app on google plattform and it doesnt works. I found a guide that fix blazeds to run on gae, u should try it. For a basic tutorial of messaging-services in blazeds u should look a this asotto.blogspot.com/ ,
Messaging does not work, unless if you are lucky enough to have all the consumers/producers registered on the same machine (highly improbable when you have a decent traffic).
If you want to understand why, you need to read the developer guide, clustering sections. Basically the whole pub/sub graph+messages queues is kept distributed on the cluster, and the machines are using JGROUPS for communication.
Obviously, it will not work on GAE (the machines allocated by Google will don't know one of each other, and you can lose messages).
With the official implementation of BlazeDS version 4 you have duplicated session problems, because of the GAE clustering mechanism.
I need to connect my .Net application to somebody else's JMX agent. I've read that this is simply not the done thing and I should use soap or practically anything else. As this is just not going to happen, are there any libraries or interop techniques out there that can help me? I'm only interested in the simple things like invoking a remote operation or returning a string result.
.NET is really not the technology to use to talk to JMX. JMX is a builtin standard that is part of Java but is pretty specific to running in Java. I would assume that you cannot control the application you are trying to consume since you indicate you are trying to use someone else's JMX agent.
In that case, you might want to consider writing your application or part of it in Java. That is the best way to get access to the JMX. If that is not an option you do have a few things you could look into:
1) Check to see if the application you are connecting to can expose the data as something other than JMX. It is usually not hard to allow access via web services to the same data.
2) Write a small Java wrapper that talks to the JMX server and exposes web services. This allows you to query the web services which in turn go over JMX.
3) There are other agents that JMX has to allow it to talk with different technologies. You could use something like the SNMP agent and use SNMP traps from .NET. More information on that can be found here: http://java.sun.com/javase/6/docs/technotes/guides/management/snmp.html
If you start up an HtmlAdaptorServer - you could just use the URLs to invoke JMX methods using standard HTTP calls.
I've done this in the past from Perl as part of a system administration task. Its not pretty and its unmaintainable if the JMX interfaces are changing a lot. But.. if you need a quick and dirty hack - this is it!
The Web Services Connector for Java Management Extensions (JMX) Agents and the reference implementation ws-jmx-connector would be my choice. JSR 262 will provide a new opportunity for cross-platform/cross-language enterprise integration projects, but development unfortunately has slowed down.
It would only require some SOAP calls to invoke all operations of the JMX management interface, IIRC even including callbacks/notifications.
You can do this with IKVM. It is a Java Byte Code to .Net CLR compiler and works just fine with JMX.