Tuesday, August 7, 2018

domain driven design

  1. books “Domain-driven Design” by Eric Evans and “Implementing Domain-driven Design” by Vaughn Vernon
  2.  
  3. value object is the object of a class whose constructor is private and which is constructed with the help of factory method inside it. they are not treated as entity. and two value objects having same state are considered to be equal.
  4. https://deviq.com/value-object
  5. they are small
  6. they are immutable
  7. https://martinfowler.com/bliki/ValueObject.html
  8. https://enterprisecraftsmanship.com/2016/01/11/entity-vs-value-object-the-ultimate-list-of-differences/
  9.  
  10. value objects can be considered as @component
  11. address is a good example of value object
  12. value object should not be in a separate table.
  13. value object should not have own identity
  14. aggregates
    1. https://medium.com/withbetterco/using-aggregates-and-factories-in-domain-driven-design-34e0dff220c3
    2. https://www.infoq.com/news/2015/01/aggregates-value-objects-ddd
    3.  

ubuntu

docker

  1. sudo docker pull netflixoss/eureka generates the following error
  2.  Using default tag: latest
    Error response from daemon: manifest for netflixoss/eureka:latest not found
    solution is ->
  3. sudo docker pull netflixoss/eureka:1.3.1
    1. where 1.3.1 is the tag
  4. following is the way to run i.e create a container:
  5. sudo docker run netflixoss/eureka:1.3.1
  6. the problem is unable to connect to the port 
  7. https://stackoverflow.com/questions/47612400/docker-run-unable-to-access-jar-file 
  8. https://bartwullems.blogspot.com/2017/03/docker-error-err
  9. http://blog.thoward37.me/articles/where-are-docker-images-stored/
  10. https://stackoverflow.com/questions/25101312/does-all-running-docker-containers-have-a-separate-process-id
  11.  sudo docker container ls -> will all the running containers
  12. docker --help//help commands
  13. how to locate Dockerfile of pulled docker image ?
  14. docker-compose.yml
  15.  If you need to customize an image image, you should create a Dockerfile, with the first line:
    FROM ubuntu
     

  16. Yes, every docker container will have a different PID on your host machine.
    You can get a docker containers PID by doing:
    docker inspect --format '{{ .State.Pid }}' CONTAINER_ID
    
    If you kill the process on your host, your docker container will die.

    example
    sudo docker inspect --format '{{ .State.Pid }}' 18f966e5228f


maven on ubuntu for spring boot application

  1. maven creates the executable jar inside target folder through the following command:
    1. mvn clean package