This page is still under heavy construction ...
- Welcome to SIMON
- What is SIMON?
- Targets
- Comparison to RMI
- Features
- Why SIMON is better than ....
- How it works
- Performance
- License
- Prices for Commercial License
- Get SIMON
- Sourcecode
- Compile from Source
- Binaries
- Maven Site, JavaDoc, ...
- Setup your project
- Help
- Samples/Howtos
- Supporter
Welcome to SIMON¶
Welcome to the SIMON developer wiki. Here you will find all important information and files to get your project powered by SIMON running.
I always recommend to read all from top to bottom. But If you are in a hurry: Select the topic you're interested in from the table of contents on the top right.
What is SIMON?¶
SIMON is a Java(tm) API, that performs the object-oriented equivalent of remote procedure call. With SIMON you are able to use Java objects, which are located in another JVM on the current machine, on another machine in the local network or even on a servermachine somewhere on the internet.
Targets¶
Sun's JRE/JDK already contains a technique for using remote objects. It's called RMI. Today, this implementation is really old but widely used in many (enterprise)applications. It works quite well, but it has some disadvantages that (partly) where not present in the early days of RMI: It's not that easy to use as it could be, and you run into troubles if you use it in a non LAN environment (say: the Internet ;-) ). So the intention of SIMON development was to provide an API wich is small, flexible, really easy to use and integrates seamless into more complex network environments. You'd say that SIMON is the RMI alternative for communicating via internet.
Comparison to RMI¶
SIMON solves most of the issue RMI users complain about. Here is a comparison that shows the top most issues comparing Sun's RMI and SIMON.
| RMI | SIMON | |
|---|---|---|
| I/O technology | Old Java IO implementation. | Apache MINA Framework which uses Java N(ew)IO. |
| Transparent network socket usage? | No | Yes |
| No. of used socket connections between client and server? | At least one | At most one |
| No. of used threads on server side? | Unknown. It depends among other things on the number of connected clients. It's not under your control. | A few. It depends on the used thread pool settings in the filter chain. You can serve, i.e. 1000 clients with only 50 threads. It's totally up to you. |
| Firewall/Router friendly? | Yes, as far as no callbacks are used. | Yes |
| Connection via web proxy possible? | Only via HTTP tunneling. This results in a very slow connection | Yes, if proxy supports the "CONNECT" command. For security, "basic authentication" is supported |
| Secure communication with SSL? | Yes, with some extra effort | Yes |
| Protocol replaceable with own implementation? | No | Yes |
| Performant file/data transfers | No | Yes |
Features¶
- Remote Procedure Call: client can call methods on server, server can call methods on client (callback)
- Extremely scalable thanks to Java NIO and the use of thread pooling mechanism
- Proxy support: Let a client connect f.i. via a company proxy to your SIMON server
- SSL support: strong communication encryption with SSL
- Transparency: SIMON uses only one bi-directional socket connection between server and client, even if you use more than one remote object and callbacks
- Exchangeable protocol: You are not happy with the protocol SIMON uses? Then go ahead and create your own...
- Connection loss detection: Detect a broken connection in less time
- Connection statistics: Know at any time how many messages/bytes are sent/received
- RawDataChannel: Transfer raw data from client to server (and vice versa) without time consuming reflection and serialization overhead
- PublishService: Find SIMON servers automatically on a local LAN
Why SIMON is better than ....¶
... RMI for internet applications???
As already mentioned above, RMI has problems in modern applications that communicate not only via LAN, but also via internet. On the internet we have obstacles like firewalls and routers. And it turned out that RMI has problems with that. Let me explain why. Have at look at the following figure:
As you can see, RMI uses more than one connection to call methods on both sides. The bad thing is that RMI by default opens an anonymous port on the client side which is used by the server to call methods on the client. With a Custom Socket Factory you can specify an port for this kind of callbacks. But then you still have the problem that the server's outgoing connection must pass the client's firewall or router.
A workaround would be, not to use callbacks and use a polling mechanism at the client side. But think of hundrets of clients polling all the time. Not a "good" solution.
Another solution would be a kind of blocking listener: The client calls a "listen" method und the server. The server blocks this call until there is some data to poll for the "listener".
This works, but is also not a simple and good solution. You need to have additional threads handling the listener and the blocking mechanism etc.
So let's have a look at how SIMON works:
There is only one connection between client and server which is established by the client. It is used for bi-directional method calling. You only have to allow the SIMON server port on the server's firewall or enable portforwarding on the server's router. That's all.
How it works¶
SIMON ist not just a copy of RMI. SIMON is doing many things different. At least internal. This is to give you an idea on what's going on internally...
- SIMON uses TCP to establish the connection between the client and the server
- This TCP connection is a statefull, permanent connection
- A client "opens" a connection to a server using the "lookup()" methods
- A client must "close" the connection by calling "release()" after it has finished using the remoteobject
- SIMON reuses existing connections. Let's say you want to use two remote objects from one and the same server. Instead of opening two connections, one for each remote object, SIMON opens the first connection with the first object, and reuses the already existing connection for the second object. This does not have any negative impact on the performance. It's the other way around: You save the time that is required to open the connection as well as the additional socket-resource. Also on server side there does not need to be an additional socket and thus there is no additional effort for the socket selector.
- The connection from client to server actually get's closed, when the last remoteobject that used this connection is released.
- There is no automatic reconnect that brings a client back online after a connection interruption. This is due to the fact, that SIMON does not know anything about the context that exists between the client and the server. So reconnection and bringing back the last context has to be done on application level.
Performance¶
Tests on a Intel Quad-Core 4x2.4Ghz@4GB RAM with OpenSuSE 10.1 linux showed, that a SIMON server can handle about 11k (!!!) method calls per second without eating 100% cpu on all cpu cores on localhost. That means that a single method call on an average needs less than 1/10000sec!
Further tests have to be made -> FIXME
License¶
SIMON is dual-licensed and offers licenses for two distinct purposes - closed source and open source development.
If you want to use the GPL version, you'll have to put your own program under the GPL as well. This means you'll also have to release your source code along with your binary version, which may in turn be altered and re-released. If you choose the Commercial License instead, you're allowed to release your software without making the source public.
Prices for Commercial License¶
I don't ask for millions, but SIMON is not free of charge for GPL incompatible use. The following price table applies to root1.de Commercial License as described above:
- Developer License (1 developer): 49.- EUR
- Team License (5 developers): 229.- EUR
- Workgrop License (25 developers): 999.- EUR
- Enterprise License (100 developers): 3499.- EUR
For purchasing the commercial license, please get in contact with me -> info[at]root1.de
If you have the feeling that the price for the above mentioned licenses is inappropriate, please have a look at what Ohloh calculates:
Get SIMON¶
Sourcecode¶
Access the source code repository for this project in one of following ways:
- Browse source code online to view this project's directory structure and files.
- Check out source code with a Subversion client using the following svn command.
svn checkout http://svn.root1.de/svn/simon/trunk simon
If you are new to Subversion, you may want to visit the Subversion Project website and read Version Control with Subversion.
Compile from Source¶
You can easily build the project by using Maven. But first, you have to have a working Maven Environment. If you are new to Maven, you may want to visit the Maven Project website for more details.
Binaries¶
If you don't want to build SIMON yourself you can download pre-compiled binaries. You can choose between the latest release and the latest development snapshot.
Release
Visit this link for downloading latest release:
Direct Download: http://dev.root1.de/projects/list_files/simon
Maven Repository: http://nexus.root1.de/content/repositories/releases/de/root1/simon/
Snapshot
Visit this link for downloading latest snapshot:
http://nexus.root1.de/content/repositories/snapshots/de/root1/simon/
Maven Site, JavaDoc, ...¶
With each deployment of SIMON to the maven repository, also a project site is generated. The site contains f.i.
- JavaDoc
- Reports like test coverage
- Dependency Information
- ...
Please follow this link:
http://dev.root1.de/project-sites/simon/
Setup your project¶
Depending on your IDE, there are different steps for setup your project to work with SIMON:
Help¶
You need help on using SIMON? You do not know how to start? In this section you will find a first "hello world" sample and usefile tips on how to do <whatever>, explained with simple codesnippets. And if you have a more complex question, do not hesitate to post in the support forum. Help is provided in english and german language.
Samples/Howtos¶
- Simon 1.0.0 - SimonRemote Interface
- Simon 1.1.0 - SimonRemote Annotation
Supporter¶
SIMON is supported by:
YourKit Java Profiler
YourKit is kindly supporting open source projects with its full-featured Java Profiler.
YourKit, LLC is creator of innovative and intelligent tools for profiling
Java and .NET applications. Take a look at YourKit's leading software products:
YourKit Java Profiler and YourKit .NET Profiler.
