geode - day 3
TRANSCRIPT
• Things you can do in Geode: • start/stop locator/server, shutdown, alter runtime… • describe member, regions, alter log level... • create/destroy region, indexes, disk stores, create
functions... • put/get data entries, querying….
• These actions can be classified using: • Resource: DATA, CLUSTER • Operation: READ, WRITE, MANAGE
• Start server: CLUSTER:MANAGE • List member: CLUSTER:READ • Create region: DATA:MANAGE • Region get: DATA:READ • Region put: DATA:WRITE
Security
3
• Define Roles using ResourcePermission tuples • Map users to roles
Security
4
public class SimpleSecurityManager implements SecurityManager { public Object authenticate(Properties credentials) throws AuthenticationFailedException; public boolean authorize(Object principal, ResourcePermission permission); }
• Integration with LDAP on Roadmap
• Built our own memory manager • Used sun.misc.unsafe • Memory allocated in 2GB slabs
• No GC Tuning • Avoid stop the world GC pause
• Scale the member vertically • Improve throughput
Off Heap
5
gfsh>startserver--name=server1--off-heap-memory-size=15g--lock-memory
gfsh>createregion--name=region1--type=PARTITION_REDUNDANT--off-heap
• Use off heap memory
• Allocate off-heap Memory
Off Heap
6
Off HeapJVM
RegionIndex
K V
• Primary store for Values only • Keys and RegionEntries still on Heap • Indices still on Heap
• Membership coordinator • Membership view • Member weight • Failure detection • Network partition threshold • Winning side - losing side
CAP
8
• Healing the network partition • Turn off network partition detection
• Why Tunable? • All apps don’t need consistency
(Even Banks*)
CAP
14
http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on-why-banks-are-base-not-acid-availability.html
• Active/Active not just Disaster Recovery • Other patterns
• Follow the sun pattern • Hub spoke • Star
WAN
15
WAN