marat-gainullin / platypus-js

Apache License 2.0
9 stars 9 forks source link

Few things not mentioned in PlatypusJS documentation #85

Closed valeriy-maslov closed 8 years ago

valeriy-maslov commented 8 years ago

I was looking through PlatypusJS sources recently. So I found annotations not mentioned in PlatypusJS documentation and which I can't understand how to work with. Here they are. Wanna know more about this stuff. Also it would be cool if there will be detailed description in docs in future.

/**
* Annotation marks a module as a protocol acceptor Example:
*
* @protocol asc6, asc2
*/
public static final String ACCEPTOR_TAG = "@acceptor";
public static final String ACCEPTED_PROTOCOL_TAG = "@protocol";

How exactly to use this? And what is protocol anyway in this case - module name, built-in lib or java class or what? There is some info in administration guide about configuration of protocols for Platypus Application server, but nothing more.

Let's say I have kinda client with it's own binary protocol (e.g. online game). So what exactly I should do using PlatypusJS to make server endpoint supporting this protocol?

PS: BTW, what is platypus protocol? Which tasks it is used for? Can I use it as a communication tool in a few separated platypus J2EE applications for cross-application RPC and data transfer?

marat-gainullin commented 8 years ago

Annotation @protocol is used within Platypus Thin Server to enable various protocols' javascript handlers. In general, they are used for PositioningPacket instances handling within Sensors project.

Since sensors project now is a separate project, it is not recommended to use these annotations in applications.

platypus protocol is tcp communication protocol used in Platypus SE client and Platypus SE server communication.