HPCwire explains in a recent article how NVIDIA wants to offer access to a remote rendering cluster called ‘RealityServer’. The current description sounds more like a typical remote software offer (’software as a service’, if you prefer), and not like remotely accessible raw GPU cores, as the title suggests. Anyway, worthwhile a look…
Categories » ‘Software Development’
Cloud APIs
October 5th, 2009 by PeterMy home standardization body OGF published the first list of requirements for a Open Cloud Computing Interface. One of the more interesting parts of this spec is the feature matrix for existing cloud APIs to be considered:
- Amazon Elastic Compute Cloud
- ElasticHosts
- Flexiscale
- GoGrid
- Sun Cloud API
- Rackspace Cloud Servers
- WMware vSphere
Their analysis shows some interesting facts:
- Amazon does not support persistent computer resources, most others do.
- Only Amazon has support for ephermal (real local) storage resources, which are huge and performant, but not resilient to hardware faults. Everybody supports virtual persistent storage.
- Static IPs and firewall features are about to become “cloud mainstream.”
SingleCall activation and static variables
September 24th, 2009 by PeterIn my middleware course, I asked the question of how to realize a statefulSingleCall remoting server. I expected to hear something about external state storage, e.g. in a database. To my surprise, most students proposed to use a static variable in the server implementation for keeping the state between calls.
This idea results from a pure programming-language thinking, and (for most students) from successful experimentation. Looking under the hood, it is not completely obvious that this will work in all cases. Static variables are managed by the CLR as entities bounded to a loaded class, in this case the server class. According to most sources, static variables are only garbage collected when the class is garbage collected. This can only happen if the surrounding application domain is unloaded. For a standard remoting server, this is very unlikely to happen ever.
Things become more interesting with a different runtime host than the operating system. If you use IIS, it could decide to unload your whole server application if it is not triggered often enough, or if memory is whole.
All in all, relying on static variables in a virtual runtime environment is bad style.
- http://www.navwin.com/Topics/AppDomainRecycling/AppDomainRecycling.aspx
- http://stackoverflow.com/questions/851370/garbage-collection-of-static-members
BTW: I know that .NET Remoting is deprecated in favour of WCF, but it is still a very helpful teaching tool.
.NET Sources
September 24th, 2009 by PeterI was completely unaware of this, but since Visual Studio 2008, you can debug into the .NET class library sources. Shawn Burke has a good explanation how it works.
Java EE 6 on the way
November 7th, 2008 by PeterTime is running so fast …
Sun is about to release a new beta version of their application server GlassFish, which will implement the next J2EE / Java EE version 6. As usual, Java EE 6 is based on a JCP document.
One new focus is on profiles, which allow to take a subset of the (huge) Jave EE API set and build an according “compliant” application server. The major use case are – of course – web applications. So the only profile under discussion so far is the “Web Profile“. This includes the unavoidable inclusion of REST support.
The more interesting part is called “pruning”. The Sun people aim at some cleanup of the historically grown API set, which is really a good idea. Most of the currently discussed removal candidates have more powerful replacements since EE 5, so this is not extremely painful. The early review draft document of the EE 6 spec says:
“Technologies that may be pruned in a future release are marked Proposed Optional below. Technologies that have been pruned are marked Optional below. There are no Optional technologies for Java EE 6.”
The “proposed optional” marking is so far only given for JAX-RPC and JAXR (search for “POPT” in the JCR document). So you can see that Sun remains extremely conservative with non-backward-compatible changes. This is somehow bad, because the burden of nearly unused small API’s is still there. Who ever used JavaMail ?
GlassFish will also add support for several JVM-based scripting languages such as JRuby. This smells like a reaction on the .NET idea, and is anyway a good step. The Java language / component model still contains huge design mistakes from the past (e.g. call-by-value vs. call-by-reference, package structure as directories, naming conventions as component layout, …), so it is wise to open up for alternatives. The realization strategy is nebulous, and the David Wheeler argument again strikes. JRuby wraps Ruby code in Java classes, which are instantiated by a Java application server, which is run by the virtual machine, which relies on operating system libraries, which rely on the operating system core functions, which …. Layers over layers over layers.
Password check against LDAP server in PHP
August 26th, 2008 by PeterI have a long and unfriendly history with PHP. Since I moved to serious languages such as Python, these dark times are over. However, a colleague asked me for some help with his PHP application. He wanted to check user name and password against the LDAP interface of a Lotus Notes server. Here is the code snippet.
I left out the HTML form code that fills the $_POST variables. The “uid” attribute as anchor to find further information might not work in other directories than Notes. Use a tool on your server to find the right one.
Please note that PHP silently performs an anonymous bind if the provided password in ldap_bind() is empty. Please also note the very “advanced” result structure of ldap_get_entries(). No further comment …
[sourcecode language='php']
if ($_POST["user"]) {
if (trim($_POST["pw"])==”") die(“Empy password not allowed”);
$server=ldap_connect(“our.ldap.server.se”);
if (@ldap_bind($server, $_POST["user"], $_POST["pw"])) {
print “Good one
“;
} else {
print “Go away
“;
}
// for fun, get all available info about this guy
$query=ldap_search($server, “”, “(uid=” . $_POST["user"] .”)”);
$res=ldap_get_entries($server, $query);
for($entry=0; $entry < $res["count"]; $entry++)
for($attr=0; $attr < $res[$entry]["count"]; $attr++) {
$attrname=$res[$entry][$attr];
for ($val=0; $val < $res[$entry][$attrname]["count"]; $val++) {
$actval=mb_convert_encoding($res[$entry][$attrname][$val], "HTML-ENTITIES", "UTF-8");
print $attrname . ": " . $actval . "
“;
}
}
}
[/sourcecode]
Windows Limits
August 25th, 2008 by PeterEvery article by Mark is really fun to read, but the recent one also has a unique screen shot about the true scalability of Windows …
![]()
XML Benchmarks
July 2nd, 2008 by PeterHere is a list of XML benchmarking tools that might be interesting to use. It was originally collected for my course on parallel XML processing.
There are tons of small performance test scripts out there. I tried to reduce the collection to full-fledged benchmark applications that focus on comparative results for different XML processors. Another investigation is that the two famous XSLT benchmarks (XSLTMark and XSLBench) somehow disappeared. Maybe somebody still has a link for download.
Drop a comment if you have other suggestions.
Parser / XSLT benchmarking
- XMLBench
- Parser / XSLT benchmark kit for all major C and Java parsers
- Single benchmark implementations: Non-validating DOM / SAX parsing, DOM tree creation, Schema validation, XSL transformation, XML Security encryption
- Measures initialization time, execution time, and memory consumption for different input file sizes (uses XMark generator)
- Mainly a prepared set of test applications for a huge set of XML processors
- Last update in 2004
- XPB4J
- Java XML parser / XSLT benchmark
- Framework for comparative measurements (e.g. DOM vs. SAX parsing)
- Can create random XML data, or work with given data set
- Code included to gather XML file statistics with different methods (SAX, DOM (JAXP, JDOM, DOM4J), XPP, XSLT stylesheet calling Java functions)
- Measures processing time and memory usage
- XMLTest
- Simulation of multithreaded server processing XML documents in parallel (Java / C# version)
- Contains multiple processing steps: Parsing, data access, modification, serialization
- Measures throughput of processed XML documents
- Support for different parser API’s (DOM, SAX, JAXB, StAX)
- Successor for Sun’s version of XMLMark (Microsoft’s version of XMLMark is still available)
- SPECjvm2008
- Overall benchmark for JVM implementations
- Contains a sub-benchmark for XML transformation and validation (javax.xml.transform, javax.xml.parsers)
Test data generation
- XMark
- Data generator for valid XML documents (DTD available)
- Certain probability distributions
- Only one factor to tweak, influences the resulting document size
- Simple C program, available in source code
- Intended for XQuery performance measurement, several example queries
- Last update in 2003
- ToXgene
- Synthetic data generator for XML
- Takes XML schema annotated with probability values as input
XQuery benchmarking
- XMach-1
- XQuery benchmark for XML-based 2-tier server systems (database + application server)
- Measurement of XQuery throughput and response time (query and update operations)
- Java implementation for server-side servlet and multiple parallel clients
- The Michigan Benchmark
- Micro benchmark for XML databases, with single data set
- Carefully chosen set of atomic query elements, implemented in XPath / XQuery
- Intended to allow the benchmarking of processing steps in XML query evaluation
- XOO7
- XQuery benchmark containing different queries for XML databases
- Data sets with various sizes
- Data generator, DTD and list of XQuery statements freely available
- XBench
- Exhaustive description of test data for XML databases
- Covers all possible aspects of XQuery
- According database generator implementation available
- TPoX
Google Coding Style
July 1st, 2008 by PeterI found a link to the Google C++ coding style guidelines. They use this rules for all their internal code development, so it might be also interesting for your project …
Developers visualized
June 17th, 2008 by PeterSlashdot had a nice story about the visualization of Open Source development history. Good for a lunch break …
code_swarm – Python from Michael Ogawa on Vimeo.