开发者

Need a cache which is shared between C++, Java and .Net Applications

Is there a caching solution which works with C++, .Net and Java all accessing and populating same data in cache? (Data is composed of simple strings only)

Longer version:

I have 4 applications which work on different areas of a problem. Two of them are developed in C++, one is a java desktop application, and another is a C# application using .Net 3.5.

Curr开发者_JAVA百科ently they get data individually in their own special ways from same source (a web-service). Programs use this data and instantiate and populate other data structures (read: simple strings using separators) which are also used by other applications.

Currently it is done through (local/remote) sockets between individual programs. The problem is that, the consumer of a specific information caches the results provided by another program for later use in its own memory. The producer also stores it in its own memory to give to another program if it requires, and so on and so on, and in the end I end up with same information copied in every program's memory.

I'm thinking if there is a middle layer of, say a cache, and every program populated and accessed the data in that cache, it'd solve memory issue. Also it'd solve the problem of every application making queries to data source for same data. I'd then have one program populating input data and others working on it. Is there any caching solution which solves this?


Memcached works fine across independent applications.


You should have a look at Gigaspaces datagrid ... http://www.gigaspaces.com/datagrid


IBM's WebSphere eXtreme Scale has APIs for Java and also REST APIs that can be used by .NET apps and by C++. This product (it used to be called ObjectGrid) has been around for 6 years and is on Release 8.5. Language APIs for C# and C++ are "in the works".


depending on how often this data is updated / accessed you may want to look at using exactly what you suggested (middleware). Tibco offers the concept of a tibcache to store data that can later be retrieved by many client applications. Its using in many high frequency trading applications and provides good access times but obviously not as good as a literal in memory cache.


you could create a wrapper for each language that interacts with a flat file or key/value database. i'd recommend Tokyo Cabinet. It has bindings floating around the net for several languages

Tokyo Cabinet performance examples: http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/


For such a simple use case, memcached would likely work. It has Java, C/C++ and C# clients.

If you're looking at more advanced use cases (anything beyond just "get and put"), then check out an in-memory datagrid (IMDG) solution, such as Oracle Coherence. There's a summary of the In-Memory Data Grid market by Gartner called "Competitive Landscape: In-Memory Data Grids". You can see a copy at: http://www.gartner.com/technology/reprints.do?id=1-1HCCIMJ&ct=130718&st=sb

For the sake of full disclosure, I work at Oracle. The opinions and views expressed in this post are my own, and do not necessarily reflect the opinions or views of my employer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜