Presentation is loading. Please wait.

Presentation is loading. Please wait.

Baratine Building high-performing resource services.

Similar presentations


Presentation on theme: "Baratine Building high-performing resource services."— Presentation transcript:

1 Baratine Building high-performing resource services

2 Fast Resource Services In-memory services Batching CPU affinity/single-threaded Local persistent database Object Orientated Communication Resilience and Scalability Cloud/Failover Journaling Microservices

3 Microservice (noun) - ?

4 Baratine.io In-Memory Services

5 Baratine in the field

6 Multitasking Because we needed another word for “unable to focus on task at hand”

7 In-Memory Service Single threaded CPU affinity Batching Uninterrupted Performance

8 Batching Multithreaded: synchronized write() flush() synchronized write() flush() synchronized write() flush() Baratine: write() flush() Log Service Example Ex: TCP can send 100 bytes as fast as 1 byte Automatic batching! Where else can you get that?

9 Batching Single threaded Batching CPU affinity/single- threaded Uninterrupted Performance

10 Websocket (batched) = 500,000 r/s In-JVM messaging = 4,000,000 r/s Performance In Context Websocket (single) = 50,000 r/s

11 In-memory services Batching CPU affinity/single-threaded Resources Locally Owned Communication Resilience and Scalability Cloud/Failover Journaling Microservices Resources

12 Resources What are they? REST style URL-addressed service Objected Oriented: data + methods Auction Shopping Cart Atomic counter, list, queue /my- auction/23456

13 @ResourceService Def - Service that manages resources Each resource owned by one service Saved to local disk Replicated Partitioned by URL

14 Atomic Counter @ResourceService(“public:///counter/{_id}”) public class CounterServiceImpl { private long _id; private long _counter; @Modify public long incrementAndGet() { return ++_counter; }

15 @ResourceService asy nc

16 Store and retrieve resources > key-value store Async, implemented in Baratine services Journaled for performance & reliability Replicated Fast Local Database

17 Resources In-memory services Batching CPU affinity/single-threaded Resources Locally Owned Communication Resilience and Scalability Cloud/Failover Journaling Microservices

18 Using a Service? REST – For simple client (like Curl), Baratine provides a REST interface. Ajax RPC style – Simple RPC queries, can use a HTTP request where the payload is the query and the response is the result. WebSockets – when websockets is available, provides better performance HTTP long polling – as a WebSocket fallback, Baratine/JAMP can fallback to HTTP long polling. Protocols Python Nodej s Java ee PHP

19 Communicate! Jamp/Hamp JAMP (JSON Active Message Protocol)

20 Gateway Service Interfacing with existing data Analytics/ Archive: streaming data for later processing Loading data: using relational databases Examples: Hibernate / JPA, Hadoop, SAP, etc…

21 Resources In-memory services Batching CPU affinity/single-threaded Resources Locally Owned Communication Resilience and Scalability Cloud/Failover Journaling Microservices

22 Scaling & Failover Client Resource partitioning by URL Replicated Data Backup servers

23 Bartender Manages failover and scaling Baratine within a cluster Symmetrical, gossip protocol Heartbeat Service pod topology Cloud/Dynamic Server (EC2)

24 Service Journaling Saves inbox method calls Checkpointing Recovers on restart Replicated for failover

25 Services In-memory services Batching CPU affinity/single-threaded Resources Locally Owned Communication Resilience and Scalability Cloud/Failover Journaling Microservices

26 Overview 1.Key-value Store 2.Journal 3.Jamp 4.Bartender 5.Baratine File System 6.Service Registry 7.Web Server 7 MB (No external dependencies)

27 Amdahl’s Law Amdahl’s Law: The speedup of a program using multiple processors in parallel computing is limited by the sequential fraction of the program. For example, if 95% of the program can be parallelized, the theoretical maximum speedup using parallel computing would be 20× as shown in the diagram, no matter how many processors are used.

28 Serial & Parallel Partition resources for parallelism single CPU efficiencies CPU affinity Batching A simple way to build high-performing resource services The same hardware can handle 10x to 100x the number of requests, so you have less vertical scaling to manage. To put it simply: Do more with less.

29 Baratine Services Loosely Coupled Event-Driven Asynchronous Pub/Sub Non-Blocking AGILE!

30 Microservices In-memory services Batching CPU affinity/single-threaded Resources Locally Owned Communication Resilience and Scalability Cloud/Failover Journaling Microservices

31 Microservices Code that adheres to the principles of SOA Faster Development Less Hardware True Scalability Easier to debug Marton Abbott & Michael Fisher

32 Where are we now? Microservices vs SOA SOA 2.0 Domain Driven Design Reactive Manifesto Silo’d Development Synonyms… ? 2006! Steve Jones

33 Example Code Implementation Interfac e request (s)

34 Baratine Benefits Combining data + service = resource service Flexible REST/HTTP based communication - Do not need dedicated client library! Writing a non-blocking, asynchronous RPC service is as simple as writing a Java class. Can communicate with (Ruby, Go, C#, Java, Python, JavaScript, etc…). A simple way to build high-performing resource services

35 Example Code Server: Service Inbox batc h reque st Does not need to lock* Outbox reuse thread futur e wak e resul t (Blocking Integration)

36 Future(blocking) = 186,000 r/s In-JVM messaging = 4,000,000 r/s Performance In Context

37 Related Architectures No architecture specifically designed for Microservices

38 Related Architectures EJB, JPA, JSF, Jcache, Jax- RS ESB + Datagrid + Cache + NoSQL db + Asynch API Gridgain Redis MongoDB Terracotta Can integrate with Java EE

39 Baratine + Existing Browser/ Client Load Balancer MySQL File System App Server war Service UI Familiarity Deployable Maintainable? Testable Scalable? Cache

40 Transition… Beer Break!

41 BACKUP

42 Baratine Baratine is a new GPL distributed in-memory Java architecture for building high-performance web services. Baratine presents a unification of application and data within the same JVM in a single- threaded model that goes above and beyond caching and NoSQL databases. Its actor-based non-blocking architecture ushers in a new wave of agile microservices that can be quickly built to be inherently scalable. Baratine allows users to build new resilient services or integrate their current services into a platform that can be deployed to hundreds or thousands of servers.

43 Traditional Problems… Modify one => Modify all Long release cycles Code Complexity A/B, UI testing Overloaded IDE/Container DB synchronization Cache Coherency Migration Schema Unable to update one end without updating another

44 Decoupling legacy systems is not easy and still reliant around DB Try to avoid distributed transactions? Traditional Problems…

45 Architecture Details Performance -Single threaded + In- Memory Future(blocking) = 186,000 r/s Websocket remoting = 500,000 r/s Service messaging = 4,000,000 r/s Traditional (Queue): Ask queue for work Does 1 unit of work Ask queue for work … Baratine: Ask inbox for work Does 10 units of work Ask inbox for work … Needs to block (context switch)Does not need to block

46 Baratine In-memory services Batching CPU affinity/single-threaded Local persistent database Object Orientated Communication Resilience Cloud/Failover Journaling Microservices

47 1992 1995 2000 2003 2006 C+ + Jav a 2007 20092011 20132014 EJ B A HISTORY OF EVENTS

48 Traditional Architecture

49 Need to store and retrieve data > key-value store JVM restarts and you need a way to recover > Journal Need efficient communication across services > Jamp/ Web Server Management within cloud environment > Bartender Architecture …

50 Deployment in the cloud > Baratine File System Need to identify services > Service Registry 7 MB! Architecture Details

51 Baratine Baratine is a new distributed in-memory Java architecture for building high- performance web services. Baratine presents a unification of application and data in a single- threaded model that goes beyond caching and NoSQL databases. Its actor-based architecture ushers in a new wave of agile microservices that are built to be inherently scalable. Baratine allows users to build new resilient services or integrate their current services into a platform that can be deployed to hundreds or thousands of servers. Single-threaded in-memory services

52 Example Programs Real-Time National Debate Program Tailored Coupon App Authentication Clustered Performance Responsive Scalable Deployable Can be achieved with a Baratine


Download ppt "Baratine Building high-performing resource services."

Similar presentations


Ads by Google