The process of implementing distributed service framework based on OSGi (I.)

Source: Internet
Author: User

After writing the analysis of the service framework based on OSGi, the decision was made to implement a distributed service framework based on OSGi, and its feature would be implemented in accordance with the elements of the service framework previously written, based on the previous analysis, This implementation process is divided into three major steps to complete: spike phase, implementation phase and testing phase, the spike phase is used to complete several key issues of the research and selection of technology; implementation phase is used to complete the distributed service framework based on OSGi The test phase is used to determine the conformance and performance of the distributed framework implemented for the application scenario.

First enter the spike phase, in the spike phase needs to complete the service registration, creation and service proxy management technology research and selection, this is mainly because I am not familiar with these two parts of the technology, for the registration and search of services, there are two optional technologies: Jndi and Jini For the service proxy management, the optional technology should be cglib this kind of, but need to study the specific how to use, in this blog will introduce to Jndi Spike.

For registration and lookup of services, the first thought of the available technology is Jndi, Jndi as a Java EE important naming and lookup mechanism, and service registration, lookup is very consistent, in doing service registration and search technology spike, mainly from such a few aspects to spike:

1, how to realize the remote service register to the service center?

This is very simple for jndi, after initializing the context of Jndi, it can be implemented by Context.bind or Context.rebind.

For remote registration of a service, the instance of the service to the service center is not registered at the time of implementation, but only the object of information about the registration service.

2. How to find Service Center service in service application end?

This for Jndi, also very simple, through the context.lookup can be achieved.

For remote references and lookups of services, it is necessary to integrate context.lookup this way and DS in the implementation.

3. Is there a ready-made implementation?

The JNP of JBoss, from all kinds of evaluation, is still good.

4. Do you support cluster?

JNP is a support cluster.

5. What resources are available for reference?

The main reference resources are the two pages:

Http://hankun.blogbus.com/logs/1774694.html

Http://blog.csdn.net/cjp472/archive/2003/10/28/17570.aspx

Information on the Jndi cluster:

Http://www.wangchao.net.cn/bbsdetail_30257.html

From the above several aspects, Jndi Basic is to meet the service registration and the need to find, of course, in the implementation of the time to do a certain transformation, but overall, or good, and so spike after jini to make a choice, why would think of Jini it, is because of the famous Newton project , Newton Project is based on Osgi+jini implementation of the SCA framework, so it is worth reference, for the funeral, please see the next chapter decomposition,:).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.