Distributed Cache Architecture
-
17 Agustus 2008 16:17
Can I configure velocity to be part of my applications's process space? If I have to go across process boundaries, in some sense it defeats the purpose of cache. This is a very exciting product, but it will be great if I can use my data from within
my process boundary with plumbing necessary to update the date from inside and from outside.
What is the mechanism used for synchronizing data within the cluster?
Semua Balasan
-
18 Agustus 2008 7:41
Embedded topology allows you to run Velocity as part of your application's process. Here the Velocity DLLs would be embedded into the application. We don't have this functionality in CTP1; but this is certainly in the plans.
In CTP1 there is no availability, so there is no synchronization. We are working on this in CTP2.
-
18 Agustus 2008 23:05Moderator
There are two levels of embedding - embedding all of Velocity - meaning you application is part of the velocity cluster or embedding the client portion of velocity. In the latter case, we have a notion of the "local" cache where frequently accessed data is kept in your process boundary and kept updated with the backend cache service. This local cache is already present in CTP1 and in CTP2 we will make it synchronized using notifications.
The client-server case is appropriate for the cases where your application may restart frequently or the cache needs to be shared by multiple applications. The local cache bridges the gap between the true embedded model ( where there is no separate server instances of the cache running ) and the cache-server models.
-
19 Agustus 2008 22:28
I am not sure about specific applications velocity is intended for. I come from high performance trading systems background. It is essential to avoid or eliminate IPC and unmarshalling for "get" operations. They will have to be used
for synchronization between nodes and for "put" operations. I guess I am looking for a topology where in I can access all
data I need from within my process space ( extra work needed for cache "misses" is understandable). It will have to be
synchronized without programmatic intervention wit appropriated configuration / attributes. I will have applications types using the same distributed cache on multiple machine - read only, read / write. Is this something that I can accomplish with current CTP or I have to wait for CTP2?
-
21 Agustus 2008 17:59
Sridhar,
I am currently exploring Velocity for a trading application as well. The only reason you would use an offline cache is for state management where disk access (aka DB) would be too slow. If you are talking about real-time applications (such as price tickers), a cache is just not the right thing to use. However, for state management (EMS/OMS applications), companies have used caches with with a lot of success. An IPC call doesn't add anywhere near the latency that disk access would, which is potentially the case with a database. Running the Velocity service on the same machine as your process would do the trick -- you don't need to load it inside your process. The IPC call probably only adds a few microseconds to the whole thing. The big latency would be the network hop, which again is nothing compared to the network hop followed by a disk access.
HTH,
Pat
-
14 Februari 2012 19:15
There are two levels of embedding - embedding all of Velocity - meaning you application is part of the velocity cluster or embedding the client portion of velocity. In the latter case, we have a notion of the "local" cache where frequently accessed data is kept in your process boundary and kept updated with the backend cache service. This local cache is already present in CTP1 and in CTP2 we will make it synchronized using notifications.
The client-server case is appropriate for the cases where your application may restart frequently or the cache needs to be shared by multiple applications. The local cache bridges the gap between the true embedded model ( where there is no separate server instances of the cache running ) and the cache-server models.
Is there any example on how I can use velocity embedded in an application. I tried using velocity without creating a cluster but it did not work for me.
Thanks you in advance.