Populate - Real time site traffic
Thursday, August 14th, 2008Today I’m stumbled upon this interesting site that shows the activity of the net in real time.
Every time someone visit a site a flash light on the map.
Read the rest of this entry »
Today I’m stumbled upon this interesting site that shows the activity of the net in real time.
Every time someone visit a site a flash light on the map.
Read the rest of this entry »
Great news for multiplayer flash games!
In the latest beta release of Flash Player 10, Adobe introduced the RTMFP support.
In short this technology will allow P2P communication between players and UDP:
Every flash application will be able to connect to another without going through a server, saving bandwidth and lowering latency.
A Flash Media Server will be required to establish the connection between players.
The next version of Flash Media Server (and maybe of Red5) will allow audio and video streaming from and to the flash player over the UDP, which is a more efficient way to deliver low latency packets.
Applications like Skype and the majority of multiplayer games already use that with obvious advantages.
Further informations:
RTMFP FAQ
Flash Player 10 Release notes
UDP Wikipedia entry
This week were released:
AMF3 specification
Action Message Format (AMF) is a compact binary format that is used to
ActionScript object graphs. Once serialized an AMF encoded object graph
to persist and retrieve the public state of an application across sessions or
endpoints to communicate through the exchange of strongly typed data.
And Java-Remoting BlazeDS Beta
BlazeDS is the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Adobe Flex and Adobe AIR applications for more responsive rich Internet application (RIA) experiences.
Previously available only as part of Adobe LiveCycle Data Services ES, Adobe is announcing its plans to contribute the proven BlazeDS technologies to the community under the LGPL v3. BlazeDS gives the rapidly growing Adobe developer community free access to the powerful remoting and messaging technologies developed by Adobe.
The source code will be available for download in early 2008.
In short: more AMF servers for free, other than RED5
I’ve not blogged too much lately, however, there was some strange “activities” on my blog…
Today someone in a comment warned me that I have some spam links in the footer visible only with javascripts disabled.
I’ve updated wordpress some days ago because I’ve noticed some spam links in my sidebar, but as it seems this wasn’t enough to fix the problem.
Luckily, I’m using subversion to manage wordpress updates, in this way I can see what happened to my wordpress:
? wp-includes/class-mail.php
M 6377 wp-includes/default-filters.php
M 6377 wp-includes/wp-db.php
M 6377 wp-includes/gettext.php
M 6377 wp-includes/pluggable.php
M 6377 xmlrpc.php
M 6377 index.php
M 6377 wp-admin/admin.php
M 6377 wp-admin/index.php
There was a new file class-mail.php and the others were modified.
Luckily nothing that a few svn revert commands couldn’t heal
If you want to check if you blog has the same “guest” links:
If so:
More info on this exploit: Phentermine attack
This episode is the proof of how useful is to install/update wordpress with subversion: Install wordpress with subversion
Must be blogged: The collaborative Zoomquilt 2.
Really worth seeing. Much longer, much better, now as a screensaver too.
Take the trip.
I've always thought that continuations are the right answer to many if no all the network-programming problems.
A continuation represent the state of execution of a function: all the local variables and the instruction pointer (the last line executed).
(Update: At least: there can be many kind of continuations. Other than the local variables, it's possible to store the state of the entire thread/process/stack)
You can interrupt the execution of a function and resume it later.
This can be useful to create "generators": iterators made simple.
A generator looks like this:
The function next return the next element in the arr array every time is called.
When you call the function you resume the continuation, so the execution will resume from the yield.
If you want to implement an iterator like that without generators you'll have to explicitly unroll the for loop.
The resulting code will be surely less readabe.
Like:
This can get really worse for every non-trivial iterator (eg: tree traversal).
Another nice use of continuations is to generate cooperative threads.
They are different from standard threads because they can't be stopped, they should cooperatively stop.
For example you can do:
The process function return the control to the calling function every time it has to do an asynchronous operation.
Without continuations you'll have to do:
As you can see we have used closures in a Continuation Passing Style:
Every time you have to do an asynchronous operation, you'll have to pass a function (a callback) that will be called when the operation is done.
Without closures the code will look even worst, this is why recently there is a great buzz about closures in the java world.
A continuations-like style of programming (but without continuations) is possible only using threads.
However, threads are the heavier and most problematic way to handle the I/O waitings. (see: 10Kproblem)
You have not only to deal with concurrency problems with read/write variables, but you have to block an entire thread for every I/O operation.
A better way is to use asynchronous events, like in the last two example. But of the two, which one do you prefer?
If your answer is like mine, take a look to:
-> operator the execution can be resumed from that point.Jetty scratched only the surface of what is possible with continuations, while with RIFE it's possible to develop highly concurrent servers using cooperative sessions instead of threads (some >10000 connections instead of 1000). See: Mina Java-NIO library, Perl POE, Mina-Mule.
A server that uses continuations, will allow the simple and linear programming style of blocking-synchronous operations while using non-blocking ones. With a huge increment in performance.
In the client side, the most interesting is NarrativeJs, that use an approach that can be adapted to every language:
it unroll loops and transform all local variables in object variables to generate his quasi-continuations.
became:
The code looks ugly but it is so to preserve line numbers.
With narrativeJs you can do complex animations in a simple, linear way:
or:
Really interesting now that Flash and Ajax are pushing asynchronous operations to the masses.
Will we say goodbye to events, and maybe to threads as we know now?
While I was wondering if using haXe or Java with my server, I've stumbled upon some discussion on Static Typing (Java) vs. Dynamic Typing (Ruby, Php).
In a really interesting blog post (read the comments too) I found this touching phrase:
"Static typing is Communist Bureaucracy".
In short: since we (should) have pervasive testing, Static Typing is only more testing. However, a comment is enlighting:
I'm finding this logic hard to follow. Testing is good, coverage is good. Static typing is, among other things, a way to have the compiler test your code for type issues. Since we like testing, this makes static typing good, right?
But Static Typing not only prevent you to do mistakes, like typos, it allows your IDE to know what you are doing:
DynamicStatic Typing speeds up development because there is physically less to type since ctrl+space and ctrl+2 write the declarations for you.
Its seems obvious to me that Dynamic Typing is worth the catch only for a quick start or for learning.
Since almost all of the dynamically typed languages (like Actionscript, Perl, Php) have migrated to some kind of Static Typing (eg: Type Inference), there should be a reason.
Periodically, a new Dynamically Typed language spawn, attracting junior/tired programmers with the mirage of the simplicity and the less-to-type-ing, riding the hype until his young audience grows and start doing large projects hoping not to call a function with the wrong arguments.
Only then they realize the big truth: Static Typing is just more informations in the source code.
And more information means less wondering-what-object-was or what-was-the-method-name-and-parameters or who-instantiate-this-object, not to mention static analysis.
And hey, they have invented Javadoc-like documentation and Annotations just to add some more information, why remove one of the most important?
Just like the title, incredibly fun.
Someone ported Markdown formatting to Javascript.
In the page linked, the text is formatted as you type. I wonder if there is a Wordpress plugin that do something like that.
I've adhered to the campaign: "Ban Time Travel Now!"
To preserve the integrity of the spacetime continuum, I hereby petition the governments of the world to immediately enact laws banning the research and practice of time travel.