Posts Tagged macosx
IBM’s distributed caching system, WebSphere eXtreme Scale (formerly ObjectGrid) is a distributed, transactional object caching system for elastic scalability and extreme performance.
It can store any type of data and provides REST API as long with Java (HashMap, JPA, Hibernate, Spring) APIs. It also natively integrates with WebSphere Application Server and WebSphere Liberty Profile to cache HTTP session data.
It is supported on most platforms and – because it is a pure JavaSE application, it also works on Mac OS X, although this platform is not officially supported by IBM.
How to get started ?
- Download eXtreme Scale trial and unzip
- In a Terminal, go to product directory
- cd ObjectGrid/gettingstarted
- Run the Catalog Server
- Open another Terminal window and start an ObjectGrid server
- ./runcontainer.sh server0
- Repeat the last step to create several instances of ObjectGrid server
- Then experiment with client script. It provides basic CRUD operations from command line
- ./runclient.sh i key value
Congrats, you managed to setup a multi instance grid, in-memory cache system on your Mac.
To further understand how it works and how you can programmatically interact with the cache, refer to eXtreme Scale documentation.
Next step will be to demonstrate how eXtreme Scale integrates with Liberty to create a multi instance cluster with shared HTTP Session. Stay Tuned.
If you have performed a fresh install of Mac OS X Lion or if you plan to install MacPort after having installed Lion, you will soon realize that the MacPort team does not distribute (yet) a Lion installer. Snow Leopard installer will fail when detecting Lion.
Question is therefore : how to install MacPort on Lion ? Answer : install it from the sources.
It might be scarry, but it is very easy, here are the details.
Preriquisite : install Aple’s development tool XCode. It is freely available from the App Store (be patient it is a 3.5 Gb download)
- Open a terminal
- create a directory for the sources
- Fetch the sources
sudo svn checkout http://svn.macports.org/repository/macports/trunk
cd trunk/base sudo ./configure --enable-readline sudo make install
sudo make distclean
- Change your profile to include MacPort in the PATH
#!/usr/bin/bash # MacPort export PATH=$PATH:/opt/local/bin
- Source your profile to include the changes
That’s it ! Easy as I promised.
You can now search for package with
sudo port list | grep <your search>
and install packages with
sudo port install <package name>
First test is obviously :
marsu:~ sst$ /Library/Java/JavaVirtualMachines/openjdk-1.7-x86_64/bin/java -version openjdk version "1.7.0-internal" OpenJDK Runtime Environment (build 1.7.0-internal-henri_2010_11_25_16_22-b00) OpenJDK 64-Bit Server VM (build 20.0-b02, mixed mode)
Then I configured Netbeans to use that JDK to compile and run projects :
BTW, should you want to create the builds yourself, everything is documented – you can even start a continuous build with Hudson. You can then download specific scripts to build OpenJDK on MacOSX and to create the installation packages (Will require Apple’s Developer Tools to be installed)
Mac OS X is usually a very stable OS, over the last 10 years I can count on my fingers the rare number of cases when the system entirely crashed and required a reboot.
(I am not counting the deliberate attempts to make it crash , playing with development version of kernel modules or very very early builds of all kinds)
Since a couple of months however, I am able to crash the entire system just using iTunes.
When downloading multiple files simultaneously or when starting any type of concurrent disk access for several minutes, iTunes freezes, bringing the whole system down with him.
It looks like this is linked to my type of machine (iMac 24″) as I can not reproduce on any other three machines at home. I am not the only one experiencing this issue. Apple’s support forums host a thread here and another here with people describing exact similar symptoms (some of them with PowerMacs too)
As I am part of the Apple developer Program, I opened a bug report to request attention about this.
Surprisingly, Apple answered with 2-3 weeks asking for more details, in particular, a stack trace of the system while in frozen state.
Stackshot can be enabled as follows:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.stackshot.plist
Then, type the following chord:
a file will be written out /Library/Logs/stackshot.log and a symbolized file will be written to /Library/Logs/stackshot-syms.log
Unfortunately, this does not help in my case as the whole system was unresponsive when the crash occurs, I have no possibility to type any command while the system is frozen.
Apple then asked me to produce a core dump, using Non Maskable Interrupt trigger and a remote core dump server.
Basically, the idea is to configure the kernel to let it send a core dump to a remote server, through the network. On another machine, you’ll have to setup the core dump server, i.e. a process that will listen on the network, will accept the connection from the crashed kernel and will dump the data to a file on disk.
Once the kernel client and the core dump server configured, you need to tell the kernel to generate the data and send them to the remote server. For this top happen, you’ll need to force a panic with DTrace for example.
But in my case, the kernel is not panicking, just freezing.
This method is explained with many details and options in Apple technical Note TN2118. It is surprisingly easy to setup and allows to collect valuable debugging information for developers. I am attaching a screen shot of the crashed machine while in this state.
I hope Apple will be able to provide a fix for this issue.