Distributing with JShooter

Joined
Jul 18, 2010
Messages
4
Reaction score
0
JShooter is combination of SOP,RMI,JMS


JMS
The Java Message Service (JMS) API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients. JMS is a part of the Java Platform, Enterprise Edition, and is defined by a specification developed under the Java Community Process as JSR 914. It is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It allows the communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous.
Messaging is a form of loosely coupled distributed communication, where in this context the term 'communication' can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax tightly coupled communication (such as TCP network sockets, CORBA or RMI) by the introduction of an intermediary component, which in this case would be a queue. The latter approach allows software components to communicate 'indirectly' with each other. Benefits of this include message senders not needing to have precise knowledge of their receivers, since communication is performed using this queue. This is the first of two types: point to point and publish and subscribe.


SOP[/size]
Service-oriented programming (SOP) is a programming paradigm that uses "services" as the unit of computer work, to design and implement integrated business applications and mission critical software programs. Services can represent steps of business processes and thus one of the main applications of this paradigm is the cost-effective delivery of standalone or composite business applications that can “integrate from the inside-out”


An in-memory service in SOP can be transparently externalized as a Web Service operation. Due to language and platform independent Web Service standards, SOP embraces all existing programming paradigms, languages and platforms. In SOP, the design of the programs pivot around the semantics of service calls, logical routing and data flow description across well-defined service interfaces. All SOP program modules are encapsulated as services and a service can be composed of other nested services in a hierarchical manner with virtually limitless depth to this service stack hierarchy. A composite service can also contain programming constructs some of which are specific and unique to SOP. A service can be an externalized component from another system accessed either through using Web Service standards or any proprietary API through an in-memory plug-in mechanism.

RMI

The Java Remote Method Invocation Application Programming Interface (API), or Java RMI, is a Java application programming interface that performs the object-oriented equivalent of remote procedure calls (RPC).
1. The original implementation depends on Java Virtual Machine (JVM) class representation mechanisms and it thus only supports making calls from one JVM to another. The protocol underlying this Java-only implementation is known as Java Remote Method Protocol (JRMP).
2. In order to support code running in a non-JVM context, a CORBA version was later developed.
Usage of the term RMI may denote solely the programming interface or may signify both the API and JRMP, whereas the term RMI-IIOP (read: RMI over IIOP) denotes the RMI interface delegating most of the functionality to the supporting CORBA implementation.
The programmers of the original RMI API generalized the code somewhat to support different implementations, such as a HTTP transport. Additionally, the ability to pass arguments "by value" was added to CORBA in order to support the RMI interface. Still, the RMI-IIOP and JRMP implementations do not have fully identical interfaces.

AND NOW JSHOOTER

JSHOOTER is a combination of JMS, because you send message and get the response with it, you can call method with it so it work for you like RMI and you can distribute your program with it,and also you can use it as have a service oriented programming (SOP).Because it help you to use services of other sources.

you know how it is so powerful ?
because it's a reflect oriented framework.
 
Joined
Jul 18, 2010
Messages
4
Reaction score
0
clinet


============================================
package client;

import org.j2sos.shine.jshooter.*;


public class Invoker {
public static void main(String[] arg) throws Exception {
ServerApplication sapp = new Application().receive("paris", "myapp");
sapp.newInstance("server.MyClass");
sapp.setFieldValue("msg", new String("hello"));
System.out.println(sapp.invokeMethod("writeMsg"));
}
}


================================================

server

================================================

distributer :


package server;

import org.j2sos.shine.jshooter.*;


public class Distributer {
public static void main(String[] arg) throws Exception {
Application app = new Application();
app.distribute(1099, "myapp");
}
}


myclass :

package server;

public class MyClass {
public String msg;

public String writeMsg() {
System.out.println(msg);

return msg + " recived";
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top