Flash is Single Threaded: RPC and AsyncToken behavior

So in Flex you can invoke a service (like a WebService method, or HTTPService.send()), which returns a token (mx.rpc.AsyncToken). After that, you set a responder on the token. When the results come back, the responder is called. Calling the send() method actually sends the request, so the whole construct looks bizarre, since you’re setting a responder/handler AFTER the call has been sent. This is a very common pattern in Cairngorm applications.

The fact is that this never fails, and I wondered why, because it looks possible (although unlikely) for an RPC call to return data before the responder is set. After thinking for a while, I remembered one of my first problems with Flash, years ago: it’s single threaded. After investigating on the web, I found out this is really what makes this (and a whole host of other async stuff) work in Flash/Flex. The call may return data, but since it’s single threaded, your method will surely be able to continue, and set the responder, before the result handler is called. Uncommon, to say the least.

Burrocracia NET/Virtua chega a novos extremos

Apesar do serviço ser excelente (e caro), a NET/Virtua me surpreendeu com a burocracia na semana passada. Quando fomos morar no antigo apartamento da minha avó, reativei a assinatura NET que meu pai tinha feito para minha avó. Com isso passei a pagar R$69/mês para ver enlatados americanos, e nenhum canal de filme. Além disso, fiz um pacote ‘fidelidade’ (você não paga assinatura, nem instalação, mas tem que ficar 12 meses senão paga multa) de um Vírtua 600kps, pagando $89/mês. Aqui no escritório temos um Vírtua 1200/600kbps, pagando R$140, então não achei ruim.
Agora, cinco meses depois, estamos nos mudando (pergunte a Dine sobre os detalhes, e sobre o coletivo, ok? isso aqui é blog de nerd) e preciso transferir tudo (TV e Virtua) para um novo endereço. Liga na ‘central de emburrecimento’ e olha que fácil: “Isso não é possível, senhor”. Pergunto a razão. “O contrato NET que o senhor possui, senhor, é vinculado ao condomínio, senhor, e não pode ser transferido, senhor”. 3 horas depois: “a nossa sugestão, senhor, é que o senhor faça uma nova assinatura no novo endereço, senhor, e depois cancele a antiga, senhor”. Mas é o plano ‘fidelidade’? “Nesse caso, senhor, o senhor estará pagando uma multa de R$240, senhor. Afinal o senhor está cancelando o serviço, senhor”. É o fim…
Depois de cinco horas (sério!!!) no telefone com os infelizes, um supervisor me indica a solução mágica: “Basta fazer uma nova assinatura NET/TV no novo endereço, senhor, com a mesma titularidade, que será possível transferir o Virtua/fidelidade para o novo endereço”. Trouxa eu que fiz isso, e agora estou a 6 dias tentando convencer algum outro infeliz, na área de PJ, ou via FAX, ou sinal de fumaça, “senhores”, que fiz o que mandaram, e que se não transferirem isso rapidinho, vou meter todo mundo no PROCOM, e cancelar todos os elogios jamais feitos ao Virtua. Fim do mundo!

Obs: já mandei mais de 50 faxes, e perdi nada menos do que 7 horas e quinze minutos no telefone, contadinhos, com esses infelizes. Anda logo, vai.

PS. Consegui finalmente esvaziar meu gmail, via POP/SSL. O POP deles só manda 600 mails de cada vez, é um inferno. Agora colocarei a conta do gmail via fetchmail na minha conta principal, tornando a menos inútil e mais verificada.

Gente demais, tentando demais, se divertir ao mesmo tempo

As vezes me vejo metido numa fria. Trânsito para ir até a esquina. Filas para entrar numa balada. Filas para entrar no cinema. Fila para qualquer coisa. Desde o ano passado venho dizendo que isso é pq “tem gente demais tentando se divertir ao mesmo tempo”. Aquele mundo de gente, que se fodeu a semana toda, o dia todo, trabalhando, no trânsito, no escritório, agora está num momento de ‘lazer’, e precisa urgentemente se divertir; fazem absolutamente qualquer coisa e passam qualquer perrengue necessário para fazer algo que outras pessoas igualmente estressadas chamariam convencionalmente de ‘diversão’.

Isso, claro, deriva da idéia básica que tem gente demais no mundo. Mas muita gente mesmo. E a quantidade de imbecis aparenta aumentar exponencialmente com a quantidade total de pessoas. Para um sociofóbico como eu, isso quer dizer: fique o mais longe possível de aglomerações; ao se cercar de pessoas, tente ao máximo manter a proporção de pessoas que já conhece em 1 para 1. (Hoje em dia estou perto da crise absoluta, que é “não saia de casa; não vale a pena”).

Um exemplo clássico de ‘diversão’ é ir ao cinema. Você paga caro (dois ingressos de cinema == 1 DVD original), pega trânsito para chegar, ao chegar fica horas rodando procurando uma vaga para estacionar, depois fica numa fila em ziguezague suando, pois fora da sala de cinema não tem ar condicionado; depois você entra na sala, e morre de frio, pois está suado e o ar agora está no máximo. Daí você assiste a 40 minutos de propaganda, que você não solicitou, e aí sim poderá assistir ao seu filme. Isso sim é diversão! Ou então, você pode também chegar ‘atrasado’ na sala (na hora marcada), e pegar um lugar na primeira fila, e ficar com torcicolo olhando para cima/lados tentando enxergar alguma coisa. Pelo menos não terá ficado na fila tanto tempo…

Este último domingo fui ao cinema, com minha mulher e minha afilhada, ver um filme infantil, dublado. Até que não tinha trânsito! Não pegamos fila também. Chegamos 30 minutos antes da hora marcada para o filme, e sentamos na quarta fileira, com o cinema já quase lotado. Mesmo assim parecia bom demais. Then came the catch. Always a catch. Na fileira de trás, sobravam dois lugares pouco antes de começar o filme. Chega uma família, o pai, a mãe, e duas crianças, de uns 3 anos. Como estamos no Brasil, e esses caras eram brasileiros, lógico, solução óbvia e correta, sentam-se os quatro nas duas cadeiras, com as crianças no colo, logo atrás de nós. Não precisaria ir longe para imaginar o que aconteceu durante o filme… uma das crianças, que não ficava sentada no colo dos pais, ficou o filme todo pendurada na minha poltrona, gritando de vez em quando na minha orelha. Pior que a criança, o pai do infeliz passou o tempo inteiro tentando ‘acalmar’ a criança, sem calar a boca por um segundo sequer. Uma hora perdi a cabeça e gritei para o infeliz atrás que calasse a boca, “porra”. Pronto, agora eu sou grosso, e mal-educado…

De qualquer maneira, essa familinha-imbecil me mostrou um novo patamar de “gente demais, tentando demais, se divertir ao mesmo tempo”. Não basta me divertir, tenho que me divertir a valer, a qualquer custo!

Some more on COM+ and .NET

A few interesting bits from c2.com’s “ComIsLove”, of all places…

“The problem is the definition of COM. Here is a summary of how COM/COM+ are affected by the .Net Framework.

COM and COM+ are many different things. It is a low level API based infrastructure that consists of APIs like CoSetProxyBlanket, AddRef, Release, QueryInterface, etc. It is a programming model that revolves around creating objects and calling methods on those objects (procedure oriented). And it is a set of services that sit on top of both of these things that apply and provide behavior to the objects such as synchronization, pooling, transactions, etc.

Over time, the .Net framework will replace the underlying goo. Everybody agrees that this is good.

However, the programming model is here to stay. The way it is implemented might change – for example, the procedural programming model might be built on top of a messaging layer, which programmers also might have access to. I believe the installed base of applications that depend on this type of programming (e.g. VBScript for Office, ASP pages, etc.) and the familiarity that programmers have with it means that this is here to stay.

The services are definitely here to stay. The requirements for them are not going to go away – anybody who writes a business app will likely need to use these services when they use the .NET framework. Our goal is to make accessing the services from the .Net framework as seamless and as easy as possible. We’ve made great strides for this in V1 of the .Net framework – there are custom attributes for virtually all of the services, we do automatic registration when unregistered components are created, etc. We plan to make this even better in subsequent releases of the products. We recognize that some of the benefits of the .Net Framework (like XCOPY install/uninstall, automatic memory management, etc) are currently reduced when using some of the COM+ services inside the .Net Framework. However this is a function of schedule and not intent. We will be working diligently to integrate these services with the .Net infrastructure and create a seamless experience for our customers to use the whole of the .Net platform.

It is important to understand that we are not throwing out the old and bringing in the new. We are refocusing our platform to empower the next generation of the web. In doing so we are leveraging all of the assets we currently have and the existing COM+ features are key to this platform. The DCOM protocol is an interesting issue. Clearly our story for the Internet is HTTP and SOAP. Some intranet scenarios will use this too because there is increasing use of firewalls to partition corporate Internets. That said, DCOM is a high performance binary remoting protocol and is valuable in some tightly-coupled scenarios. In fact the common language runtime object remoting services use DCOM for some remoting. We will have to see how this evolves in the future, but there will likely always be a need to a higher performance protocol than HTTP and XML.”

Palavras de Luis Sala, o DJ Feio

“As musicas da Chemical Crew que me agradam sao as do EXAILE(pelo menos desse ultimo album) as do ”40%”(que e o OMI que faz) que logo mais vai estar por aqui…agora eu nao posso negar que as do SKAZI,PARANORMAL,VOID,e etc da gravadora bomba as pistas…mas gracas a Deus por eu ter boas coneccoes que nao sao via internet…eu tenho um bom repertorio de musicas e dependendo p/ quem eu toco ,eu tento satisfazer aquele publico local…mas por exemplo qdo toco em festivais e muito dificil eu rolar SKAZI por exemplo,eu realmente gosto de um som mais ROLLIN e nao com muitos breaks…gosto de REEF de guitarras mas nao de um concerto de rock na musica,mas como ja disse antes eu tento fazer um meio a meio,geralmente em set e 2 horas so nos ultimos 40 minutos e que eu toco Chemical Crew,mas e logico que as vezes tem aquela mocada querendo ouvir porrada como por exemplo no RIO,em SANTOS,BELEM DO PARA,enfim a muitas cidades do Brasil que o publico nao gosta que alivie nao ,ai eu engato uma 6 marcha e vamo que vamo,ehehehehe,eu ate comento que se eu botar um Sepultura no meio do set os caras nao vao nem sentir a diferenca,ehehehehe,e brincadeira…”

– retirado do fórum do BaladaPlanet

Java in Debian

Since this has been source of a few lost hours in the past, it’s nice to know the Java Team has a nice solution, called ‘java-package’. This guy has a nice tutorial. He only forgets to say that you should have all dependencies of the JDK/JRE installed before running java-package (eg, run ldd on all binaries. I needed to install libxt6, libxp6, among others. apt is your friend).

Indian State Of Goa Considers Renaming Itself “Progressive”

According to Ott, Goa Trance was invented in 1994 by Ott. The music quickly spread through North London Kebabberies and Cottaging venues before snowballing out to the widespread traveller community. Moving to the Indian coastline, the previous name Chip Shop Trance was dropped in favour of Goa and thus the scene was born.

Goa Trance is loved by wannabe hippies and cynical twats the world over. The fans, whose backgrounds range from middle class to upper middle class, travel up to a thousand miles for a good party — where they stand around talking shit to each other, often barefoot.

[...]

– For the full article head over to PsyReviews. What are you doing here anyway?