Thursday, December 27, 2012

JMS and Async, Don't Mess With It | Javalobby

Two Helpful Data Concepts | Javalobby

Functional Java Collections | Javalobby

JUnit Testing REST Services and Spring MVC | Javalobby

Facebook Integration using Apache Camel | Javalobby

Automatically Colorize Terminal Tabs Based on Server | Javalobby

Apache Pig: Beginnings | Javalobby

Defining DevOps in Sixty Seconds | Javalobby

Too Many Open Files: Case Study | Javalobby

Distributing Hadoop | Javalobby

You Can’t Refactor Your Way Out of Every Problem | Javalobby

Software Architect Mistakes | Javalobby

Create Spring Integration Projects with STS | Javalobby

Big Data as Core, Big Data as Context, and Big Data as Buzzword Bingo | Javalobby

JMS and Async, Don't Mess With It | Javalobby

The Future of Web MVC Testing | Javalobby

Screencast: Testing and Refactoring Legacy Code | Javalobby

HashMap.get High CPU – Case Study | Javalobby

Recycling objects to improve performance | Javalobby

Synchronized vs Lock Performance | Javalobby

Sunday, December 23, 2012

http://www.infoq.com/cn/presentations/Spring-Batch-large-data

http://refcardz.dzone.com/refcardz/patterns-modular-architecture

Java Profiling with VisualVM Cheat Sheet from DZone Refcardz - Free, professional tutorial guides for developers

http://java.dzone.com/articles/best-practices-integrating

http://java.dzone.com/articles/designing-rest-ful-api-using

http://java.dzone.com/articles/autodiscovering-log-files

http://java.dzone.com/articles/tutorial-apache-pig-amazon

http://java.dzone.com/articles/berkeley-ischool-analyzing-big

http://java.dzone.com/articles/git-status-working-and-staged

http://java.dzone.com/articles/code-reviews-understanding-and

http://java.dzone.com/articles/container-based-security-and

5 Reasons to Implement a Content Delivery Network (CDN) | Javalobby

Apache Camel 2.10.x and 2.9.x Lines Clean out Bugs | Javalobby

Getting Terminal Colors Right | Javalobby

Analyzing Big Data with Twitter - Lecture 2: Growing a Human-Scale Service | Javalobby

Video Tutorial: Web Services Consumer Using Apache CXF | Javalobby

3-Minute ESB Evaluation Video | Javalobby

Sprint Goals Tie up Loose Ends | Javalobby

Does the Command Pattern Stand the Test of Time? | Javalobby

10 Tips to Making Products That People Will Love | Javalobby

How to Quickly Launch a Cassandra Cluster on Amazon EC2 | Javalobby

Charles Lamb's Thoughts on Berkley DB Java Edition | Javalobby

How Flickr delivers Real-Time Push Notifications using Node.js and Redis | Javalobby

Getting Started with Quartz Scheduler on MySQL Database | Javalobby

Managing and Monitoring Spring Integration Applications | Javalobby

Master Worker Pattern in JMS | Javalobby

Relative Performance of Three Approaches to toString() | Javalobby

Claimcheck Pattern using Spring Integration and Gemfire | Javalobby

Sunday, July 1, 2012

67 Chouteau Avenue, Framingham MA - Trulia
179 Arthur Street, Framingham MA - Trulia

http://www.trulia.com/property/3084974353-11-Tara-Rd-Framingham-MA-01701 -- Check out this home I found using Trulia's real estate app

http://www.trulia.com/property/1046558262-41-Anderson-Rd-Framingham-MA-01701 -- Check out this home I found using Trulia's real estate app

http://www.trulia.com/property/3070887608-21-Lowther-Rd-Framingham-MA-01701 -- Check out this home I found using Trulia's real estate app

Monday, June 18, 2012

Domain-driven design


http://en.wikipedia.org/wiki/Domain-driven_design 

Domain-driven design

From Wikipedia, the free encyclopedia
Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts.[1] The premise of domain-driven design is the following:
  • Placing the project's primary focus on the core domain and domain logic
  • Basing complex designs on a model
  • Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem.
Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects dealing with complicated domains.
The term was coined by Eric Evans in his book of the same title.[2]

Contents

  [hide

[edit]Core definitions

  • Domain: A sphere of knowledge (ontology), influence, or activity. The subject area to which the user applies a program is the domain of the software.
  • Model: A system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain.
  • Ubiquitous Language: A language structured around the domain model and used by all team members to connect all the activities of the team with the software.
  • Context: The setting in which a word or statement appears that determines its meaning.

[edit]Prerequisites for the successful application of DDD

  • Your domain is not trivial
  • The project team has experience and interest in Object Oriented Programming/Design
  • You have access to domain experts
  • You have an iterative process

[edit]Strategic domain-driven design

Ideally, we would prefer to have a single, unified model. While this is a noble goal, in reality it always fragments into multiple models. It is more useful to recognize this fact of life and work with it.
Strategic Design is a set of principles for maintaining model integrity, distillation of the Domain Model and working with multiple models.
The following image demonstrates the patterns in Strategic Domain-Driven Design and the relationships between them.
Maintaining Model Integrity.png

[edit]Bounded context

Multiple models are in play on any large project. Yet when code based on distinct models is combined, software becomes buggy, unreliable, and difficult to understand. Communication among team members becomes confused. It is often unclear in what context a model should not be applied.
Therefore: Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.

[edit]Continuous integration

When a number of people are working in the same bounded context, there is a strong tendency for the model to fragment. The bigger the team, the bigger the problem, but as few as three or four people can encounter serious problems. Yet breaking down the system into ever-smaller contexts eventually loses a valuable level of integration and coherency.
Therefore: Institute a process of merging all code and other implementation artifacts frequently, with automated tests to flag fragmentation quickly. Relentlessly exercise the ubiquitous language to hammer out a shared view of the model as the concepts evolve in different people’s heads.

[edit]Context map

An individual bounded context leaves some problems in the absence of a global view. The context of other models may still be vague and in flux.
People on other teams won’t be very aware of the context bounds and will unknowingly make changes that blur the edges or complicate the interconnections. When connections must be made between different contexts, they tend to bleed into each other.
Therefore: Identify each model in play on the project and define its bounded context. This includes the implicit models of non- object-oriented subsystems. Name each bounded context, and make the names part of the ubiquitous language. Describe the points of contact between the models, outlining explicit translation for any communication and highlighting any sharing. Map the existing terrain.

[edit]Building blocks of DDD

In the book Domain-Driven Design,[2] a number of high-level concepts and practices are articulated, such as ubiquitous languagemeaning that the domain model should form a common language given by domain experts for describing system requirements, that works equally well for the business users or sponsors and for the software developers. The book is very focused at describing thedomain layer that is one of the common layers in an object-oriented system with a multilayered architecture. In DDD, there are artifacts to express, create, and retrieve domain models:
  • Entity: An object that is not defined by its attributes, but rather by a thread of continuity and its identity.
Example: Most airlines distinguish each seat uniquely on every flight. Each seat is an entity in this context. However, Southwest Airlines (or EasyJet/RyanAir for Europeans) does not distinguish between every seat; all seats are the same. In this context, a seat is actually a value object.
  • Value Object: An object that contains attributes but has no conceptual identity. They should be treated as immutable.
Example: When people exchange dollar bills, they generally do not distinguish between each unique bill; they only are concerned about the face value of the dollar bill. In this context, dollar bills are value objects. However, the Federal Reserve may be concerned about each unique bill; in this context each bill would be an entity.
  • Aggregate: A collection of objects that are bound together by a root entity, otherwise known as an aggregate root. The aggregate root guarantees the consistency of changes being made within the aggregate by forbidding external objects from holding references to its members.
Example: When you drive a car, you do not have to worry about moving the wheels forward, making the engine combust with spark and fuel, etc.; you are simply driving the car. In this context, the car is an aggregate of several other objects and serves as the aggregate root to all of the other systems.
  • Service: When an operation does not conceptually belong to any object. Following the natural contours of the problem, you can implement these operations in services. The Service concept is called "Pure Fabrication" in GRASP.
  • Repository: methods for retrieving domain objects should delegate to a specialized Repository object such that alternative storage implementations may be easily interchanged.
  • Factory: methods for creating domain objects should delegate to a specialized Factory object such that alternative implementations may be easily interchanged.

[edit]Relationship to other ideas

Object-oriented analysis and design
Although in theory, the general idea of DDD need not be restricted to object-oriented approaches, in practice DDD seeks to exploit the powerful advantages that object-oriented techniques make possible. These include entities/aggregate roots as receivers of commands/method invocations and the encapsulation of state within foremost aggregate roots and on a higher architectural level, bounded contexts. The reader should be aware that object orientation is not exclusive to OO-only languages, but can be a part of functional programming, also. Applying commands/method invocations to an entity or aggregate root can be seen as an application of a function to a data structure where the result of the function application is an identical data structure with different data and/or version (especially version if optimistic concurrency is used). In dynamic languages such as Ruby or Smalltalk, object instances can be queried on whether they support a method (by name and/or signature), which is similar to how a statically typed language might choose to use an inversion of control container (or a service bus, or a service locator) to support runtime lookup of the objects - services - that support a given protocol/method/command (see CQRS further down).
Model-driven engineering (MDE)
Model-driven architecture (MDA)
While DDD is compatible with MDA, the intent of the two concepts is somewhat different. MDA is concerned more with the means of translating a model into code for different technology platforms than with the practice of defining better domain models.
POJOs and POCOs
POJOs and POCOs are technical implementation concepts, specific to Java and the .NET framework respectively. However, the emergence of the terms POJO and POCO, reflect a growing view that, within the context of either of those technical platforms, domain objects should be defined purely to implement the business behaviour of the corresponding domain concept, rather than be defined by the requirements of a more specific technology framework.
The naked objects pattern
This pattern is based on the premise that if you have a good enough domain model, the user interface can simply be a reflection of this domain model; and that if you require the user interface to be a direct reflection of the domain model then this will force the design of a better domain model.[3]
Domain-specific language (DSL)
DDD does not specifically require the use of a DSL, though it could be used to help define a DSL and support methods likedomain-specific multimodeling.
Aspect-oriented programming (AOP)
AOP makes it easy to factor out technical concerns (such as security, transaction management, logging) from a domain model, and as such makes it easier to design and implement domain models that focus purely on the business logic.
Command-query separation (CQRS)
CQRS an architectural pattern for separation of reads from writes where the former is a Query and the latter is a Command. Commands mutate state and are hence approximately equivalent to method invocation on your aggregate roots/entities and Queries query state, but do not mutate it. CQRS is a derivative architectural pattern from the design pattern called Command and Query Separation (CQS) which was coined by Meyer. While CQRS does not require DDD, domain driven design makes the distinction between commands and queries, explicit, around the concept of an aggregate root. The idea is that a given aggregate root has a method that corresponds to a command and a command handler invokes the method on the aggregate root. The aggregate root is responsible for performing the logic of the operation and yielding either a number of events or a failure (exception or execution result enumeration/number) response OR (if Event Sourcing (ES) is not used) just mutating its state for a persister implementation such as an ORM to write to a data store, while the command handler is responsible for pulling in infrastructure concerns related to the saving of the aggregate root's state or events and creating the needed contexts (e.g. transactions).
Event Sourcing (ES)
An architectural pattern which warrants that your entities (as per Evan's definition) do not track their internal state by means of direct serialization or O/R mapping, but by means of reading and committing events to an event store. Where ES is combined with CQRS and DDD, aggregate roots are responsible for thoroughly validating and applying commands (often by means having their instance methods invoked from a Command Handler) and then publishing a single or a set of events which is also the foundation upon which the aggregate roots base their logic for dealing with method invocations. Hence, the input is a command and the output is one or many events which are transactionally (single commit) saved to an event store and then often published on a message broker for the benefit of those interested (often the views are interested; they are then queried using Query-messages). When modeling your aggregate roots to output events you can isolate the internal state event further than would be possible when projecting read-data from your entities like is done in standard n-tier data-passing architectures. One significant benefit from this, is that tooling such as axiomatic theorem provers (e.g. Microsoft Contracts or CHESS) are easier to apply as the aggregate root comprehensively hide its internal state. Events are often persisted based on the version of the aggregate root instance, which yields a domain model that synchronizes in distributed systems around the concept of optimistic concurrency.

[edit]Software tools to support domain-driven design

Practicing DDD does not depend upon the use of any particular software tool or framework. Nonetheless, there is a growing number of open-source tools and frameworks that provide support to the specific patterns advocated in Evans' book or the general approach of DDD. Among these are:
  • Actifsource is a plug-in for Eclipse which enables software development combining DDD with model-driven engineering and code generation.
  • Apache Isis is a Java framework for developing domain-driven and RESTful applications using the Naked Objects pattern.
  • ECO (Domain Driven Design): Framework with database, class, code and state machine generation from UML diagrams by CapableObjects.
  • ManyDesigns Portofino is an open source, model-driven web-application framework for high productivity and maintainability. It provides CRUD forms, relationships, workflow management, dashboards, breadcrumbs, searches, single sign-on, permissions, and reporting.
  • OpenMDX: Open source, Java based, MDA Framework supporting Java SEJava EE, and .NET. OpenMDX differs from typical MDA frameworks in that "use models to directly drive the runtime behavior of operational systems".
  • OpenXava: Generates an AJAX application from JPA entities. You only need to write the domain classes to obtain a ready to use application.
  • mORMot is an Open Source Client-Server ORM and SOA framework for Delphi, implementing all DDD pre-requirements.

[edit]Examples of DDD

  • DDD Sample Application: Java DDD sample application based on cargo example from Domain-Driven Design[2] book.
  • NDDD Sample Application: C# port of the Java DDD sample application based on cargo example from Domain-Driven Design[2] book.
  • Bullsfirst Trading System: Sample application demonstrating DDD applied to a real world scenario, using current and emerging technologies.

[edit]See also

[edit]References

  1. ^ Definition on domaindrivendesign.org
  2. a b c d Evans, E., Domain-Driven Design - Tackling Complexity in the Heart of Software, 2004, Addison-Wesley
  3. ^ Haywood, D., Domain-Driven Design using Naked Objects, 2009, Pragmatic Programmers

[edit]External links

Friday, February 17, 2012

AT&T 4G LTE Expands to Durham - PR Newswire - sacbee.com
Galaxy Note for AT&T Review - SlashGear

403 Access Denied

You are not authorized to view this page.
If you have already configured the Manager application to allow access and you have used your browser's back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager appliction's HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.
If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Note that for Tomcat 6.0.30 onwards, the roles required to use the manager application were changed from the single manager role to add the following four roles. (The manager role is still available but should not be used as it avoids the CSRF protection). You will need to assign the role(s) required for the functionality you wish to access.
  • manager-gui - allows access to the HTML GUI and the status pages
  • manager-script - allows access to the text interface and the status pages
  • manager-jmx - allows access to the JMX proxy and the status pages
  • manager-status - allows access to the status pages only
The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:
  • users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
  • if the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.
For more information - please see the Manager App HOW-TO.
About Artifactory
Dedicated Tomcat Instance - Artifactory - Confluence
Setting Up a Maven Repository
A Maven-friendly Pattern for Storing Dependencies in Version Control | Brett Porter
Integrate Maven with Version Control System | twit88.com
Importing Maven Projects from Version Control and from Maven POM Using Maven Integration for Eclipse | Eclipse Live
How to correctly version control (svn:ignore) a Java project (Maven, Spring)? - Stack Overflow
How to correctly version control (svn:ignore) a Java project (Maven, Spring)? - Stack Overflow
Using the Maven Release Plugin | Java.net

Thursday, February 2, 2012

Monitoring and Reporting on CBQoS Using NetFlow Analyzer


Monitoring and Reporting on Cisco CBQoS

What is CBQoS?
CBQoS (Class Based Quality of Service) is a Cisco feature set that is part of the IOS 12.4(4)T and above. This provides information about the QoS policies applied and class based traffic patterns within an enterprise's network.
Why do you need it?
A network manager’s top priority is to ensure that the business critical applications get the optimum priority. Typically, networks operate on the basis of best-effort delivery, in which all traffic has equal priority and an equal chance of being delivered. When congestion results, all traffic has an equal chance of being dropped. Or, in case a particular traffic is to be prioritized, appropriate QoS policies can be applied as per the requirement.
Network administrators implement QoS policies to ensure that their business-critical applications receive the highest priority on the network. CBQoS can make network performance more predictable and bandwidth utilization more effective. CBQoS monitoring provides you in-depth visibility into the policies applied on your links and the traffic patterns in your various class of traffic.
How can NetFlow Analyzer help you?
ManageEngine NetFlow Analyzer supports Cisco CBQoS and thus reports on the QoS policies that you have deployed. The report shows the pre-policy, post-policy and drops in different traffic class along with the queuing. CBQoS monitoring in such a deep level helps you validate the QoS policies. You can change your policies according to the reports, which you see in NetFlow Analyzer. This is a tool, which can be best used for QoS policy validation.

Video

Cisco CBQoS Video

Use Case for CBQoS Reporting

A leading telecom company was catering business communication solutions to hundreds of Enterprises worldwide. As a vendor of a major business function, their presence was truly global and they had more than over a lakh employees working in offices located in every continent and in 16 countries. The company had a strict policy on customer service & any client issue was taken very seriously.
There were a lot of support engineers who accessed the central database frequently on their basis of interaction with the customers. Since, they provided round the clock technical support, they had to keep dumping more and more data into the central database. Their Enterprise network was their backbone and they had to rely on it for anything and everything while interacting with a customer.
At one particular location, there was a peculiar problem. Between 1 PM and 3 PM, the access to the database became really difficult. There was sluggishness and the screen would often freeze for many minutes which would put the technical support engineers in a very difficult situation especially the ones on calls with irate customers.
The Networking team was worried as they could not figure out the reason for the sluggishness during those specific hours alone. As he began to observe the problem persisting, he called up the Internet Service Provider to check if they were allocated the promised bandwidth. But, there was no problem with the ISP. So, they knew that the problem had to be internal.
This led to them looking out for tools that would tell them what was going on in their network. To get more visibility into their network, they opted for ManageEngine NetFlow Analyzer as they were planning to monitor selected critical interfaces. Since, they were not planning to invest anything that they were not sure of buying, the 30-day trial seemed to be another very good reason to choose NetFlow Analyzer.
When they monitored their network, they were surprised to find that, a lot of employees streaming videos and music during lunchtime. Another group of employees were relaxing themselves with a game of Farmville during those hours and it was identified using the reports from NetFlow Analyzer.
As obvious as it is, the Networking team decided to ensure maximum priority to the business critical applications like database, CRM and VoIP. They could not simply afford to lose out on their quality of service with these critical applications while bandwidth was eaten up by recreational items like Farmville and video streaming sites.
Their CBQoS policies were reset with immediate effect and the employees were requested to refrain from gaming and streaming anything not pertaining to business, during working hours. The effectiveness of their policies was also measured through NetFlow Analyzer's CBQoS reports. This resetting of policies had a great impact on the network. The access to the database was much faster and they were able to assist their customers quickly. The problem was no longer there.
Thus, the network administrator was able to find a very effective solution in order to ensure that your productive business enhancing applications receive maximum priority in your network.
NetFlow Analyzer is a NetFlow, sFlow, JFLow (and more) collector and analyzing engine integrated together. NetFlow analyzer does not require any hardware probes and can be downloaded, used in your network environment and can be evaluated for 30 days. Go through the following useful links for better understanding of how NetFlow Analyzer can help you in understanding your network traffic and bandwidth utilization.