Polymorphic Cache Design for Near-Threshold Operation

Download Presenatation
Polymorphic Cache Design for Near-Threshold Operation
Slide Note
Embed
Share

This study introduces Archipelago, a polymorphic cache design enabling robust near-threshold operation by matching power consumption and utilization, addressing bit-error rate challenges, and minimizing overheads in high-power mode.

  • Cache design
  • Near-threshold operation
  • Power consumption
  • Bit-error rate
  • SRAM failures

Uploaded on Mar 17, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. MicroProfile Reactive Streams: Control the Streams The Java 9 Flow API provides Reactive Streams providers a common interface, but manipulating and controlling streams still requires use of the underlying Flow implementation library, such as Akka Streams, RxJava, or Reactor. This session introduces the MicroProfile Reactive Streams specification, which provides application developers the standardized APIs to manipulate and control streams. It then shows by example the refactoring of a monolith application to create microservices that use MicroProfile Reactive Streams, demonstrating how the specification makes it easy to write code independent of the specific streams library. Gordon Hutchison, Developer, Open Liberty, IBM 1

  2. MicroProfile Reactive Streams: Control the Streams The Java 9 Flow SPI provides Reactive Streams providers a common interface, but manipulating and controlling streams still requires use of the underlying Flow implementation library, such as Akka Streams, RxJava, or Reactor. This session introduces the MicroProfile Reactive Streams specification, which provides application developers the standardized APIs to manipulate and control streams. It then shows by example the refactoring of a monolith application to create microservices that use MicroProfile Reactive Streams, demonstrating how the specification makes it easy to write code independent of the specific streams library. Reactive Streams Creation https://github.com/reactive-streams/reactive-streams-jvm/pull/1 Reactive Programming with JDK 9 Flow API https://community.oracle.com/docs/DOC-1006738 2

  3. MicroProfile Reactive Streams: Control the Streams Why do we care about Reactive Streams? Traditional Consistency Atomic Monolith Consistent Transaction Isolated Durable DB 3

  4. MicroProfile Reactive Streams: Control the Streams Why do we care about Reactive Streams? Distributed Consistency Atomic XA Distributed Transaction Consistent Isolated Durable DB DBDB 4

  5. MicroProfile Reactive Streams: Control the Streams Why do we care about Reactive Streams? Polyglot Microservices Atomic Consistent No Single Coordinated Global State Isolated Durable 5

  6. MicroProfile Reactive Streams: Control the Streams Why do we care about Reactive Streams? CAP Theorem Polyglot Microservices Consistency Atomic Wait Monolith Consistent CP CA Isolated Partitioning Tolerance (network/node loss) AP Availability Durable Eventual Consistency 6

  7. MicroProfile Reactive Streams: Control the Streams Why do we care about Reactive Streams? Architectural Trend Polyglot Microservices One Global-State. A stream of Events known to have occurred: Eventual Consistency Event Sourcing CQRS etc. Reactive Streams are a great programming model for Events 7

  8. MicroProfile Reactive Streams: Control the Streams The Java 9 Flow API provides public interface Publisher<T> { public void subscribe(Subscriber<? super T> s); } public interface Subscriber<T> { public void onSubscribe(Subscription s); public void onNext(T t); public void onError(Throwable t); public void onComplete(); } public interface Subscription { public void request(long n); public void cancel(); } public interface Processor<T, R> extends Subscriber<T>, Publisher<R> { } Publisher Subscriber subscribe( ) Subscription onSubscribe ( ) request(3) onNext onNext onNext onError cancel onComplete 8 8

  9. MicroProfile Reactive Streams: Control the Streams The Java 9 Flow API provides Simple to understand. Publisher No method returns any value - no need to block. Subscriber subscribe( ) All domain Types occur as generics. Subscription onSubscribe ( ) The interface is applicable to Web-endpoints as database stores. The flow control is individual to a single client request(3) onNext(T) onNext(T) onNext(T) onError( x ) and data pull requests chain transitively giving cancel onComplete reactive back pressure? 9 9

  10. MicroProfile Reactive Streams: Control the Streams a common interface But Do all the concerns of: Publisher Subscriber subscribe( ) Topic Namespace and Discovery (per Publisher) Stream creation and subscription storm Business Logic Error Handling Flow Control Termination Subscription/Cancelation Running the Pub-Sub state machine (43 rules in Reactive Streams Spec) Subscription onSubscribe ( ) request(3) onNext(T) onNext(T) onNext(T) onError( x ) cancel onComplete Really belong to a single class or a single application programmer? 10 1

  11. MicroProfile Reactive Streams: Control the Streams a commoninterface But Do all the concerns of: Publisher Subscriber subscribe( ) Topic Namespace and Discovery (per Publisher) Stream creation and subscription storm Business Logic Error Handling Flow Control Termination Subscription/Cancelation Running the Pub-Sub state machine (43 rules in Reactive Streams Spec) Subscription onSubscribe ( ) request(3) onNext(T) onNext(T) onNext(T) onError( x ) cancel onComplete Really belong to a single class or a single application programmer? 11 1

  12. MicroProfile Reactive Streams: Control the Streams but manipulating and controlling streams requires? And how much does this help a system be truly reactive, say, as per the Reactive Manifesto ? Message Driven? Java method calls?? Responsive Elastic Resilient Elastic? flow control prevents the stimulus for scaling out?? Message Driven Resiliency? a chain of user implementations?? Responsive? subscriber load balancing subscriber pull rate interference request(>1) and actual bandwidth? 12 1

  13. MicroProfile Reactive Streams: Control the Streams the use of the underlying implementation library. An elastic architecture must handle many concerns over and above those handled by the reactive streams Flow pub-sub interface. Much of what is in reactive streams Flow API is not really the concern of application logic. Because of this, implementors usually offer extensions Spring: Lightbend: RxJava: (RS,Operators,++.) These aim to simplify the application programming model and integrate better with concerns like thread handling, scaling, routing etc. (Flux/Mono: Encoder/Decoder/Handlers/SDOs (Sources/Flows/Syncs/Graphs 1

  14. MicroProfile Reactive Streams: Control the Streams like Akka Streams, RxJava, or Reactor Java 9 java.util.concurrent.Flow ? Akka Only a core but in JDK! No operators No platform value add Reactor RxJava How to build towards a Reactive Architecture without vendor/platform lock in? org.reactive-streams plus vendors added value on top e.g. Operators, Data Objects https://github.com/oracle/helidon/blob/master/pom.xml https://www.reddit.com/r/java/comments/5ooqoo/which_rx_framework_to_use/ 1

  15. MicroProfile Reactive Streams: Control the Streams This session introduces the MicroProfile Reactive Streams Specification. How to work towards reactive microservices in a vendor neutral manner? Higher Level Abstractions Microservice A Microservice B Simple Business Logic MP Reactive Messaging Event Driven Beans Event Driven Beans enables MP Reactive Streams effort is split MP Reactive Streams Operators Reactive Streams Reactive Streams Java Client Java Client existing drivers >IIIIIIIIIIIIIIIIIIIIIIIII Events IIIIIIIIIIII> 1

  16. MicroProfile Reactive Streams: Control the Streams A Standard API MP Reactive Streams Operators Specification A fluent API - concise, easy to use and read: one example ReactiveStreams.fromIterable( list ) .via(processor) .filter( e -> keep(e) ) .to( database ) .run() create a stream description, then run it. A builder based API build up a stream description as data and the system can interject in what is then run (fusion, instrumentation etc.) A porous API to interoperate with existing software to and from Reactive Streams, Iterable, CompletionStage, Collector etc. 16

  17. MicroProfile Reactive Streams: Control the Streams for manipulating and control streams https://github.com/eclipse/microprofile-reactive-streams/tree/master/api ReactiveStreams ReactiveStreamFactory Builders Graph CompletionRunner ReactiveStreamsEngine Publishers:Processors:Subscribers:Operators ReactiveStream(Flow) CompletionStage 17

  18. MicroProfile Reactive Streams: Control the Streams for manipulating and control streams ReactiveStreams ReactiveStreamFactory static factory methods Builder World Bootstrap Stream PublisherBuilder ProcessorBuilder SubscriberBuilder 18

  19. MicroProfile Reactive Streams: Control the Streams for manipulating and control streams Builders Graph Operators Fluent API Stream Value Adds Common Functions (like pre-canned, synchronous Processors) 19

  20. MicroProfile Reactive Streams: Control the Streams for manipulating and control streams Filters filter distinct limit skip takeWhile dropWhile Peeks onError Connections to via Transforms Errors onErrorResume onErrorResumeWith onErrorResumeWithRsPublisher map flatMap flatMapRsPublisher flatMapCompletionStage flatMapIterable Completions foreach ignore cancel reduce findFirst collect toList Operators Common Functions 20

  21. MicroProfile Reactive Streams: Control the Streams for manipulating and control streams Filters filter distinct limit skip takeWhile dropWhile Peeks onError Connections to via Transforms Errors onErrorResume onErrorResumeWith onErrorResumeWithRsPublisher map flatMap flatMapRsPublisher flatMapCompletionStage flatMapIterable Completions foreach ignore cancel reduce findFirst collect toList Operators Common Functions 21

  22. MicroProfile Reactive Streams: Control the Streams A Standard API for manipulating and control streams CompletionRunner ReactiveStreamsEngine CompletionStage 22

  23. MicroProfile Reactive Streams: Control the Streams shows by examples ReactiveStreams.fromPublisher( src ).to( db ) ReactiveStreams.fromIterable( list ).toList() ReactiveStreams.of( 1,2,3 ).map( Object::toString ).toList() // (T ) ReactiveStreams.fromPublisher( src ).filter( i -> ok( i) ).to( database ) ReactiveStreams.fromIterable( list ).via(processor).filter( e -> keep(e) ).to( database ).run() ReactiveStreams.generate( supplier ).limit( 100 ).foreach( consumer ) ReactiveStreams.fromPublisher( p ).peek(nosy::look).buildRs() // Can be used anywhere an o.r.s.Publisher can including in other libraries. 2

  24. MicroProfile Reactive Streams: Control the Streams The refactoring of a monolith application to Microservices using MicroProfile Reactive Streams Operators Over to IDE for code discussion 2

  25. MicroProfile Reactive Streams: Control the Streams demonstrating how the specification makes it easy Easy to use: From example: Fluent API Easy to read/write microservice composition with few lines of code Stream from Iterable no need to worry about Publisher handling subscriptions/errors etc. Use of Operators no need to write a Processor for simple tasks. 2

  26. MicroProfile Reactive Streams: Control the Streams Write code independent of the specific streams library. MP Reactive Streams Operators Specification End goal is user annotates simple methods container creates and manages the Reactive Streams: @Incoming(TOPIC-A) @Outgoing(TOPIC-B) @Outgoing(TOPIC-A) @Incoming(TOPIC-B) storeOrd( Order O ){ } processOrd( Order o){ } ordersIn( Order o ){ } Easy To Use Annotations Fluent Functional API Underlying mechanism ProcessorBuilder. SubscriberBuildler. PublisherBuilder to() run on JEE managed executor via() 26

  27. MicroProfile Reactive Streams: Control the Streams Where are we now? MicroProfile Reactive Streams Operators Spec is almost finished. MicroProfile Reactive Messaging Spec is ongoing. Join in! https://groups.google.com/forum/#!topic/microprofile (search for calendar for hangouts) https://github.com/eclipse/microprofile-reactive-streams https://github.com/eclipse/microprofile-reactive-messaging https://github.com/OpenLiberty 2

  28. MicroProfile Reactive Streams: Control the Streams Where are we now? Feel free to contact me: Gordon.Hutchison@gmail.com www.linkedin.com/in/gordon-hutchison https://github.com/hutchig or stop me for a chat. Also: Feel free to join the IBM Java devs on Wednesday after the Community Keynote for some drinks and video games at the Coin-Op Game Room, 508 4th St, San Francisco, CA 94107 2

  29. MicroProfile Reactive Streams: Control the Streams Where are we now? Many thanks to: James Roper * Clement Escoffier * Matthias Wessendorf Anthony Vanelverdinghe Ot vio Santana 2

More Related Content