24 March 2017

Analyzing WLS

A very (old) common question is how to analyze (stuck) WLS.

The first we need to do here is to take Heap and Thread Dumps.

Take several Thread dump and one heap dump (although the last one has an embedded thread dump), this will help to find out issues, OOM, connection leaks, recurrent garbage collector, etc.

jmap -dump:format=b,file=~/tmp/heap.hprof

kill -3

i.e.:

Last login: Thu Mar 23 17:57:43 on ttys002
hola$ ps -fea | grep -i weblogic
  501  6179  6178   0  4:04PM ttys001    0:00.00 sh /Users/German/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/startWebLogic.sh
  501  6180  6179   0  4:04PM ttys001    0:00.02 /bin/sh /Users/German/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin/startWebLogic.sh
  501  6225  6180   0  4:04PM ttys001    0:56.60 /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Users/German/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.policy -Xverify:none -Djava.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/endorsed:/Users/German/Oracle/Middleware/Oracle_Home/wlserver/../oracle_common/modules/endorsed -da -Dwls.home=/Users/German/Oracle/Middleware/Oracle_Home/wlserver/server -Dweblogic.home=/Users/German/Oracle/Middleware/Oracle_Home/wlserver/server -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server
  501  8061  7485   0 10:08AM ttys002    0:00.00 grep -i weblogic
[German@KDU ~]$ kill -3 6225
[German@KDU ~]$ kill -3 6225
[German@KDU ~]$ kill -3 6225
...
[German@KDU tmp]$ jmap -dump:format=b,file=/Users/German/tmp/heap.hprof 6225
Dumping heap to /Users/German/tmp/heap.hprof ...
Heap dump file created
[German@KDU tmp]$ 

16 March 2017

AWS productos canonicos

Productos básicos que sirve para armar un e-commerce en AWS:


Amazon EC2 Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.


Amazon CloudWatch Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. You can use Amazon CloudWatch to collect and track metrics, collect and monitor log files, set alarms, and automatically react to changes in your AWS resources. Amazon CloudWatch can monitor AWS resources such as Amazon EC2 instances, Amazon DynamoDB tables, and Amazon RDS DB instances, as well as custom metrics generated by your applications and services, and any log files your applications generate. You can use Amazon CloudWatch to gain system-wide visibility into resource utilization, application performance, and operational health. You can use these insights to react and keep your application running smoothly.


Elastic Load Balancing Elastic Load Balancing automatically distributes your incoming application traffic across multiple targets, such as EC2 instances. It monitors the health of registered targets and routes traffic only to the healthy targets. Elastic Load Balancing supports two types of load balancers: Application Load Balancers and Classic Load Balancers. 

El producto Elastic Load Balancing tiene 2 posibilidades de uso: 

  • Classic Load Balancer
  • Application Load Balancer (es la opción que es mas versátil)



Amazon S3 Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable cloud storage.


Amazon RDS Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database administration tasks, freeing you up to focus on your applications and business. Amazon RDS provides you six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle, and Microsoft SQL Server.


Amazon DynamoDB Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.


Amazon SQS Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed message queuing service.


Amazon CloudFront Amazon CloudFront is a global Content Delivery Network (CDN) service that accelerates delivery of your websites, APIs, video content or other web assets. It integrates with other Amazon Web Services products to give developers and businesses an easy way to accelerate content to end users with no minimum usage commitments.
 

Architecture Diagrams

Always it has been an issue how to diagram a design for an Architecture. There are a lot of discussion on this matter, with no solution. One good approach is from Simon Brown about his C4.

One good example is when you google for Spring MVC architecture:



















01 March 2017

Wat?

This Javascript presentation is already a classic:

https://www.destroyallsoftware.com/talks/wat


Besides, I can add the following:


jjs> 1/0
Infinity
jjs> Infinity/Infinity
NaN






13 February 2017

On this page we can find several of the most cool quotes from computer scientists:

http://goto.ucsd.edu/~mstepp/programming.html

A few of them:

"The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand."
     - D. Jones

"The sooner you start to code, the longer the program will take."
     - R. Carlson

"Computer Science is no more about computers than astronomy is about telescopes."
     - Edsger Dijkstra

10 January 2017

Nature cannot be fooled

This a very famous quote from Richard Feynman.

"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled."

This quotes is not strictly for space shuttle construction, but also it cn be applied for Software Engineering, in particular for estimation when planning a new development project.

Similar references can be found at:

https://www.amazon.com/dp/0470486759/




29 November 2016

The Scale Cube

Good example of  cube demonstrating the 3 factors necessary for scalability in microservices (it could be projected to different domains as well). Therefore if you scale in any axis will have an impact in another









http://theartofscalability.com/

http://microservices.io/articles/scalecube.html

https://www.benefitfocus.com/blogs/design-engineering/architecture-cubed

http://www.ossmentor.com/2015/01/scaling-microservices.html

https://github.com/arun-gupta/microservices/blob/master/slides/refactor-microservices.pdf

Dietzler’s law

Interesting law from Neal Ford quoting his my colleague Terry Dietzler:

Dietzler’s Law for Access
Every Access project will eventually fail because, while 80% of what the user wants is fast and easy to create, and the next 10% is possible with difficulty, ultimately the last 10% is impossible because you can’t get far enough underneath the built-in abstractions, and users always want 100% of what they want.

Source: http://nealford.com/memeagora/2013/01/22/why_everyone_eventually_hates_maven.html

My Blog List

Search This Blog

Loading...

Blog Archive

There was an error in this gadget

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.