Distributed System Definition: It is a system composed of multiple nodes, in general a node is one of our computers, these nodes are not isolated, but interconnected, and finally these connected nodes deployed our components, and the operation of each other will have synergy.
Advantages and disadvantages of distributed development
1 , collaborative interconnection, for us to integrate a large number of geographically scattered anger around the information and services, such as Baidu Map, now and so on
2 , the economy, the application of distributed to reduce the performance of the hardware facilities, cost-effective.
3 , performance and scalability, in order to improve the software life cycle, distributed system performance and scalability plays a vital role. If the distributed system does not have performance and scalability, it is not a successful software.
4 , fault-tolerant, system failure, and the ability to run as usual, i.e. 365 x 7 x
   We are using EJB distributed. EJB is a distributed, object-oriented application system's cross-platform component architecture.
EJB is in accordance with Java Server interface-defined Java class, which can be understood as a special Java class, placed in the container can help the class management transactions, distributed, security, etc., generally small programs will not be used, only large distributed systems will be used EJB . Because the particles are small, they can be called by one or more modules.
Our itoo Project uses the EJB Remote Call - the distributed object. Understand the use of EJBS from a project perspective :
1 , the system only needs to provide interfaces to others (interface-oriented programming), so that the system can be deployed in different physical machines, resulting in a number of independent processes, so as to achieve performance, scalability, availability of the system goals.
2 , portable component framework, the platform portability of the framework is a good reflection of my other business, and this framework can still be applied regardless of platform-independent, vendor, and application services.
3 , the persistence of objects JPA the provided interface.
4 , database schema Independent, EJB is the distribution of business logic, regardless of the schema of the database.
5 , transaction management, EJB containers provide the management of transactions and automate the processing of complex threads and concurrent shared data issues. the EJB container also resolves the processing of distributed transactions when remote calls are made.
6 , JBOSS cluster and load balancing reduces server pressure and improves performance. No downtime,365 x 7 x,fault-tolerant handling, etc.
7 , because EJB is the distribution of business logic, so in the development process, each person to develop their own business logic, do not affect each other, if the need for interaction only need to provide interface, but this also must have a disadvantage in development, the interface is not developed before it must wait for the interface or with false data to write directly to death, It also resulted in slow project development. In addition, the program debugging time is increased.
EJB Remote Method Invocation
1 , defining public interfaces
2 , local method obtains the object from the naming server
3 , call method, the remote interceptor through the proxy before and after the method to insert middleware services (such as transaction security, etc.), and then call the remote method.
4 , the same JVM in the local call, the different JVM is called remotely in
EJB with the Web Service difference
When it comes to EJBS, there is an essential difference between Web Service,webservice and EJBs:
1 , Web Service focus on solving heterogeneous problems, including platform, programming language, it can be said that its concern is the development of distributed services, the control layer is high, granular size; EJB can be seen as a distributed programming platform, Container and the Component abstraction simplifies the development, release, and invocation of applications, with the focus on distributed component development and small granularity.
2 web Service can be said to be a standard in the industry, is different programming language heterogeneous system Communication standards, EJB just belongs to j2ee part of the specification.
3 EJB bottom with rmi-iiop protocol for communication, firewall will block; web Service http protocol for communication, Firewall does not block.
4 , EJB is a remote call object that can invoke methods and properties inside the object; Web Service the provided interface is parsed by the XML provide data.
Summarize
is the distribution of business logic, so we divide the granularity of business logic, using the jboss Cluster we can deploy a line on multiple machines to reduce the cost of hardware and improve performance. Because EJB is portable, with the front-end technology-agnostic server-side components, developers only need to focus on the business logic in the development process, if the page developer only needs to focus on the page, and Span lang= "en-US" style= "Font-family:calibri" >EJB containers are responsible for handling transactions, Access control, concurrency and other system problems; cost-effective.
EJB The core idea of the program framework: business logic-related implementations focus on EJB completed, while the EJB It is easy to be responsible for providing system-level functionality with repetitive properties, so EJB components can provide a complete business service to the outside.
Distributed Systems (1)---EJB