Can I use RemoteClient to catch WrieBehind event with BackingStoreAdapter

nick

New member
#1
I have a service running on different machine from SOSS Server. Items get registered as "WriteBehind" but event seem to get lost.

What Am I missing, or these events can only be handled by programs running on the same server as SOSS Server itself?

Code in the program to insert value:
Code:
            Dim Cache As NamedCache = CacheFactory.GetCache("sceMarketplace")
            Dim sKey As String = "$" & input.Credentials.StoreID & "#" & marketplaceID.ToString()
            Dim policy As New CreatePolicy(TimeSpan.FromDays(2), False)
            policy.BackingStoreMode = BackingStoreAsyncPolicy.WriteBehind
            policy.BackingStoreInterval = TimeSpan.FromSeconds(10)
            policy.PreemptionPriority = ObjectPreemptionPriority.NotRemovable
            Cache.Insert(sKey, sKey, policy, False, False)
And the code from different program that should catch the "Store" event:
Code:
 _cache = CacheFactory.GetCache("sceMarketplace")
                Dim policy As New BackingStorePolicy()
                Dim adapter As New SCEBingLogic.cacheAdapter
                policy.EnableAsyncOperations = True

                adapter.storeAction = New Action(Of String)(AddressOf StartForced)
                _cache.SetBackingStoreAdapter(adapter, policy)
cacheAdapter class implements IBackingStore and works fine locally on my machine
 

admin

Administrator
#1
Yes, you can handle WriteBehind events on remote clients. ScaleOut StateServer (SOSS) provides a scalable event handling architecture to scale the throughput of event handling as the workload increases and servers are added to the store. Each SOSS server signals events to its registered client, and the events are distributed across all registered clients. (All clients should be able to handle events for any expiring object.) For these reasons, all servers need to have registered clients to handle events, and the client application needs to have at least as many active clients as there are ScaleOut servers.

When using remote clients, you can check to make sure that all SOSS servers have registered clients using the SOSS Management Console. The console shows this information in the Host Status tab (in the Remote Event Handler field). If there are more remote clients than SOSS servers, some remote clients will not handle events but will automatically take over if a client fails and handle events as necessary. This enables event handling to be highly available in addition to scalable.

If events, such as WriteBehind events, appear to be lost, the most likely reason is that there are not as many remote clients registered as there are SOSS servers. Note that you cannot predict which client will handle a particular event. Another explanation is that a different application is also registered for events for the same named cache and is intercepting the events.
 
Top