30 November 2017

Patrones de Diseño (en un año)

Se han utilizado diferentes patrones de diseño para diferentes necesidades, tal como, de arquitectura de componentes a nivel de servicios y de patrones de construcción OOP.

A continuación es la lista de los patrones de diseños usados:

- Descomposición de servicios para poder tener un buen limite de dominios (DDD, separation of concerns)

- @Domains: usado en la capa Rest donde está la implementación de POJOs

- Repository: donde está desacoplado la implementación de varios repositorios, dejando expuesta el mismo contrato a los cliente.

- @Service: capa Rest, tiene Patrón: Service-layer, en donde implementamos diferentes servicios para llamar, sean base datos pertenecientes a CDN o directamente como cliente al bus de servicios.

- @Controller: Rest, es el controller de springmvc, que es parte del patrón de diseño MVC, el cual dejamos claro el manejo del flujo del servicio rest

- Factory: todos los datasources utilizados vienen del contenedor de aplicaciones (Weblogic), y es una factoría de la cual nos abstraemos de la implementación (Oracle) y usamos la conexión entregada, la cual es reutilizada en las siguientes interacciones.

- DAO: pl-generator, librería que genera DAO automático desde la metadata de oracle y tenemos la interfaz (Façade) de los stored procedures de la base de datos, por directriz (generalmente en bancos) siempre accedemos a través de esos SP, y la librería gracias a esta encapsulación entregada por DAO podemos abstraernos de todo lo necesario de conexiones JDBC.

- SAL: Service Access Layer: Rest, patrón que viene desde la arquitectura SOA y tenemos implementada los diferentes servicios en un solo package.

- MVC: angular/rest. Usamos el patrón Model-View-Controller en nuestra solución. View es AngularJS, Controller y Model está implementado en Rest en las clases con anotaciones @Controller y Pojos, aprovechando la separación entregada por Spring

- API-Proxy: Usamos servicios Rest para todos los accesos desde front hacia OSB/DB. nunca se puede acceder directo desde Front, asi se usa api-proxy como interfaz.

- Aggregator: se utiliza en message-aggregator-rest para encapsular la implementación de del motor de envio de emails. De esta manera le damos más valor al request del envío del correo (Decorator) y tenemos un fachada (facade) para la implementación final.

- Connection Factory: JMS, todos los JMS utilizan un Connection Factory implementada por WLS. de esta manera se reutilizan las conexiones JMS.

- Prototype: en javascript para extender funciones y hacer honor al límite de 100 líneas por función (modular), se utiliza el patrón prototype.

- Database per service: notificaciones utiliza 1 schema por su solución, y no compartimos la base de datos con otros servicios, si alguien más necesita insertar datos estos deben hacerse a través un el api-proxy expuesto por notificaciones.

- Shared database (base datos compartida), existen schemas que son utilizados por varios servicios, tal como, session_cn.

- Log aggregation, se logea las transacciones y funcionalidades importantes de cada uno de los servicios en un log de aplicación que está configurado en cada uno de los dominios de WLS.

- Client-side UI composition. Cada aplicación puede tener componentes propios que están encapsulados en directivas angular. Estas directivas pueden ser reutilizadas por otras aplicaciones. El equipo de Diseño se preocupa de generar el esqueleto de las páginas, componiendo diferentes componentes UI.

- además utilizamos de varios patrones de diseño de más bajo nivel GoF: iterator, façade, singleton, Factory method pattern, Decorator, Builder, etc.


Java Performance

This is a summary post of good practices (many easy) to improve performance in your Java code:

 - use Apache StringUtils.replace instead String.replace. The big difference is because Java replace() uses regexp which makes it more expensive immediately.

- avoid using Java7 UUID (there are other faster libraries for it)

- avoid regexp if possible (many times we use regexp and with a String.indexof() is enough).

try-with-resources

A known, and now kind of old feature of Java 7, but still isn't as popular as we wish.

Straightforward (and easy) implementation, where you need to declare resources (File, Stream) into parenthesis of "try" keyword:

private static void printFileJava7() throws IOException {

    try(FileInputStream input = new FileInputStream("hola.txt")) {

        int data = input.read();
        while(data != -1){
            System.out.print((char) data);
            data = input.read();
        }
    }
}

And JVM will have the responsibility to close those resources.

More info:

https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

http://tutorials.jenkov.com/java-exception-handling/try-with-resources.html

https://www.mkyong.com/java/try-with-resources-example-in-jdk-7/


24 November 2017

HTTP Codes

La arquitectura Rest se basa fuertemente en el protocolo HTTP, por lo cual es importante responder (y parsear al recibir) los diferentes códigos HTTP que existen.
Los códigos están agrupados por las siguientes categorías:
  • 1xx – Informational
  • 2xx – Successful
  • 3xx – Redirection
  • 4xx - Client Error
  • 5xx - Server Error
El proyecto rest-error-handler hace uso granular de estos códigos.
Deberíamos usar solo los códigos más útiles (top “10”) que son los siguientes:

HTTP Response codes

200OKSuccessfully executed. should be used to indicate nonspecific success
201CREATEDSuccessfully executed and a new resources has been created. The response body is either empty or contains a URI(s) of the created resource. The location header should should also contain the new URI
202ACCEPTEDThe request was valid and has been accepted but has not yet been processed. The response should include a URI to poll for status updates on the request. Allows for asynchronous request ( start of an asynchronous action)
204NO_CONTENTThe request was successful but the server did not have a response. should be used when the response body is intentionally empty.
Ejemplo: Si se busca el listado de productos para un cliente y el cliente existe pero la lista es vacía, el estado es 204
301MOVED_PERMANENTLYThe new location should be returned in the response ( should be used to relocate resources)
302REDIRECTThe HTTP response status code 302 Found is a common way of performing URL redirection.
400BAD_REQUESTMalformed or invalid request
401UNAUTHORIZEDInvalid authorization credentials
403FORBIDDENDisallowed request. Security error
404NOT_FOUNDResource not found.
Ejemplo: Si se busca un cliente por rut y éste no existe, el estado es 404
405METHOD_NOT_ALLOWEDMethod (verb) not allowed for requested resource. Response will provide an “Allow” header to indicate what is allowed
415UNSUPPORTED_MEDIA_TYPEClient submitted a media type that is incompatible for the specified resource.
500INTERNAL_SERVER_ERRORCatchall for server processing problem
503SERVICE_UNAVAILABLEResponse in the face of too many request

Mayor información:

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

02 November 2017

Cannot retrieve WLS app info

Cannot retrieve:

The configuration for app is still being loaded from your last request, please wait a moment and retry.

####<Oct 30, 2017 9:59:44 AM CLT> <Error> <Console> <lablnx297> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <cc19eb40-e1ae-46e5-80cb-dbf2a3509811-00000f0c> <1509368384819> <BEA-240003> <Administration Console encountered the following error: java.lang.NullPointerException
  at weblogic.application.internal.ApplicationRuntimeMBeanImpl.getComponentRuntimes(ApplicationRuntimeMBeanImpl.java:449)
  at sun.reflect.GeneratedMethodAccessor1348.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at weblogic.management.jmx.modelmbean.WLSModelMBean.getAttribute(WLSModelMBean.java:525)
  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
  at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
  at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$12.run(WLSMBeanServerInterceptorBase.java:326)
  at java.security.AccessController.doPrivileged(Native Method)
  at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:324)
  at weblogic.management.mbeanservers.internal.JMXContextInterceptor.getAttribute(JMXContextInterceptor.java:157)
  at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$12.run(WLSMBeanServerInterceptorBase.java:326)
  at java.security.AccessController.doPrivileged(Native Method)
  at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.getAttribute(WLSMBeanServerInterceptorBase.java:324)
  at weblogic.management.mbeanservers.internal.SecurityInterceptor.getAttribute(SecurityInterceptor.java:300)
  at weblogic.management.jmx.mbeanserver.WLSMBeanServer.getAttribute(WLSMBeanServer.java:279)
  at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$5$1.run(JMXConnectorSubjectForwarder.java:327)
  at java.security.AccessController.doPrivileged(Native Method)
  at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$5.run(JMXConnectorSubjectForwarder.java:325)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
  at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.getAttribute(JMXConnectorSubjectForwarder.java:320)
  at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
  at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
  at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1332)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1431)
  at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:661)
  at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
  at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:701)
  at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:527)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
  at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:523)
  at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>

HTTP Cluster WebLogic Server

Old Deprecated feature:

web.xml :

<servlet-name>ProxyServlet</servlet-name>
<servlet-class>weblogic.servlet.proxy.HttpProxyServlet</servlet-class>
<init-param>
<param-name>redirectURL</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ProxyServlet</servlet-name>
<url-pattern>/MyProducerApp/*</url-pattern>
</servlet-mapping>

.

31 October 2017

Clear Cache WLS

Before deleting any directory, you need to shutdown all servers first.

The following provides a generic example path to the tmp directory in question:

WINDOWS: cd C:\wls\user_projects\domains\servers\

UNIX: cd /wls/user_projects/domains//servers/

The following would be used to clear the cache:

WINDOWS: rd C:\wls\user_projects\domains\servers\tmp
rd C:\wls\user_projects\domains\servers\cache


UNIX: rm -rf /wls/user_projects/domains/servers/tmp
rm -rf /wls/user_projects/domains//servers/cache



 For WLS versions 9.2 and above, delete the following Admin and Managed server cache directories:

    /servers/cache
    /servers/stage (if exists)
    /servers/tmp
 




18 October 2017

WLS JMS Configuration

Essential steps to configure a JMS environment


CORE_WLS_Domain --> Services --> Persistent Stores -->

New:

Name: FileStore-Mensajeria1
Target: Managed Server 1 (WLS01)
Directory: jmsMensajeria_1
(Activate Changes)

Name: FileStore-Mensajeria2
Target: Managed Server 2 (WLSS02)
Directory: jmsMensajeria_2
(Activate Changes)


CORE_WLS_Domain --> Services --> Messaging --> JMS Servers

New:

Name: JMSServer-Mensajeria_1
Persistent Store: FileStore-Mensajeria1
Target: WLS01 (migratable)
(finish)

Name: JMSServer-Mensajeria_2
Persistent Store: FileStore-Mensajeria2
Target: WLS02 (migratable)
(finish)

(Activate Changes)


CORE_WLS_Domain --> Services --> Messaging --> JMS Modules

Name: JMSModule_Mensajeria
Target: wls_core_cluster
(next/finish)
(Activate Changes)


entrar a JMS Module creado: (crear subdeployment)
CORE_WLS_Domain --> Services --> Messaging --> JMS Modules --> JMSModule_Mensajeria --> Subdeployments

New:

name: MensajeriaSubdeployment
Target: JMSServer-Mensajeria_1, JMSServer-Mensajeria_2
(Activate Changes)


CORE_WLS_Domain --> Services --> Messaging --> JMS Modules --> JMSModule_Mensajeria

New:

Connection Factory (next)

Name: ConnectionFactory-Mensajeria
JNDI Name: jms/ConnectionFactory-Mensajeria (next)
(finish)
(Activate Changes)

New:

Distributed Queue (next)

Name: DistributedQueue-Mensajeria
JNDI Name: jms/journal-standar (next)
Advanced Targeting: MensajeriaSubdeployment

JMS Servers: JMSServer-Mensajeria_1, JMSServer-Mensajeria_2
(finish)
(Activate Changes)



12 October 2017

Opatch WLS 12c

Backup Oracle Home:
It is highly recommended that you back up the Oracle home before any patch operation. You can back up the Oracle home using your preferred method. You can use any method such as zip, cp -r, tar, and cpio to compress the Oracle home.

Opatch path:
/Users/German/Oracle/Middleware/Oracle_Home/OPatch

List patches:
./opatch lsinventory
./opatch lsinventory -detail

Check if it's feasible:
./opatch apply /Users/German/tmp/patches/23639929 -report

Apply patch:
./opatch apply /Users/German/tmp/patches/23639929

Rollback patch
./opatch rollback -id 23639929

logs:
ORACLE_HOME/cfgtoollogs/opatch/

More info:
https://docs.oracle.com/middleware/1213/core/OPATC/toc.htm

11 October 2017

Too many open files


The following problem may occurr in WLS:

Caused By: java.net.SocketException: Too many open files
  at java.net.Socket.createImpl(Socket.java:447)
  at java.net.Socket.connect(Socket.java:577)
  at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:161)
  at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
  at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
  at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
  at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
  at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)

This is a common issue when  File Descriptors are not enough for the OS processes.

Checcking the most open FD appear WLS Managed Servers and they are almost on the limit:

4076 376 /u04/Middleware/WLS12c/jdk/bin/java-server-Xms1024m-Xmx2048m-XX:PermSize=256m-XX:MaxPermSize=512m-Dweblogic.Name=WLS02

4063 32526 /u04/Middleware/WLS12c/jdk/bin/java-server-Xms1024m-Xmx2048m-XX:PermSize=256m-XX:MaxPermSize=512m-Dweblogic.Name=WLS01

Checking with lsof we see a lot of open jar files from war files, because we have several war files deployed.

Check:

$ ulimit -n
4096

Therefore the solution is to set a bigger soft&hard limit.

04 October 2017

How to know OHS version

$ ./httpd.worker -v
./httpd.worker: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

$ ps -fea | grep httpd

$ export ORACLE_HOME=/u04/Middleware/P_OHS12c/product

$ export LD_LIBRARY_PATH=/u04/Middleware/P_OHS12c/product/lib

$ cd /u04/Middleware/P_OHS12c/product/wlserver/../ohs/bin/

$ ./httpd.worker -v
Server version: Oracle-HTTP-Server/2.2.22 (Unix)
Server built:   Sep  3 2015 01:14:57
Server label:   APACHE_12.1.3.0.0_LINUX.X64_RELEASE



25 August 2017

Sed cheat sheet

Sometimes we need to clean-up a file (ie: log prod file)

sed -i.bak '/<ConnectionEnv.cleanup, jconn=oracle.jdbc.driver.T4CConnection/d' ./infile



21 August 2017

Inputless WLS Credentials

Awkwardly WLS develoment version does not show credentials input when booting.
Of course, the solution is to create security/boot.properties.
however if I don't press [enter] then it waits forever :S

Probably there is a patch for this, but dev version

<Aug 11, 2017 11:30:18 AM CLT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<Aug 11, 2017 11:30:18 AM CLT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 24.80-b11 from Oracle Corporation.>
<Aug 11, 2017 11:30:19 AM CLT> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
---->
<Aug 10, 2017 6:01:49 PM CLT> <Info> <Management> <BEA-141298> <Could not register with the Administration Server: java.rmi.RemoteException: [Deployer:149150]An IOException occurred while reading the input. : with response code '401' : with response message 'Unauthorized'>
<Aug 10, 2017 6:01:49 PM CLT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.3.0.0  Tue Aug 11 09:00:41 UTC 2015 1697938 >
<Aug 10, 2017 6:01:52 PM CLT> <Error> <Configuration Management> <BEA-150021> <The Administration Server failed to authenticate the identity of the user  starting the Managed Server. The reason for the error is .>
<Aug 10, 2017 6:01:52 PM CLT> <Alert> <Management> <BEA-141151> <The Administration Server could not be reached at http://127.0.0.1:7001.>
<Aug 10, 2017 6:01:52 PM CLT> <Info> <Configuration Management> <BEA-150018> <This server is being started in Managed Server independence mode in the absence of the Administration Server.>
<Aug 10, 2017 6:01:52 PM CLT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<Aug 10, 2017 6:01:52 PM CLT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
<Aug 10, 2017 6:01:52 PM CLT> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>

11 July 2017

Software Architect Skills/Responsabilities

There are several list of required skills/responsabilities a Software Architect should have.
One of these (a little old now, but still valid) is:

https://dzone.com/articles/architecture-%E2%80%93-top-10-traits

  1.     Knowledge of relevant technologies
  2.     Strong analysis & design skills
  3.     Coding & POCs
  4.     Architecture & design activities
  5.     Modeling language/Tools
  6.     Architectural frameworks/Tools
  7.     Communication
  8.     Training/Mentoring
  9.     Sales/Pre-sales
  10.     Presentation Skills

PD: as usual, I'll be updating this Post as I find new resources or my own ideas...

  1. Code Review


12 May 2017

Java Muxer WLS



Go to Environment > Servers > your_Server > Tuning, under Advanced, set the Muxer Class based on your OS and reboot the server. 

Solaris/HP­UX Native Muxer : weblogic.socket.DevPollSocketMuxer 
POSIX Native Muxer : weblogic.socket.PosixSocketMuxer
Windows Native Muxer : weblogic.socket.NTSocketMuxer
Java Muxer : weblogic.socket.JavaSocketMuxer
 

java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)

at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
­ locked <0x0000000789f2b040> (a sun.nio.ch.Util$2)
­ locked <0x0000000789f2b030> (a java.util.Collections$UnmodifiableSet)
­ locked <0x0000000789f2adf8> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
at weblogic.socket.NIOSocketMuxer$NIOInputStream.readInternal(NIOSocketMuxer.java:815) at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:759)
at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:742)
at weblogic.socket.JSSEFilterImpl.readFromNetwork(JSSEFilterImpl.java:462)
at weblogic.socket.JSSEFilterImpl.read(JSSEFilterImpl.java:424)
at weblogic.socket.JSSESocket$JSSEInputStream.read(JSSESocket.java:64)

Catastrophic Regexp (again)

Hitting a stuck thread:

"main" prio=5 tid=0x00007fd577005800 nid=0x1c03 runnable [0x00007000035db000]
   java.lang.Thread.State: RUNNABLE
    at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5151)
    at java.util.regex.Pattern$5.isSatisfiedBy(Pattern.java:5151)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java:3694)
    at java.util.regex.Pattern$Curly.match0(Pattern.java:4158)
    at java.util.regex.Pattern$Curly.match(Pattern.java:4132)
    at java.util.regex.Pattern$Start.match(Pattern.java:3408)
    at java.util.regex.Matcher.search(Matcher.java:1199)
    at java.util.regex.Matcher.find(Matcher.java:592)
    at java.util.regex.Pattern.split(Pattern.java:1200)
    at java.lang.String.split(String.java:2313)
    at RegExpTest.main(RegExpTest.java:28)

Once again it's a "stuck" thread for the catastrophic issue in regexp:
https://github.com/devwebcl/regexp-playground/blob/master/src/main/java/cl/devweb/regexp/exploit/JxlsBug.java


03 May 2017

Design Patterns: A domain agnostic approach


a book about explaining in a different way GoF patterns, given several examples (use case) by pattern, this way providing a better explanation for each one, this means a leverage for a better understanding, and promoting GoF to a reference book.

A good approach used is to ask himself about different situations, including boundary cases and how each pattern may help or even not help (clarifying common misunderstanding).

A great companion book for Gof, and even Gof becomes as a reference book whereas DPA becomes the book to read.

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 <pid>

kill -3 <pid>

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.

Amazon API Gateway
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. With a few clicks in the AWS Management Console, you can create an API that acts as a “front door” for applications to access data, business logic, or functionality from your back-end services, such as workloads running on Amazon Elastic Compute Cloud (Amazon EC2), code running on AWS Lambda, or any Web application.

 

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

Computer Science Quotes

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/




My Blog List

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.