How to show Orchestrator, IBM MQ, Load balancer in Deployment diagram - deployment

I need to creat Deployment diagram using UML notation. Diagram has to show IBM MQ, Orchestrator,Load balancer and some data base.
Which elements from Deployment diagram I have to use?

These can all be represented using instances of Nodes and instances of Components. You might want to use stereotypes to add specificity if you feel the design context merits it.

Related

Horizontal Scalability with Drools

Knowing that drools work with in memory data. Is there a way to distribute horizontally on different drools instances to enhance performance when performing CRUD operations on rules, fact types, etc? I guess the instances would need to be on sync with each other in some way, so they all have the same data in memory or share in some way a knowledge base. I'm kinda new on drools and trying to research on a way to move a monolith on a cloud environment (gcp) so it can take advantage on load balancing, scaling, etc. Want to know if there is any feature on drools itself that supports this or if there is any way to implement this myself, thanks in advance for any information/documentation/use case on this matter.
Currently I haven't tried a way to do this, but my goal is to improve performance and availability by using automatic scaling or support multiple instances of my app.
I'm not sure what kind of "CRUD" you're doing on Drools (or how). But if you just want to deploy new rules (for example), then this is identical to pushing any data or application changes to your deployment in a distributed system -- either your nodes are gradually updated, so during the upgrade process you have some mix of old and new logic/code; or you deploy new instances with the new logic/code and then transition traffic to your new instances and away from the old ones -- either all at once or in a controlled blue/green (or similar) fashion.
If you want to split a monolith, I think the best approach for you would be to consider Kogito [1] and microservice architecture. With microservices, you could even consider using the Function as a service approach - having small immutable service instances, that are just executed and disposed. Kogito mainly targets Quarkus platform, but there are also some Spring Boot examples. There is also OpenShift operator available.
As far as sharing the working memory, there was a project in the KIE community called HACEP [2]. Unfortunately that is now deprecated and we are researching other solutions to make the working memory persisted.
[1] https://kogito.kie.org/
[2] https://github.com/kiegroup/openshift-drools-hacep
The term "entry point" is related to the fact that we have multiple partitions in a Working Memory and you can choose which one you are inserting into. If you can organize your business logic to work with different entry points you can process 'logical partitions' on different machines in parallel safely. At a glance drools entry points gives you something like table partitioning in Oracle which implies the same options.
Use load balancer with sticky sessions if you can (from business point of view) partition 'by client'
you question looks more like an architecture question.
As a start, I would have a look into the Kie Execution Server component provided with Drools that helps you to create microservice decisions based on Drools rulesets.
Kie Execution Server (used in stateless mode by clients) could be embedded in different pods/instances/servers to ensure horizontal scalability.
As mentioned by #RoddyoftheFrozenPeas , one of the problem you'll face will be the simultaneous hot deploy of new rulesets on the "swarm" of kieserver that hosts your services.
That would have to be handled using a proper devops strategy.
Best
Emmanuel

Visual mapping of interaction between kubernetes services

Given that Kubernetes doesn’t offer full visibility into how services interact with each other I want to derive and map services automatically. For eg as shown in the below diagram, how can we derive that the payment service interacts with the cart service and cart service interacts with catalogue and redis.
So far what I had tried is,
kubectl get services command - This command only gives the list of services but does not hint on any communication happening between the services.
Tried Kubeview -> This plots only the deployment architecture and gives a graphical representation but mapping between various services is not derived.
So what is the easiest way to derive information about services interacting with each other and what could be the data source for this information in Kubernetes?
We faced this as well when we were building Otterize -- we needed something to map "who is talking to who" in order to bootstrap our solution, but every tool seemed to be ill suited for the task of simply creating a "network map" without all sorts of stuff we didn't want. We ended up rolling our own, and open sourced it: https://github.com/otterize/network-mapper .
It's based on combining information from DNS queries (actually just query responses) as well as detecting open connections, which gives you an IP-level network map, and then adding a simple resolution heuristic to derive a logical name-level map. You can read more details in this blog post, by one of the guys who built the tool: https://otterize.com/blog/kubernetes-traffic-discovery .
Hope this helps!
You can consider linkerd or other similar tools which offer service Observability
A service mesh like Linkerd is a tool for adding observability, security, and reliability features to “cloud native” applications by transparently inserting this functionality at the platform layer rather than the application layer.
service-mesh
For example, in below screenshot you can see how gate-way service interact with another service
It will also show how the request is going, amount of request with inbound and outbound
So in your case,if payment app is part of mesh you will able to see the inbound and outbound for the service along with requests info.
linkerd-install-helm
Service meshes have three main goals around interservice communication:
Connectivity
Security
Observability

IBM Watson Natural Language Classifier

one simple question: how can I create more than one classifier within a instance of Natural Language Classifier using the beta toolkit?
I've asked that because I don't know how to upload and train a new classifier after I've just deployed one.
Thanks for the help.
Your question is about the Toolkit. You can manage your training data and classifiers by using the IBM Watson™ Natural Language Classifier Toolkit web application. The toolkit gives you a unified view of all the classifiers that are running in the same Bluemix service instance. So you need to create another classifier and use the toolkit to manage.
I think you can view this document, about Natural Language Classifier using Toolkit.
Obs.: The first classifier is free, but each other you will need to pay.
See the API Reference to use NLC.
As #Sayuri mentions above, use the Toolkit to manage your Classifiers.
Something to keep in mind that when you create the first NLC instance (the little box in Bluemix), this is called a service instance. Within this service instance, you can have up to 7 unique classifiers. If you need to create an 8th classifier, you will need to create a new service instance.

Are there design patterns that make it easy convert an internal (backend) service to an external (RESTful) service?

In designing a platform infrastructure, I am creating several services that are
used internally. These services might use binary protocol messages to exchange
information. Down the line, I may want to expose these services externally, as
a RESTful service over http.
Are there design patterns or techniques that can ease this process of
converting an internal service to an external one?
The usual way is to organize the software into logical layers according to Multilayered Architecture. More specifically, Service Layer design pattern described by Martin Fowler captures the essence what you are trying to achieve.
This way you will have an inventory of internal services that are then used from the upper layers e.g. user interfaces, REST gateways, web services etc.
In the book The Java EE Architect's Handbook Mr. Ashmore describes the same concept using the term deployment layer that sits on top of the service layer.

Code Generation for Deployment Diagrams

I know that there are tools which can be used to generate code for Class Diagrams and Statechart Diagrams but I wanted to know whether there is any tool that can be used to generate code for deployment diagrams as well.
No, there is no such tool. And the obvious reason is that a deployment diagram does not describe code, it describes a deployment structure, servers, components etc. Even though usually there are some scripts relevant with any deployment, several other actions are required as well when you deploy something (setting up servers, copying resources etc).
On the other hand, class diagrams and sequence diagrams describe structure and interactions of code artifacts. A class diagram describes class definitions. A sequence diagram describes a method of a class. This is why you can find tools that generate code from those types of diagrams.
There are also tools that generate code from state diagrams, but this is not a generic functionality. You can't generate code from any state diagram, because the elements of a state diagram do not correspond to specific code artifacts by definition. Only if a state diagram is defined in a specific context and then you have tools for code generation specific to this context.
Example: You describe the flow of screens in a UI as a state diagram with each screen represented by a state, and you have a tool that can convert this type of diagram to some type of UI code as web forms or JFrames.