Liteorm 7: Remote Object Access socket

Source: Internet
Author: User
I. Summary

In the previous article, we have already talked about remote access objects. Now let's see how they are implemented internally. This remote object access is implemented using socket.

Ii. Outline

A. Summary.

B. Outline of this article.

C. Review.

D. Socket design.

E. Others.

Iii. Review

1: in the previous article liteorm study 6: remote objects we mentioned that adding dataentity to the object class can be accessed on the network. What specific technology is there, there are several implementation methods. webserivce, WCF, socket, remoting.

2: in the previous article, I learned liteorm 6: We only talked about how to use remote objects in remote objects.

Iv. Socket Design

In Oha, socket technology is used to remotely access business objects.

1: in the previous article, we mentioned that adding dataentity to the object class can be accessed on the network, there is a socketportal on both the client and server, which contains the methods and attributes of remote access.

2: In Oha, the same fixed and extended methods are used as csla.

Several fixed events are used. They are dataportal_create dataportal_fetch dataportal_insert dataportal_update dataportal_delete. We also provide

Extended Interface. You can implement this interface to customize events.

3: Socket design diagram

We can see that both the client and the server have a socket data portal, which uses Socket as the remote object access.

On the server side: simply start the socket data portal. By default, the local server is used as the server. Currently, no IP address is specified for the server.

Socket is mainly responsible for two tasks: connection management and business processing.

Server_onacceptclient event is responsible for connection management

Server_onreceivedata event is responsible for business processing

V. Others

In Oha, socket technology is used to remotely access business objects.

1: Add logs.

2: distributed deployment and multi-server Deployment Solution.

3: You can specify a computer as a server.

4: users can expand their own.

5: enhance the learning of design patterns. This is for myself. We need to study socket in depth to improve this design.

6: I hope the experts will give more comments.

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.