Ok, so I have this assignment in one of my courses at the University of Sussex, Distributed Systems. The thing is that we need to implement a distributed event notification system, in which clients subscribe themselves to the server to which some event generators sends their events.

All of this, using RMI (Remote Method Invocation) in Java.
The assignment is an introduction to distributed objects in java by implementing this little system. In it, each Event Generator, sends events to the server, made of an identification string and a message (in fact, it could be any kind of object).
On the other hand, the server get subscriptions of clients. These send the server a regular expression and a timeout, each of which would be used to choose among the different events received and to set a maximu time in which the subscription is valid. When doing so, the server sets up a callback function to the clients so, when a matching event is received, the server has a way to send the clients the object (event). I think it can be better understood by looking at the graph above.
So far, it’s been quite interesting to learn this kind of distributed framework, although java is not my kind of language. I want to do some more researh on how to do this kind of things with other languages like ruby o r python. Seems to me interesting.
Here is a little bit of the code used, just for curiosity:
public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
try {
EventNotificationServer server = new EventNotificationServerImpl();
String hostName = InetAddress.getLocalHost().getHostName();
Naming.rebind("//" + hostName + "/"
+ EventNotificationServer.rmiName, server);
System.out.println("EventNotificationServerImpl bound to "
+ hostName);
} catch (Exception e) {
System.err.println("EventNotificationServerImpl exception: "
+ e.getMessage());
e.printStackTrace();
}
}
The assignment is an introduction to distributed objects in java by implementing this little system. In it, each Event Generator, sends events to the server, made of an identification string and a message (in fact, it could be any kind of object).
On the other hand, the server get subscriptions of clients. These send the server a regular expression and a timeout, each of which would be used to choose among the different events received and to set a maximum time in which the subscription is valid. When doing so, the server sets up a callback function to the clients so, when a matching event is received, the server has a way to send the clients the object (event). I think it can be better understood by looking at the graph above.
So far, it’s been quite interesting to learn this kind of distributed framework, although java is not my kind of language. I want to do some more researh on how to do this kind of things with other languages like ruby o r python. Seems to me interesting.
Here is a little bit of the code used, just for curiosity:
public static void main(String[] args) {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
try {
EventNotificationServer server = new EventNotificationServerImpl();
String hostName = InetAddress.getLocalHost().getHostName();
Naming.rebind("//" + hostName + "/"
+ EventNotificationServer.rmiName, server);
System.out.println("EventNotificationServerImpl bound to "
+ hostName);
} catch (Exception e) {
System.err.println("EventNotificationServerImpl exception: "
+ e.getMessage());
e.printStackTrace();
}
}
we have the same assignment now in the same course same uni.. have you managed a solution?
Comment by anonymous — January 30, 2010 @ 14:07
Dude, chill. I’ve received your other comments but I don’t have much time.
Thing is, I don’t remember much about this and, yes, we managed a solution… 4 years ago. What about you actually do your assignment and come up with a solution yourself?
Comment by jroncero — February 2, 2010 @ 00:29
Didnt ask to give me the solution! I am not this kind of person i was just googling and thought you could help as I am helping people who are in their first year.. Thanks anw !
Comment by anonymous — February 2, 2010 @ 17:45