ActiveMQ persistence mode VS. Non-Persistence
#ActiveMQ
#Persistence
https://www.linkedin.com/pulse/activemq-persistence-mode-vs-non-persistence-touraj-ebrahimi
@javaCode☕️
#ActiveMQ
#Persistence
https://www.linkedin.com/pulse/activemq-persistence-mode-vs-non-persistence-touraj-ebrahimi
@javaCode☕️
Linkedin
ActiveMQ persistence mode VS. Non-Persistence
It this article I want to write about activemq and trade of between using persistence mode and non-persistence mode. As my experience each of them has its own cons and pros.
#WRK!
Do you want to benchmark your REST APIs.
I recently used WRK alongside with some LUA Scripts to Benchmark my REST APIs has developed in a micro-service project.
I suggest using it. it is faster than jMeter and needing less resources than it.
It is console base tool and you can run it easily on any remote server.
A little tricky to be used efficiently and you need to write LUA scripts for complex benchmarks; for e.g. authentication with your REST end-points and Posting complex JSON as request body and etc.
very Basic Example without LUA:
wrk -t10 -c100 -d10s http://localhost:9090/touraj_ebrahini.html
t: number of threads
c: number of connections
d: duration in seconds
—------------------------------------------------------------------------------------—
Testing with a Simple LUA Script:
wrk -t2 -c4 -d2s -s /opt/luawrk/test.lua http://localhost:9090/touraj/test/restapi/{path variable}
test.lua:
wrk.method = "POST"
wrk.body = "{'num': 24233,'name':'wrk_disp','list': [{'name':'contact1', 'num':234324},{'name':'contact2', 'num':234324}]}"
wrk.headers["Content-Type"]= "application/json"
wrk.headers["Authorization"]= "Basic wrkhdgreheydfgdmanksflol3Kbyedf="
wrk.headers["Cache-Control"]= "no-cache"
@javaCode☕️
Do you want to benchmark your REST APIs.
I recently used WRK alongside with some LUA Scripts to Benchmark my REST APIs has developed in a micro-service project.
I suggest using it. it is faster than jMeter and needing less resources than it.
It is console base tool and you can run it easily on any remote server.
A little tricky to be used efficiently and you need to write LUA scripts for complex benchmarks; for e.g. authentication with your REST end-points and Posting complex JSON as request body and etc.
very Basic Example without LUA:
wrk -t10 -c100 -d10s http://localhost:9090/touraj_ebrahini.html
t: number of threads
c: number of connections
d: duration in seconds
—------------------------------------------------------------------------------------—
Testing with a Simple LUA Script:
wrk -t2 -c4 -d2s -s /opt/luawrk/test.lua http://localhost:9090/touraj/test/restapi/{path variable}
test.lua:
wrk.method = "POST"
wrk.body = "{'num': 24233,'name':'wrk_disp','list': [{'name':'contact1', 'num':234324},{'name':'contact2', 'num':234324}]}"
wrk.headers["Content-Type"]= "application/json"
wrk.headers["Authorization"]= "Basic wrkhdgreheydfgdmanksflol3Kbyedf="
wrk.headers["Cache-Control"]= "no-cache"
@javaCode☕️
#Java
#Spring Boot
#Semantic UI
#Kalah Game
Kalah, also called Kalaha or Mancala, is a game in the mancala family imported in the United States by William Julius Champion, Jr. in 1940.
In youtube you can watch what has been developed for making KALAH game with Java, Spring Boot and Semantic UI.
I suggest Semantic UI as an alternative to Bootstrap that is very light wight, strong and feature-rich.
https://www.youtube.com/watch?v=nAedcao7p64&t=313s
@javaCode☕️
#Spring Boot
#Semantic UI
#Kalah Game
Kalah, also called Kalaha or Mancala, is a game in the mancala family imported in the United States by William Julius Champion, Jr. in 1940.
In youtube you can watch what has been developed for making KALAH game with Java, Spring Boot and Semantic UI.
I suggest Semantic UI as an alternative to Bootstrap that is very light wight, strong and feature-rich.
https://www.youtube.com/watch?v=nAedcao7p64&t=313s
@javaCode☕️
YouTube
kalah Game Developed By Touraj Ebrahimi
I have developed Kalah (Mancala) Game With #java #Springboot #SemanticUI.
This is two player version.
You can download or fork from my github and extend it. My Github: toraj58
For more information about Kalah game and its history you can refer to Wikipedia:…
This is two player version.
You can download or fork from my github and extend it. My Github: toraj58
For more information about Kalah game and its history you can refer to Wikipedia:…
#java
#kafka
#Prometheus
#Docker
#JMX
#Grafana
#metrics
I designed an Ecosystem for Monitoring Kafka base on metrics and JMX with Prometheus, Grafana, Docker and JMX Collector.
You can find document here:
https://www.slideshare.net/TourajEbrahimi/kafka-monitoring-and-metrics
@javaCode☕️
#kafka
#Prometheus
#Docker
#JMX
#Grafana
#metrics
I designed an Ecosystem for Monitoring Kafka base on metrics and JMX with Prometheus, Grafana, Docker and JMX Collector.
You can find document here:
https://www.slideshare.net/TourajEbrahimi/kafka-monitoring-and-metrics
@javaCode☕️
SlideShare
Kafka monitoring and metrics
Kafka monitoring and metrics - Download as a PDF or view online for free
#Composite_Design_Pattern
👉Problem
Application needs to manipulate a hierarchical collection of "primitive" and "composite" objects. Processing of a primitive object is handled one way, and processing of a composite object is handled differently. Having to query the "type" of each object before attempting to process it is not desirable.
@javaCode☕️
👉Problem
Application needs to manipulate a hierarchical collection of "primitive" and "composite" objects. Processing of a primitive object is handled one way, and processing of a composite object is handled differently. Having to query the "type" of each object before attempting to process it is not desirable.
@javaCode☕️
#Java_Interview_Question
134) Can you access the private method from outside the class?
Yes, by changing the runtime behaviour of a class if the class is not secured.
@javaCode☕️
134) Can you access the private method from outside the class?
Yes, by changing the runtime behaviour of a class if the class is not secured.
@javaCode☕️
#Java_Interview_Question
👉Java Networking Terminology
The widely used java networking terminologies are given below:
1️⃣IP Address
2️⃣Protocol
3️⃣Port Number
4️⃣MAC Address
5️⃣Connection-oriented and connection-less protocol
7️⃣Socket
@javaCode☕️
👉Java Networking Terminology
The widely used java networking terminologies are given below:
1️⃣IP Address
2️⃣Protocol
3️⃣Port Number
4️⃣MAC Address
5️⃣Connection-oriented and connection-less protocol
7️⃣Socket
@javaCode☕️
☕️JAVA Language Community
#Java_Interview_Question 👉Java Networking Terminology The widely used java networking terminologies are given below: 1️⃣IP Address 2️⃣Protocol 3️⃣Port Number 4️⃣MAC Address 5️⃣Connection-oriented and connection-less protocol 7️⃣Socket @javaCode☕️
1️⃣IP Address
IP address is a unique number assigned to a node of a network e.g. 192.168.0.1 . It is composed of octets that range from 0 to 255.
It is a logical address that can be changed.
2️⃣Protocol
A protocol is a set of rules basically that is followed for communication. For example:
* TCP
* FTP
* Telnet
* SMTP
* POP etc.
3️⃣Port Number
The port number is used to uniquely identify different applications. It acts as a communication endpoint between applications.
The port number is associated with the IP address for communication between two applications.
4️⃣MAC Address
MAC (Media Access Control) Address is a unique identifier of NIC (Network Interface Controller). A network node can have multiple NIC but each with unique MAC.
5️⃣Connection-oriented and connection-less protocol
In connection-oriented protocol, acknowledgement is sent by the receiver. So it is reliable but slow. The example of connection-oriented protocol is TCP.
But, in connection-less protocol, acknowledgement is not sent by the receiver. So it is not reliable but fast. The example of connection-less protocol is UDP.
6️⃣Socket
A socket is an endpoint between two way communication.
@javaCode☕️
IP address is a unique number assigned to a node of a network e.g. 192.168.0.1 . It is composed of octets that range from 0 to 255.
It is a logical address that can be changed.
2️⃣Protocol
A protocol is a set of rules basically that is followed for communication. For example:
* TCP
* FTP
* Telnet
* SMTP
* POP etc.
3️⃣Port Number
The port number is used to uniquely identify different applications. It acts as a communication endpoint between applications.
The port number is associated with the IP address for communication between two applications.
4️⃣MAC Address
MAC (Media Access Control) Address is a unique identifier of NIC (Network Interface Controller). A network node can have multiple NIC but each with unique MAC.
5️⃣Connection-oriented and connection-less protocol
In connection-oriented protocol, acknowledgement is sent by the receiver. So it is reliable but slow. The example of connection-oriented protocol is TCP.
But, in connection-less protocol, acknowledgement is not sent by the receiver. So it is not reliable but fast. The example of connection-less protocol is UDP.
6️⃣Socket
A socket is an endpoint between two way communication.
@javaCode☕️
#Java_Interview_Question
135) What is the difference between ArrayList and Vector?
1️⃣ArrayList is not synchronized.
Vector is synchronized.
2️⃣ArrayList is not a legacy class.
Vector is a legacy class.
3️⃣ArrayList increases its size by 50% of the array size.
Vector increases its size by doubling the array size.
@javaCode☕️
135) What is the difference between ArrayList and Vector?
1️⃣ArrayList is not synchronized.
Vector is synchronized.
2️⃣ArrayList is not a legacy class.
Vector is a legacy class.
3️⃣ArrayList increases its size by 50% of the array size.
Vector increases its size by doubling the array size.
@javaCode☕️
#Composite_Design_Pattern
👉Discussion
Define an abstract base class (Component) that specifies the behavior that needs to be exercised uniformly across all primitive and composite objects. Subclass the Primitive and Composite classes off of the Component class. Each Composite object "couples" itself only to the abstract type Component as it manages its "children".
Use this pattern whenever you have "composites that contain components, each of which could be a composite".
Child management methods [e.g. addChild(), removeChild()] should normally be defined in the Composite class. Unfortunately, the desire to treat Primitives and Composites uniformly requires that these methods be moved to the abstract Component class. See the "Opinions" section below for a discussion of "safety" versus "transparency" issues.
@javaCode☕️
👉Discussion
Define an abstract base class (Component) that specifies the behavior that needs to be exercised uniformly across all primitive and composite objects. Subclass the Primitive and Composite classes off of the Component class. Each Composite object "couples" itself only to the abstract type Component as it manages its "children".
Use this pattern whenever you have "composites that contain components, each of which could be a composite".
Child management methods [e.g. addChild(), removeChild()] should normally be defined in the Composite class. Unfortunately, the desire to treat Primitives and Composites uniformly requires that these methods be moved to the abstract Component class. See the "Opinions" section below for a discussion of "safety" versus "transparency" issues.
@javaCode☕️
👍1
☕️JAVA Language Community
#Composite_Design_Pattern @javaCode☕️
👉Structure
Composites that contain Components, each of which could be a Composite.
Menus that contain menu items, each of which could be a menu.
Row-column GUI layout managers that contain widgets, each of which could be a row-column GUI layout manager.
Directories that contain files, each of which could be a directory.
Containers that contain Elements, each of which could be a Container.
#Composite_Design_Pattern
@javaCode☕️
Composites that contain Components, each of which could be a Composite.
Menus that contain menu items, each of which could be a menu.
Row-column GUI layout managers that contain widgets, each of which could be a row-column GUI layout manager.
Directories that contain files, each of which could be a directory.
Containers that contain Elements, each of which could be a Container.
#Composite_Design_Pattern
@javaCode☕️
👍1