Thursday, February 26, 2015

2-26-15

starting to read/understand 
QBit Microservices using Service Workers and sharded service workers

starting to read/understand 
Using QBit Java microservice lib with Spring Boot


starting to read/understand
QBit Microservice Java Lib Working With CallBacks and Java 8 Lambda expressions


----------------------------------------------------------

Pooling is a resource management term that refers to the grouping together of resources (assets, equipment, personnel, effort, etc.) for the purposes of maximizing advantage and/or minimizing risk to the users. The term is used in many disciplines.



Consumer method represents a function that accepts a single argument of an arbitrary type and produce no result.



Dynamic dispatch is often used in object-oriented languages when different classes contain different implementations of the same method due to common inheritance. For example, suppose you have classes A, B, and C, where B and C both inherit the method foo()from A. Now suppose x is a variable of class A. At run time, x may actually have a value of type B or C and in general you can't know what it is at compile time.

With static dispatch, a method call x.foo() will always refer to the implementation of foo() for class A because static binding only looks at the declared type of the object. With dynamic dispatch the language will determine the type of the value of x at run-time and call the version of foo()that is associated with whatever type the value has, whether A, B, or C.
-----------
You can use Spring Boot and QBit together. You could configure QBit to work with/in Spring MVC, or you can just use QBit as the servlet that handles requests.
Remember this about QBit. It runs standalone with Jetty or Vertx. It can run in any Servlet container.



To really grasp QBit, one must grasp the concepts of a CallBack and queues. A CallBack is a way to get an async response in QBit from a microservice. You call a service method and it calls you back. This also covers when to handle @QueueCallback for notification of queue empty, queue hit limit, and queue started a new batch

RecommendationService is our CPU intensive service. will be the recommendation engine. It our hypothetical example RecommendationService is very CPU intensive. It has to iterate through products and user data and pick a match. It is a classic N+1. In our example, we do all of this real time based on the latest user activity, to the last second. What page did that just view? What product did they just bookmark? What product did they buy? What product did their friends buy? What product are people in their same demographic buying now. This is real time analytics. This does not mean that there is not machine learning or Hadoop batch jobs churning data some where. But the churned data is mixed with the data science, pre-chewed caches and counters, and up to the second user activity to make a decision based on data in memory and historic data (blended).RecommendationService is the tip of the ice-burg, but it is brute force, exhaustive and fast.


UserDataService is our heavy IO service. As much as we would like to, we do know which RecommendationService node a user might land on we can't if we are truly elastic. Are they using an XBox on the west coast, an iPhone in Hawaii, when/how will they hit our recommendation engine who knows. UserDataService manages editing, backup, and syncing user data. UserDataService keeps most users in-memory and also manages replicating and storing user data.

No comments:

Post a Comment