geode - day 3

17
Day 3 Swapnil Bawaskar @sbawaskar (incubating)

Upload: swapnil-bawaskar

Post on 15-Apr-2017

47 views

Category:

Software


0 download

TRANSCRIPT

Day 3

Swapnil Bawaskar@sbawaskar

(incubating)

• Security • Off-Heap • CAP • WAN

Agenda

2

• 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

• Choose any 2 from: • Consistency • Availability • network Partition tolerance

CAP

7

• Membership coordinator • Membership view • Member weight • Failure detection • Network partition threshold • Winning side - losing side

CAP

8

Network Partition

9

Server

Client

Network Partition

10

Server

Client

Network Partition

11

Server

Client

Internal Network

Network Partition

12

Server

Client

Internal Network

Network Partition

13

Server

Client

Internal Network

• 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

Hands On

16

• Implement function to find the most popular domain

Hands On

17