JPA/Hibernate Tips

  • Best Practices
    • Declare identifier properties on persistent classes with NO business meaning
    • Identify natural/business key – equals/hashcode
    • Do not treat exceptions as recoverable – rollback the transaction and close the connection
    • Prefer lazy fetching for associations
    • Prefer bidirectional associations
    • Use bind variables (NO string manipulations)
    • Using second-level caching for those entity classes that represent
      • Data that changes rarely
      • Noncritical data (eg. Content-management data)
      • Data that’s local to the application and not modified by other applications

Continue reading “JPA/Hibernate Tips”

[Tips] AWS Solution Architect – Associate

  • Amazon S3 buckets in all Regions provide read-after-write consistency for PUTS of new objects and eventual consistency for overwrite PUTS and DELETES.
  • High IO needs -> RAID 10 : Striped and Mirrored, Good Redundancy, Good Performance
  • S3
    • Standard : 99.999999999% durability, 99.99% availability
    • S3-IA (Infrequent Access) : 99.999999999% durability, 99.9% availability (You should expect the same latency and throughput performance as Amazon S3 Standard when using Standard – IA.)
    • S3-RRS (Reduced Redundancy Storage) : 99.99% durability, 99.99% availability
    • Glacier : 99.999999999% durability, 3-5 hours via the Amazon S3 APIs or Management Console

Continue reading “[Tips] AWS Solution Architect – Associate”