You may want to consider relaxing the strict monoticity constraint for your counter. Many performance issues in distributed systems are caused by global synchronization points. Alternatives include: leasing, CRDT, snowflake, etc.
Anthony > On Jun 10, 2018, at 6:23 PM, wenxing zheng <[email protected]> wrote: > > Thanks to Swapnil for the information. > > As to the scenario, it's quite simple as we need to write to a table in > parallel but need to keep the id incremented in strict order and in strong > consistency. I am thinking to create a distributed lock provided by GEODE. > But didn't make it via the Region interface. With the deprecation of Global > scope, creating the DistributedLockSerivce with the given name is the only > way to lock distributedly? > > On the data colocation, I have: 2 servers, a REPLICATE region, a > PARTITIONED_REDUNDANT region with copies in 1. Without explicitly invoking > the setColcatedWith, will it be in data colocation? > > Kind regards, Wenxing > > On Fri, Jun 8, 2018 at 10:48 PM, Swapnil Bawaskar <[email protected] > <mailto:[email protected]>> wrote: > Hi Wenxing, > Global scope type has been deprecated. Can you please describe your scenario? > From what I have seen, creating a region as REPLICATE and then performing a > transaction should give better performance. > There is also a DistributedLockService > <http://geode.apache.org/releases/latest/javadoc/org/apache/geode/distributed/DistributedLockService.html> > in Geode that may be of help. > > For transactions on partitioned regions, you have to ensure data colocation > <http://geode.apache.org/docs/guide/16/developing/transactions/data_location_cache_transactions.html>. > > On Fri, Jun 8, 2018 at 6:56 AM wenxing zheng <[email protected] > <mailto:[email protected]>> wrote: > Sorry to append another question: > How to embed an update on the partitioned region in a transaction? > > As I met with the exception with TransactionDataRebalancedException. > > Thanks again, Wenxing > > On Fri, Jun 8, 2018 at 5:55 PM, wenxing zheng <[email protected] > <mailto:[email protected]>> wrote: > Dear experts, > > I have met with a question related with transaction on GEODE version: > 1.8.0-SNAPSHOT. How to get the distributed lock with > Region.getDistributedLock as it seemed only support on GLOBAL scope type. But > from the gfsh or the API, we have no chance to create the region with GLOBAL > type since "as of 6.5 use Cache.createRegionFactory(RegionShortcut) > <http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Cache.html#createRegionFactory-org.apache.geode.cache.RegionShortcut-> > ". > > From the RegionShortcut definition, I can't find any descriptions related > with the GLOBAL scope type. > > Please help to shed some lights. > Thanks, Wenxing > >
