Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serkan-ozal/hermgen
Hazelcast Based Distributed ClassLoader and PermGen
https://github.com/serkan-ozal/hermgen
Last synced: 19 days ago
JSON representation
Hazelcast Based Distributed ClassLoader and PermGen
- Host: GitHub
- URL: https://github.com/serkan-ozal/hermgen
- Owner: serkan-ozal
- Created: 2015-06-13T15:29:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-21T18:06:01.000Z (over 9 years ago)
- Last Synced: 2024-10-17T00:12:52.378Z (30 days ago)
- Language: Java
- Size: 156 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HermGen
Hazelcast Based Distributed ClassLoader and PermGen1. What is HermGen?
==============
**HermGen** is a kind of classloader searches unknown classes over cluster based on Hazelcast. **HermGen**'s distributed classloader searches classes at classpath at first. Then if the requested class coulnd't be found at classpath, **HermGen** sends workers for getting bytecode of requested class to other members in cluster. These workers runs on other members and search the requested class on them and send the bytecode of requested class to caller as response if it is able to find on target member.The demo application is at [here](https://github.com/serkan-ozal/hermgen-demo).
2. Installation
==============
In your `pom.xml`, you must add repository and dependency for **HermGen**.
You can change `hermgen.version` to any existing **HermGen** library version.``` xml
......
1.0
......
...
com.hazelcast
hermgen
${hermgen.version}
......
...
serkanozal-maven-repository
https://github.com/serkan-ozal/maven-repository/raw/master/
......
```3. Configurations
==============
- `hazelcast.hermgen.dontCreateEmbeddedInstance`: Disables creating embedded Hazelcast instance to connect the cluster for retrieving requested class data. So in this case **HermGen** expects Hazelcast instance configured programmatically by user as `HermGenDistributedClassLoader.getInstance().setHazelcastInstance(hazelcastInstance);`. Default value is `false`.4. Usage
==============
To enable **HermGen**, you must set the system classloader by `-Djava.system.class.loader=com.hazelcast.hermgen.HermGenDistributedClassLoader` as VM argument.By default, `HermGenDistributedClassLoader` starts an embedded Hazelcast instance (with group name `hermgen-group`) to connect the cluster for retrieving requested class data.
If you want to provide your custom Hazelcast instance, you must set `hazelcast.hermgen.dontCreateEmbeddedInstance` to `true` by `-Dhazelcast.hermgen.dontCreateEmbeddedInstance=true` and you can inject your Hazelcast instance over `HermGenDistributedClassLoader` like this:
``` java
HazelcastInstance myHzInstance = ...
...
HermGenDistributedClassLoader.getInstance().setHazelcastInstance(myHzInstance);
```However note that, until you inject your Hazelcast instance to `HermGenDistributedClassLoader`, `HermGenDistributedClassLoader` doesn't search unknown classes over cluster so you get `ClassNotFoundException` for classes these are not exist in your local classpath.
5. Contribution
==============
- If you think that there is a bug about **HermGen**, please feel create a `bug` labelled issue ticket [here](https://github.com/serkan-ozal/hermgen/issues/new)
- Even if you have a new feature or enhancement request for **HermGen**, you can create an `enhancement` labelled issue at [here](https://github.com/serkan-ozal/hermgen/issues/new)
- Or if you have a question about **HermGen**, you can aslo create a `question` labelled issue at [here](https://github.com/serkan-ozal/hermgen/issues/new)
- I am glad to get your work into **HermGen** so if you have done some stuff (fix, enhancement or new feature) about **HermGen** and want to put them into **HermGen**, you can send a pull request from your repository.6. Roadmap
==============- Class selector strategy at caller side if there are different versions of requested class on the cluster.