wildsonet-hazelcast 0.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +98 -0
- data/jars/hazelcast-all.jar +0 -0
- data/lib/wildsonet-hazelcast-version.rb +5 -0
- data/lib/wildsonet-hazelcast.rb +6 -0
- data/wildsonet-hazelcast.gemspec +41 -0
- metadata +73 -0
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Marek Jelen
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
= Wildsonet::Hazelcast
|
2
|
+
|
3
|
+
Hazelcast is an open source clustering and highly scalable data distribution platform for Java, which is:
|
4
|
+
|
5
|
+
* Lightning-fast; thousands of operations/sec.
|
6
|
+
* Fail-safe; no losing data after crashes.
|
7
|
+
* Dynamically scales as new servers added.
|
8
|
+
* Super-easy to use; include a single jar.
|
9
|
+
|
10
|
+
Hazelcast is pure Java. JVMs that are running Hazelcast will dynamically cluster. Although by default Hazelcast
|
11
|
+
will use multicast for discovery, it can also be configured to only use TCP/IP for environments where multicast
|
12
|
+
is not available or preferred.
|
13
|
+
|
14
|
+
http://www.hazelcast.com
|
15
|
+
|
16
|
+
http://www.hazelcast.com/documentation.jsp
|
17
|
+
|
18
|
+
== Status
|
19
|
+
|
20
|
+
* No documentation
|
21
|
+
* No tests
|
22
|
+
|
23
|
+
Not production ready … experimental … proof of concept.
|
24
|
+
|
25
|
+
== Configuration
|
26
|
+
|
27
|
+
To configure Hazelcast put "hazelcast.config" property filled with the path to Hazelcast configuration file
|
28
|
+
into system properties. For example with Rails, you might want to do something like
|
29
|
+
|
30
|
+
java.lang.System.setProperty("hazelcast.config", File.join(Rails.root, "config", "hazelcast.xml"))
|
31
|
+
|
32
|
+
== Usage
|
33
|
+
|
34
|
+
=== Hazelcast core
|
35
|
+
|
36
|
+
==== Maps
|
37
|
+
|
38
|
+
To get map(hash) with the name map_name use
|
39
|
+
|
40
|
+
map = Wildsonet::Hazelcast.map(map_name)
|
41
|
+
|
42
|
+
now to save to data into the map
|
43
|
+
|
44
|
+
map[key] = value
|
45
|
+
|
46
|
+
and to get back
|
47
|
+
|
48
|
+
map[key]
|
49
|
+
|
50
|
+
==== Queue
|
51
|
+
|
52
|
+
To publish a message in a queue
|
53
|
+
|
54
|
+
Wildsonet::Hazelcast.queue("name_of_queue").put(message)
|
55
|
+
|
56
|
+
and then to retrieve the message
|
57
|
+
|
58
|
+
Thread.new do
|
59
|
+
while true
|
60
|
+
msg = Wildsonet::Hazelcast.queue("name_of_queue").take()
|
61
|
+
# Do something with the queue
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
take() blocks current thread until new messages arrives to the queue and returns it.
|
66
|
+
To increase performance more threads may be utilized to take messages from queue.
|
67
|
+
|
68
|
+
=== SessionStore
|
69
|
+
|
70
|
+
==== Rack
|
71
|
+
|
72
|
+
#TBD#
|
73
|
+
|
74
|
+
==== Rails
|
75
|
+
|
76
|
+
#TBD#
|
77
|
+
|
78
|
+
=== Versions
|
79
|
+
|
80
|
+
==== 0.0.5
|
81
|
+
|
82
|
+
* Dejewelerize
|
83
|
+
* Rename module to Wildsonet
|
84
|
+
|
85
|
+
== Contributing to wildsonet-hazelcast
|
86
|
+
|
87
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
88
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
89
|
+
* Fork the project
|
90
|
+
* Start a feature/bugfix branch
|
91
|
+
* Commit and push until you are happy with your contribution
|
92
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
93
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
94
|
+
|
95
|
+
== Copyright
|
96
|
+
|
97
|
+
Copyright (c) 2010 Marek Jelen. See LICENSE.txt for further details.
|
98
|
+
|
Binary file
|
@@ -0,0 +1,41 @@
|
|
1
|
+
lib = File.join(File.dirname(__FILE__), "lib")
|
2
|
+
$: << lib unless $:.include?(lib)
|
3
|
+
|
4
|
+
require "wildsonet-hazelcast-version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
|
8
|
+
s.name = "wildsonet-hazelcast"
|
9
|
+
s.version = Wildsonet::Hazelcast::VERSION
|
10
|
+
s.authors = ["Marek Jelen"]
|
11
|
+
s.summary = "Hazelcast integration"
|
12
|
+
s.description = "Hazelcast integration and surrounding features."
|
13
|
+
s.email = "marek@jelen.biz"
|
14
|
+
s.homepage = "http://github.com/marekjelen/wildsonet-hazelcast"
|
15
|
+
s.licenses = ["MIT"]
|
16
|
+
|
17
|
+
s.platform = "java"
|
18
|
+
s.required_rubygems_version = ">= 1.3.6"
|
19
|
+
|
20
|
+
s.extra_rdoc_files = [
|
21
|
+
"LICENSE.txt",
|
22
|
+
"README.rdoc"
|
23
|
+
]
|
24
|
+
|
25
|
+
s.files = [
|
26
|
+
"Gemfile",
|
27
|
+
"LICENSE.txt",
|
28
|
+
"README.rdoc",
|
29
|
+
"jars/hazelcast-all.jar",
|
30
|
+
"lib/wildsonet-hazelcast.rb",
|
31
|
+
"lib/wildsonet-hazelcast-version.rb",
|
32
|
+
"wildsonet-hazelcast.gemspec"
|
33
|
+
]
|
34
|
+
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
|
37
|
+
s.test_files = [
|
38
|
+
]
|
39
|
+
|
40
|
+
end
|
41
|
+
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wildsonet-hazelcast
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
|
+
platform: java
|
11
|
+
authors:
|
12
|
+
- Marek Jelen
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-01-18 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Hazelcast integration and surrounding features.
|
22
|
+
email: marek@jelen.biz
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- LICENSE.txt
|
29
|
+
- README.rdoc
|
30
|
+
files:
|
31
|
+
- Gemfile
|
32
|
+
- LICENSE.txt
|
33
|
+
- README.rdoc
|
34
|
+
- jars/hazelcast-all.jar
|
35
|
+
- lib/wildsonet-hazelcast.rb
|
36
|
+
- lib/wildsonet-hazelcast-version.rb
|
37
|
+
- wildsonet-hazelcast.gemspec
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: http://github.com/marekjelen/wildsonet-hazelcast
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
version: "0"
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 3
|
63
|
+
- 6
|
64
|
+
version: 1.3.6
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.3.7
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Hazelcast integration
|
72
|
+
test_files: []
|
73
|
+
|