P2P GroupSpecifier Class Explained In Details Part 1
March 11th, 2010
If you’ve tried my tutorial on creating a simple chat using P2P NetGroup in Flash Player 10.1, you might have been wondering what the other parameters you can set up mean.
GroupSpecifier is a very powerful class and ASDocs are good resource to look in, but I thought I’d write few more words on this topic since it’s easier to understand with a little more explanation.
postingEnabled and multicastEnabled
These are self-explanatory. Just a little note: the difference between Multicast and Posting is simply in the overhead used during their management. Posting should be used when you have lots of senders sending relatively little data (like Chat). Multicast when you have fewer senders sending lots of data (Video, Chat).
peerToPeerDisabled
Why should I disable P2P when I am building a P2P application? Obvious question. This one is for IP Multicast.
Application-Level-Multicast (so called P2P Multicast) is multicast established over peers.
Native IP Multicast is multicast enabled in the network - it must be supported by routers and the network itself.
Fusion is Application-Level-Multicast and Native IP Multicast used together.
So, when you disable P2P by saying peerToPeerDisabled=true
, your app will use only Native IP Multicast, which is more efficient, but works mostly only in closed networks (like a company network).
serverChannelEnabled
Opens supporting functions from the server. In the basic scenario it enables auto-bootstrapping. Bootstrapping in this context means adding peers to the group. You can do this manually by calling the addBootstrapPeer
function or setting serverChannelEnabled=true
to make it automatic. In the P2P Chat example it basically takes care of adding peers to a group and establishes communication between them.
groupspecWithAuthorizations and groupspecWithoutAuthorizations
Difference? Security. If you set a posting or multicast password, the one “with” can post or multicast, the one “without” is receive-only.
Remember - GroupSpecifier is technically a String combined of properties and the name. If you change a property you will be in a different group.
More to come soon.
HP’s slate running Flash Player and AIR
March 9th, 2010
You don’t know it yet, but you really want to see this
With this upcoming device from HP, you will be able to enjoy the full rich web experience.
Go and watch it now!
.
Further reading:
Read the blog post by Phil McKinney (CTO for HP’s Personal Systems)
E-seminar materials: P2P Programming in Flash
March 4th, 2010
As promised, here are the links, presentation and materials I used and covered in my E-seminar on P2P Programming in Flash on Wednesday 3rd March:
- Recording (Connect):Â http://my.adobe.acrobat.com/p44261112
- Presentation: Hello-P2P.pdf
- Source-code: Source-p2p-eseminar.zip
Links:
- Adobe Stratus
- RTMFP Groups on Labs
- Flash Player 10.1
- Developer Connection:Â Differences between Adobe Stratus and LiveCycle Collaboration Service
- Adobe LCCS
Tutorials:
- Video tutorial - beginning with P2P (FP 10)
- Creating Simple P2P Chat with NetGroup (FP 10.1)
Real Text-To-Speech For Your Flash Apps
March 2nd, 2010
Text-to-speech has been around for many years, but you know it has never really worked properly. It sounded like a metal can, had issues with different languages, and so on. But I have good news for you.
Acapela created a SaaS (software as a service) offering for Text-To-Speech, which finally sounds pretty cool and I was quite amazed by it — even the Czech language is included This could be a very useful usability feature for your games. You can use it to read a story, chat messages, alerts and so on. I can even imagine this in your enterprise apps as a helper. I presume that having this functionality as a service can really reduce the size of your application (the voice bank must be huge) and CPU load, plus you also have all updates included.
They support ~20 languages in nearly 300 voice variations: Arabic, Czech, Danish, Dutch, English, Faroese, Finnish, French, German, Greek, Icelandic, Italian, Norwegian, Polish, Portuguese, Portuguese, Russian, Spanish, Swedish, Turkish.
Basic sample - more samples
* Built using my evaluation account - it should work till 25th March 2010
Basic code for retrieving voice from a string could look like this:
import com.acapela.vaas.BasicVaas; import flash.media.*; import flash.net.*; var myVaas:BasicVaas = new BasicVaas(); myVaas.accountLogin = "your_account_login"; myVaas.applicationLogin = "your_application_login"; myVaas.password = "your_application_password"; myVaas.generateMessage("heather22k", InputText.text); function messageAvailableEventListener(event:Event) { var channel:SoundChannel = BasicVaas(event.target).requestedSound.play(); } myVaas.addEventListener(BasicVaas.MESSAGE_AVAILABLE, messageAvailableEventListener);
- Acapela is a paid service, check pricing.
- API documentation (AS3).
- Check Acapela.tv