1 / 35

JSR 350 State Management

Overview and update Pete Raymond. JSR 350 State Management. Overview. Purpose of this presentation Background JSR Requirements Key concepts Relationship to other standards/approaches Example API Demo Timeline Q & A. Purpose. Raise awareness of JSR-350 State Management

alida
Download Presentation

JSR 350 State Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview and update Pete Raymond JSR 350 State Management

  2. Overview • Purpose of this presentation • Background • JSR Requirements • Key concepts • Relationship to other standards/approaches • Example API • Demo • Timeline • Q & A

  3. Purpose • Raise awareness of JSR-350 State Management • Seek feedback on concepts and usage

  4. Background • Standard formed through JCP (2.8  2.9) • Oracle lead (Mitch Upton), participation from Red Hat, IBM and independents • Expert group activated April 2012 • Some existing proprietary solutions in WebLogic, Tomcat and JBoss

  5. Requirements • “…develop an API that applications and JavaEE containers can use to offload the responsibility of state management into third party providers with different quality of service characteristics” (JSR) • Standardize existing APIs

  6. Use Cases • Mobile - cross platform state handling • Integration - Transfer of state between platforms • Capability based provider querying • Transient data e.g. session state • Non relational data e.g. JSON, XML, JavaScript

  7. Why State Management Standard and not… • This slide needs more • JPA • Relational • Persistent • Proprietary APIs • Reuse • Ease of use • NoSQL • ?

  8. Design Goals • Store and retrieve state independent of mechanism • Modular and consistent implementation • Capability based matching of client and provider • Support innovation and the cloud • Easy to use interfaces – user, provider, platform

  9. API to Multiple Providers JEE Client JSE Client State Management API Built-in Provider Custom Provider 3rd party Provider

  10. Key Concepts • State (State Container) • State Connection Factory • State Connection • State Container • State Map • Capability

  11. State • Unit of data • Uniquely identified within a scope • Persistent for a business period • Used by web apps, web services, JSF, CDI • Currently implemented via in memory, file, database, cluster

  12. State Connection Factory • Create one or more State Connections based on required capabilities • Associated to single provider • Typed e.g. Java class (…probably)

  13. State Connection • Connection to state management services provided by some provider • Expose capabilities • Contains configuration • Controls the transaction – either local or distributed using JTA • Use directly or to get a StateMap

  14. State Container • Container for a user-defined state value that allows a State Management provider to present and track system-level details about the value • An instance of State contains a single user-specified value

  15. State Map • Exposes only entries with a given key and value type in StateConnection • Convenience interface - clients deal directly with user-specified key and value types, no need to see containing structures such as Key and StateContainer • Contains: • globally unique key • value of a user-defined type • tracking information • Key • User defined + GUID • Values • Java type (e.g. Person class) • Streams? • XML?

  16. Capability - QoS • Behaviour offered by a provider • Durability • Transactions • Isolation and concurrency control • Supported by configuration • Described by a unique name

  17. State Classes State Management Registry State Connection Factory 1 0..* 1 0..* State Connection 1 0..* 1 State Container 0..* 0..* State Map 1

  18. Getting a Connection State Management Registry Client Application State Connection Factory State Connection Find State Connection Factory Create Get State Connection Create State Connection

  19. Using a StateContainer State Container Client Application Key Dog State Connection new (“fido”, “Sheperd”) createKey(fido.getUniqueName(), String.class, Dog.class) create fidoKey Store put(fidoKey, fido) create StateContainerfidoState get(fidoKey) Retrieve fido copy

  20. Using a StateMap State Map Client Application Dog State Connection new (“fido”, “Sheperd”) getStateMap(String.class, Dog.class) create Store StateMapdogMap put(fidoKey, fido) get(fidoKey) Retrieve fido copy

  21. Standards View 350  347 (107) Client State Management API (350) Data Grid API (347)

  22. Standards View 347  350 Client Data Grid API (347) State Management API (350)

  23. Standards View 350 &347 Client State Management API (350) Data Grid API (347) State Management API (350)

  24. Roles • Provider • Implement the specification • Innovate with new capabilities • Administrator / Developer • Configure the state connection factory • Make a State Connection available • Developer • Use State Connection and State to accelerate development

  25. Positioning JSR-350 • Comparing state persistence: • Relational / SQL • Object • NoSQL • Target products • Application Server • Android

  26. Example - StateConnection

  27. Example - StateContainer

  28. Example – get/put StateContainer

  29. Get a StateMap

  30. put/get a Dog/Person

  31. Demo

  32. Design Debates • Typing • Strong versus weak • Is StateMap necessary / desirable?

  33. Next steps • Expected milestones • How to provide feedback

  34. Q & A

  35. Further Information • Java State Management Wiki http://java.net/projects/java-state-managemen • JavaOnepresentation http://java.net/downloads/java-state-managemen/2011-J1-Java-State-Management-v2.ppt • The spec http://www.jcp.org/en/jsr/detail?id=350

More Related