Tuesday 18 July 2017

Previsões Baseadas Na Rede Neural Forex


GoldenGem 174 Informações gerais sobre as redes neurais Informações básicas (da Wikipédia): Desde o início dos anos 90, quando os primeiros tipos praticamente utilizáveis ​​surgiram, as redes neurais artificiais (RNA) cresceram rapidamente em popularidade. São sistemas de software adaptativo de inteligência artificial que se inspiraram em como as redes neurais biológicas funcionam. O seu uso vem porque eles podem aprender a detectar padrões complexos em dados. Em termos matemáticos, são aproximadores de função não-lineares universais, o que significa que, dado os dados corretos e configurados corretamente, eles podem capturar e modelar qualquer relação entrada-saída. Isso não só remove a necessidade de interpretação humana de gráficos ou a série de regras para gerar sinais de entrada, mas também fornece uma ponte para a análise fundamental, pois esse tipo de dados pode ser usado como entrada. Além disso, como as RNA são essencialmente modelos estatísticos não-lineares, suas capacidades de precisão e predição podem ser matematicamente e testadas empiricamente. Em vários estudos, as redes neurais utilizadas para gerar sinais de negociação superaram significativamente as estratégias de buy-hold, bem como os métodos tradicionais de análise técnica linear. Embora a natureza matemática avançada de tais sistemas adaptativos tenha mantido redes neurais para análise financeira, principalmente nos círculos de pesquisa acadêmica, nos últimos anos, um software de rede neural mais fácil de usar tornou a tecnologia mais acessível aos comerciantes (leia o artigo completo). Também segue o mesmo link para a seção mais importante sobre análise fundamental Wikipedia, setembro de 2006 Teoria das redes neurais (J. Moody) Exemplo típico publicado (da literatura): Resumo da operação: O comerciante, desejando quantificar a relação entre um grupo De ações ou compartilhar preços, e ou índices, entre os tickers em letras maiúsculas, separados por vírgulas. As cotações e volumes de preços históricos e em tempo real necessários são pesquisados ​​e comparados automaticamente. A rede neural busca um relacionamento matemático não-linear (padrão) que relaciona os preços e os volumes com o ticker de interesse, enquanto o usuário participa pelo controle de um ajuste de sensibilidade (também chamado de momentum). Quando a sensibilidade é definida como zero, os gráficos mostram dois anos de Backtesting correto e rigoroso. Através do qual o usuário pode avaliar visualmente se a relação é válida ao longo do tempo histórico. O relacionamento é estendido para o futuro para fazer uma previsão, pelo número de dias que o usuário configurou no controle deslizante durante o treinamento. Não existe um indicador buysell: a confiabilidade da previsão depende da verificação visual dos usuários da correspondência entre os dois gráficos obtidos durante o teste posterior e a sua estimativa da probabilidade de o relacionamento matemático que foi encontrado continuar a manter no futuro . Instruções do usuário 1. Pense em uma lista de tickers que provavelmente estarão relacionados matematicamente, ao longo do tempo. Este é o passo mais difícil - relacionado matematicamente não significa que eles se comportem da mesma forma. 2. Localize o rótulo que diz Grupo Relacionado de Tickers. Abaixo disso, exclua a lista de amostras de tickers que pode estar lá e insira os nomes dos tickers que você deseja analisar, em letras maiúsculas e separados por vírgulas. 3. Escolha uma fonte de dados no botão Arquivo: na parte superior do programa. A possibilidade mais simples é carregar da Internet. O programa sabe como pesquisar a lista padrão de sites de domínio público, incluindo Google, Yahoo e MSN e coloque um arquivo de texto simples chamado Internet. txt na pasta GoldenGem, que terá colunas para Date, Ticker, Open, High, Low, Close , E Volume, com entradas separadas por vírgulas. As configurações padrão no StockDownloader estão configuradas para carregar a mesma lista de ações que você digitou no GoldenGem, até o preço de fechamento mais recente. Se você está feliz com esta seleção, pressione o botão Carregar no StockDownloader. (O StockDownloader é apenas uma ferramenta para iniciantes, espera-se que você mais tarde se gradue de análise técnica para análise fundamental, encontrando seus próprios dados de outros sites, clique aqui para descobrir como fazer isso.) 4. Use as setas para cima e para baixo no seu Teclado para escolher qual dos vários gráficos que deseja ver (ou você pode usar o botão do menu suspenso, perto das letras TK à direita da tela). Clique para continuar 5. Você verá três traços coloridos em cada gráfico. O traçado vermelho é o gráfico do preço da ação selecionado durante dois anos de tempo histórico. O gráfico verde mostra o uso das redes neurais de inteligência artificial para prever o gráfico vermelho, ao longo do tempo histórico, combinando simultaneamente todas as informações de volume e preço de todas as ações. Há também um gráfico azul, que mostra onde o gráfico verde seria se fosse previsível perfeitamente. 6. Aumente a sensibilidade e aguarde até que o gráfico verde corresponda ao gráfico azul, depois diminua a sensibilidade para zero (a parte inferior do controle deslizante). Isso é melhor feito por etapas, em muitas iterações, pois você está removendo a entrada de treinamento. Se os gráficos verdes e azuis se combinarem bem quando a sensibilidade é zero, isso significa que a curva verde aprendeu a prever a cópia avançada da curva vermelha ao longo do tempo histórico, olhando apenas os efeitos como muitos dias no passado, como você selecionou em O controle deslizante Dias. A curva verde não precisa, portanto, terminar na data Loaded Until, mas pode continuar o cálculo por um número igual de dias por vir. Você vê isso na primeira captura de tela como a parte da curva verde que se estende três semanas após a linha azul vertical. 7. A previsão numérica para o futuro aumento ou diminuição também será mostrada no canto superior direito da tela. Uma exibição de texto irá dizer, por exemplo: Mudança prevista nos próximos 15 dias úteis: 2.35. Para obter instruções mais detalhadas, vá para a página de perguntas frequentes (clique aqui) Para obter as especificações técnicas para clicar aqui Outras fontes de dados: Além de usar o StockDownloader, existem outras opções para obter dados. Para três exemplos iniciais, você pode escolher Carregar a partir do arquivo, para carregar os dados que você pode ter baixado anteriormente, como o padrão e o arquivo 500 pobre sp500hst. txt que usa as mesmas convenções de arquivos padrão do GoldenGem e podem ser obtidos como um arquivo Chamado fullset. zip da biz. swcpstocks, baixe uma coleção de arquivos. csv (alguns dos dados do mercado de ações e alguns dados do Forex), por exemplo, forexrate. co. ukforexhistoricaldata. php. A exportação de dados csv nesse site funciona por rolagem com as teclas de seta para cima e para baixo. Selecione 500 pontos de dados, 1 dia e divida por vírgula. Mude o número vol na GoldenGem para a coluna 4, insira os nomes dos tickers desejados no GoldenGem e escolha Importar de uma pasta. Em seguida, navegue até qualquer pasta que contenha os arquivos. csv. Colar ou digitar um arquivo de texto próprio usando o Wordpad, conforme explicado no link abaixo, baixe um arquivo de 2 anos ou mais de dados diários do banco de dados estatístico do Bank of England bankofengland. co. ukstatisticsindex. htm Escolha o colunário (com títulos se você deseja). Isso cria um arquivo chamado results. csv. Defina os números de posição do arquivo, marque, fecha perto de 2,1,3 e deixe a janela do vol. Em branco. Digite o subconjunto dos nomes dos tickers com os quais deseja começar. Escolha Procurar um novo arquivo do botão Arquivo GoldenGems. Escolha os arquivos separados por vírgulas (csv) na parte inferior da caixa de seleção de arquivo e selecione results. csv, o arquivo que você acabou de baixar do Bank of England. Disponibilidade: tente on-line Se você possui um sistema operacional Windows XP, com o Internet Explorer ou o Mozilla, poderá achar que não é necessário instalar o programa, você está convidado a clicar aqui para tentar online. Para o Internet Explorer, escolha executar em vez de salvar. Para o Mozilla, escolha Salvar, então abra. O link acima é um pequeno arquivo de 504 K chamado GoldenGem Viewer. Escolha carregar tickers da internet a partir do menu Ficheiro: então, use o menu à direita da tela para mudar entre gráficos. Se é a primeira vez que você treinou uma rede neural, pense nela como uma espécie de videogame, onde o objetivo é fazer com que ambas as luzes indicadoras permaneçam verdes. Instalação completa: 2. O site de download, que entrega o mesmo arquivo, verifica se o software que eles oferecem está livre de adware, spyware ou vírus e que ele instala e desinstala corretamente. Não importa se você baixou do link local ou do Download. Informação de segurança: 2. Assinatura digital. O menu de propriedades para arquivos assinados digitalmente sempre inclui uma guia adicional de assinaturas digitais para garantir que um arquivo nunca tenha sido alterado. Ele permite que você verifique as seguintes informações: Nome do arquivo: setupv. exe Tamanho do arquivo: 2.05 MB Sistemas operacionais suportados pela versão 2.4 Windows 98, 2000, NT, XP Vista e Windows 7. Vantagens: previsões de benchmark de funções matemáticas abstratas, como Mostrado neste site, foram amplamente verificados. As especificações técnicas são aquelas acordadas para serem mais eficazes na previsão do mercado de ações. O algoritmo tem sido amplamente utilizado por muitos anos em finanças, negociação e investimento, gerenciamento de portfólio. É estabelecido como um cálculo confiável e valioso. O algoritmo é a única maneira confiável em que é possível considerar simultaneamente os efeitos combinados de um número de preços e volumes. Teste sua cópia do GoldenGem Weve fez um arquivo de tickers chamado x, y, z, w contendo 10 sin (i10), 10 cos (i10), 10 cos 2 (i10) sin (i10) 10 cos (i10) e 10 Sin 2 (i10) -10 cos (i10) -10. Para i1 a 400. Clique com o botão direito do mouse em proof2.txt e escolha Salvar destino. Defina os nomes dos tickers x, y, z, w e os números de posição do arquivo 1 (em branco) 2 (em branco) como na captura de tela abaixo. Pressione o botão Arquivo: selecione Procurar novo arquivo e localize o arquivo proof2.txt que você acabou de baixar. Então, divirta-se. O fato de termos usado funções repetidas é apenas para que o visualizador possa reconhecer se as previsões estão corretas. O programa não usa o fato de estarem repetindo funções de qualquer maneira. Observe que, uma vez que o controle deslizante DAYS está configurado para 21, a alteração prevista é dada 15 pontos de dados à frente, pois o controle deslizante DAYS é em termos de dias reais que não incluem fins de semana, portanto, irá indicar que a previsão é de 15 dias úteis em o futuro. O registro é gratuito. O programa é freeware e uma chave de registro pode ser obtida aqui. A teoria das redes neurais Matematicamente, a teoria das redes neurais é bastante trivial. Dito isto, também é verdade que o desenvolvimento da teoria teria prosseguido mais rapidamente se a compreensão matemática básica tivesse sido aplicada no início. Assumimos que se sabe que um mapa linear é dado por uma matriz com n colunas e m linhas, cujas entradas são números reais. Um composto de tais mapas lineares é novamente um mapa linear, e a matriz que representa o composto é o produto das matrizes que representam os fatores separados. Portanto, o conjunto de funções que podem ser representadas como um composto de mapas lineares não é maior que o conjunto de funções que podem ser representadas por uma única matriz. Apenas para tornar as coisas concretas, se tentarmos encontrar uma função que determine o preço de uma parcela da IBM, em termos de preços e volumes de cinco ações, usando uma função linear, estamos escolhendo uma função em um espaço de dez dimensões De funções ou, estamos escolhendo as dez entradas de uma matriz com uma única linha e dez colunas. Uma noção do que essas entradas devem ser é aquela que dá o menor erro, no sentido dos mínimos quadrados. Desde que os preços das ações sejam normalizados para ter zero médio e desvio padrão um, esses dez números são os chamados coeficientes de regressão linear. O novo ingrediente nas redes neurais é que depois de aplicar uma matriz a um vetor, aplicamos uma função de transição para cada entrada do novo vetor. Se repetir o que acabamos de fazer, o resultado não será muito diferente. Algumas das diferenças são que não é garantido que haja uma seqüência de dez coeficientes que dê o melhor ajuste, duas seqüências de dez podem dar um ajuste igualmente bom. Além disso, será impossível ajustar valores que excedam o alcance de nossa função de transição. Estes parecem desvantagens. Mas existem enormes vantagens de compensação. Ou seja, um composto de funções desse tipo (aplicando uma matriz, depois aplicando uma função de transição a cada entrada da resposta) não é o mesmo que uma única função deste tipo. Por exemplo, o composto de mapas lineares vai (se cinco partes são carregadas) e há dez neurônios na camada intermediária R 11 8594 R 10 8594 R 10 8594 R 5 Para fazer uma comparação justa, reagardando o cálculo de uma saída, nós Só estão olhando para um dos fatores em R 5. Portanto, o número de entradas de matriz utilizadas para o mesmo cálculo é 11 215 10 10 215 10 10 215 1220 Então, em vez de um espaço de funções dez dimensões, estamos olhando para 220 espaço dimensional De funções. Em seguida, para simplificar as coisas, vamos escrever todas as várias entradas da matriz como uma seqüência de variáveis ​​onde m é um número que pode variar até, como já vimos, 220. E, deixe-nos escrever as variáveis ​​de entrada como x1. Xn onde em nosso exemplo de cinco ações, n é apenas dez. Na verdade, n é onze porque usamos uma variável de polarização que é a entrada constante. Agora, nossa rede neural, ou a parte dela que calcula uma única variável de saída, é apenas uma função. Entre em contato Introdução aos iniciantes onde V é o máximo da volatilidade anual real e prevista expressada em pontos percentuais. Esta tomada de V para ser o máximo da volatilidade real e prevista parece inventada, mas é exatamente o que se quer. Se r e V foram definidos usando apenas a volatilidade real, então, uma estratégia de confiar em informações a posteriori existiria para obter retornos enganosamente bons durante o teste de retorno que realmente não resultam de qualquer previsão: uma resposta lenta, na qual a curva verde fica próxima A média de 2 anos, corresponderia a uma estratégia de previsão sempre de um retorno súbito à média de 2 anos, que durante o teste posterior inclui o conhecimento dos dias futuros e recompensaria injustamente o coeficiente de correlação sozinho. Considerando que se R e V foram definidos usando apenas a volatilidade prevista, não haveria relação intrínseca entre r e o ganho de porcentagem real: um grande valor de R poderia surgir de uma predição com variância muito baixa. O valor de r, conforme definido, exclui esses dois problemas e parece corresponder com o que parece ser um backtesting intuitivamente bom. A primeira luz é amarela quando o valor r é maior que 0,39 e verde quando é maior que 0,6. A segunda luz passa do vermelho para o amarelo para o verde à medida que a entrada de treinamento é removida. Você precisará tentar diferentes combinações de variáveis ​​de entrada antes de poder fazer ambas as luzes permanecerem verdes ao mesmo tempo. Se as luzes não puderem ser feitas para permanecer verde, a resposta para sua pergunta é que a predição não tem sentido. Se as luzes permanecerem verdes, então isso significa que foi encontrado um relacionamento que conseguiu fazer previsões bem-sucedidas durante o intervalo de teste. Quando ambas as luzes permaneceram verdes, isso implica que a previsão pode ser confiável. Ainda não. Mesmo levando em consideração a proporção de variância que temos, a formulação em termos de lucro mostra que esse número poderia ser suficientemente alto para definir a luz verde, só porque alguns dos negócios hipotéticos eram extremamente lucrativos, outros não. Você também precisa realmente olhar para o comportamento da linha de predição, a parte da linha verde que se estende para o futuro, além da linha vermelha, durante o backtesting e veja qualitativamente a forma consistente que é correta. Quando a sensibilidade é definida como zero, não há entrada de treinamento e o gráfico verde é calculado apenas usando valores de dados de todas as variáveis ​​a partir do tempo do gráfico vermelho anterior, e qualquer previsão que você vê, portanto, mostra uma relação matemática real durante o teste posterior. Finalmente, você ainda não está bem. Mesmo quando você avaliou estatisticamente e visualmente que as previsões em todo o backtesting são boas, para ter certeza de que as variáveis ​​que você está procurando estão relacionadas, você deve definir a data de hoje no StockDownloader até um momento no passado ou, de outra forma, carregar apenas os dados Várias vezes no passado, e treinar a rede para prever uma variedade de valores que você realmente já conhece. Este é um conjunto de dados de validação, e a próxima versão do GoldenGem tornará mais fácil esta última etapa de validação. Existem relações entre variáveis ​​que se sabe que afetam os preços, e as que são bem conhecidas não podem ser exploradas, a menos que você tenha conhecimento das variáveis ​​de entrada avançadas do público comercial. Não é verdade que todos os relacionamentos existentes sejam bem conhecidos. O intercâmbio de informações é perfeitamente legal se você explorar informações de domínio público através de sua própria inteligência. O que acontecerá a primeira vez que eu tentar. Uma boa estratégia de treinamento é começar com uma alta sensibilidade e destruição por etapas. Supondo que as variáveis ​​realmente esperavam estar relacionadas e sua estratégia de treinamento estava correta, é provável que você acabe com a primeira luz ficando vermelha, significando correlação inadequada, quando a segunda luz ficar verde. Isso geralmente é por um dos três motivos: 1. Se você vir a espetadas verdes verticais e uma mensagem Pressione o botão Redefinir, então você traumatizou a rede. Como um ser humano ou animal, demorará muito para se recuperar. Semelhante a uma boa noite de sono pode fazer para um animal, o botão de reiniciar dá um novo começo, e tudo é perdoado, mas será necessário ser treinado novamente desde o início. 2. Se a linha verde é plana, isso ocorre porque foi treinado de forma inadequada. Levante o controle deslizante de sensibilidade novamente e espere um pouco antes de derrubar (idealmente em estágios). 3. Se a linha verde se parece com a linha vermelha, mas deslocada para a direita pelo montante no controle deslizante Dias, você está vendo uma situação em que o valor futuro esperado não é nada além do último valor conhecido. Se todos os gráficos forem assim, parabéns, você encontrou um conjunto de ações Markovian: interessante, mas sem oportunidade de arbitragem, assumindo que a rede neural encontrou a melhor solução possível. Conclusão Análise financeira é algo que você faz, não algo que você compra. Uma rede neural requer envolvimento do usuário. Você precisa escolher quais dados você considera relevantes, você precisa aprender a treinar a rede e cabe a você avaliar o backtesting. A coisa mais importante a lembrar é que, embora nossa exibição mostre apenas dois gráficos ao mesmo tempo (reais e previstos), o gráfico previsto é gerado levando em consideração as relações matemáticas entre os preços e volumes de todas as variáveis ​​carregadas simultaneamente e, portanto, a escolha De tickers não gravados afeta a qualidade da combinação entre os dois gráficos que você está observando. É sua responsabilidade decidir se você está descobrindo e explorando uma relação matemática válida e racional que outros ainda não pensaram. Pense na famosa história do investidor que se beneficiou décadas atrás, durante o início da lenda urbana de um mouse em uma refeição KFC. Ele contou a mudança no número de pessoas que freqüentavam seu KFC local a cada dia, e decidiu que não havia diminuição. Existe uma relação válida, simples e significativa entre o número de pessoas que ele observou, o preço atual da ação e o preço da ação futura, que ele usou intuitivamente. Se ele quisesse ser mais preciso, ele poderia ter usado uma rede neural. Não é adivinhação, não é uma expedição de pesca ou de mineração de dados. Você já deve saber o que está fazendo e por quê. Clique com o botão direito do mouse, selecione tudo, Copie e cole o texto abaixo em seu código HTML, se você quiser inserir o newsTicker gratuito da Reuters em seu site. (Nunca criou um site antes de não se preocupar, basta colar o código no Bloco de notas, adicionar o texto que quiser e salvar como um arquivo chamado favourite. html na sua área de trabalho. Você fez seu primeiro site. Você pode enviá-lo para colegas ou colocar Faça o upload para um servidor.) Gerenciabilidade Compartilhe o artigo A Aprendizagem Profunda pode ser descrita como um novo conjunto de ferramentas de aprendizagem de máquinas que tem uma grande probabilidade de levar a formas mais avançadas de inteligência artificial. A evidência disso é o grande número de avanços ocorridos desde o início desta década. Há um novo otimismo encontrado no ar e agora estamos novamente em uma nova primavera de AI. Infelizmente, o estado atual do aprendizado profundo parece de muitas maneiras ser semelhante à alquimia. Todo mundo parece ter seus próprios métodos de magia negra de projetar arquiteturas. O campo precisa, portanto, avançar e se esforçar para a química, ou talvez até uma tabela periódica para o aprendizado profundo. Embora o aprendizado profundo ainda esteja em sua primeira infância de desenvolvimento, este livro busca um certo tipo de unificação das idéias em aprendizagem profunda. Ele aproveita um método de descrição chamado linguagens de padrões. Padrão Os idiomas são idiomas derivados de entidades chamadas padrões que, quando combinados, formam soluções para problemas complexos. Cada padrão descreve um problema e oferece soluções alternativas. As linguagens de padrões são uma maneira de expressar soluções complexas derivadas da experiência. O benefício de uma linguagem melhorada de expressão é que outros praticantes são capazes de obter uma compreensão muito melhor do assunto complexo, bem como uma maneira melhor de expressar uma solução para os problemas. A maioria da literatura no campo da ciência da computação, os padrões de design de frase são usados ​​em vez de linguagem padrão. Nós propositadamente usamos linguagem padrão para refletir que o campo de Aprendizagem Profunda é um campo nascente, que evolui rapidamente, que não é tão maduro como outros tópicos em ciência da computação. Existem padrões que descrevemos que não são padrões, mas podem ser conceitos fundamentais. Nunca estamos certos de quais serão verdadeiramente fundamentais e apenas uma exploração e uma elucidação adicionais podem trazer um consenso comum no campo. Talvez no futuro, um verdadeiro livro de padrões de design surgirá como um reflexo da maturidade deste campo. Na ML, existem muitos novos termos que se encontram, tais como Redes Neurais Artificiais (ANN), Florestas Aleatórias, Máquinas de Vetores de Suporte (SVM) e Fatorização Matriz Não-Negativa (NMF). Contudo, geralmente se referem a um tipo específico de algoritmo de aprendizagem de máquinas. Deep Learning (DL), ao contrário, não é realmente um tipo de algoritmo, é uma classe inteira de algoritmos que tendem a exibir características semelhantes. Os sistemas DL são ANN que são construídos com múltiplas camadas (às vezes chamadas de Perceptores Multi-Level). A idéia não é inteiramente nova, já que foi proposta pela primeira vez na década de 1960. No entanto, o interesse no domínio explodiu com a ajuda do avanço da tecnologia computacional (ou seja, GPU) e maiores fontes de dados de treinamento. Desde 2011, os sistemas DL têm exibido resultados impressionantes no campo da aprendizagem por máquinas. A confusão com DL surge quando se percebe que existem muitos algoritmos e não é apenas um único tipo. Encontramos as redes de avanço de alimentação convencionais também conhecidas como Redes totalmente Conectadas (FCN), Convolution Networks (ConvNet), Redes Neurais Recorrentes (RNN) e Máquinas Boltzmann Restritas (RBM) menos usadas. Todos eles compartilham uma característica comum em que essas redes são construídas usando uma hierarquia de camadas. Um padrão comum, por exemplo, é o emprego de camadas diferenciáveis, essa restrição na construção de sistemas DL leva a uma maneira incremental de evoluir a máquina para algo que aprende a classificação. Existem muitos padrões que foram descobertos recentemente e seria proveitoso para os profissionais terem à sua disposição uma compilação desses padrões. Você pode encontrar mais detalhes sobre este livro em: A Pattern Language for Deep Learning. Ou você pode verificar se há atualizações em Design Patterns for Deep Learning Aqui estão alguns gráficos de visualização, here8217s uma tabela periódica dos vários padrões de design: e as relações de alguns dos padrões descritos no livro: Compartilhar o artigo Compartilhar o artigo I8217ve foi perguntado Para compartilhar meus pensamentos sobre processamento de transações altamente escalonável. Processamento de transações tem sido uma área de pesquisa exaustiva em computação há várias décadas, e muitas das mentes mais brilhantes provavelmente atingiram esse assunto até a morte até agora. O processamento de transações de escala é um problema extremamente difícil porque tenta encontrar uma solução para duas forças diametralmente opostas, ou seja ACID (entidade única) versus computação distribuída (entidades replicadas). Os sistemas de processamento de transações foram inventados no passado utilizando dois mecanismos de comunicação, RPC e Queued. Servidores de aplicativos como contêineres EJB podem rastrear sua linhagem de volta aos Monitores de transações. Estes prescrevem para um estilo de comunicação RPC para fazer o processamento de transações. Um usaria um adaptador JCA para se comunicar com recursos XA gerenciados pela JTA. Por baixo das capas, RPC usaria o protocolo de compromisso de duas fases (TPC). Na sua forma mais geral, o algoritmo Paxos seria o mecanismo para garantir a consistência entre os sistemas distribuídos. Na busca de vender hardware mais capaz a preços exponivelmente mais altos, uma abordagem baseada em RPC parece ser um motivador ideal. O problema, no entanto, com o processamento de transações baseado em RPC é que é difícil escalar para muitas caixas mais baratas. (Escalar para usar mais servidores é mais econômico, uma vez que o custo aumenta apenas linearmente e a potência não está vinculada à tecnologia mais recente que a indústria pode fornecer). A abordagem em fila, no entanto, foi mostrada ao longo dos anos (TBD: mostrar referência) para ser o direito Abordagem para alcançar a escalabilidade. O equilíbrio com o qual se trabalha é Latência versus Consistência. Na abordagem RPC, a latência é comprometida pela consistência em que as comunicações semelhantes a TPC são muito caras. Na abordagem em fila em espera, a latência também é comprometida em favor da consistência em que o processamento de comunicação é realizado de forma assíncrona e não imediatamente. Uma boa analogia para explicar a diferença nas abordagens pode ser feita examinando a diferença em uma abordagem de bloqueio pessimista versus otimista. Na abordagem pessimista, é preciso uma abordagem preventiva, de modo que todos os dados sejam sempre sincronizados. Isso é feito, reservando recursos antes da execução. No entanto, esta reserva reduz a quantidade de concorrência no sistema. Pense, por exemplo, em um sistema de controle de versão onde um desenvolvedor possui um arquivo bloqueado, com os desenvolvedores a ter que esperar até que ele seja desbloqueado. Em contrapartida, uma abordagem de bloqueio otimista (aka. Versioning), permite que vários desenvolvedores continuem em seu trabalho de forma não bloqueadora. O enfileiramento é por sua natureza sem bloqueio e, portanto, assegura o máximo de paralelismo. No entanto, sempre haverá uma seção crítica que funcione em recursos compartilhados. A esperança no entanto, é que esta seção crítica é realizada em uma única máquina e de uma maneira que mantém bloqueios de curta duração. Em um nível abstrato, você pode obter informações do documento Patt Heland8217s 8216Life Beyond Distributed Transactions 8216, onde enfatizou as restrições que um sistema requer para permitir transações. Uma lista truncada de seus requisitos é enumerada da seguinte forma: as entidades são identificadas de forma exclusiva 8211, cada entidade que representa dados disjuntos (ou seja, nenhuma sobreposição de dados entre entidades) deve ter uma chave única. Múltiplos escopos disjuntos de serialização transacional 8211, em outras palavras, existem esses 8216entities8217 e que você não pode realizar transações atômicas nessas entidades. O envio de mensagens 8211, pelo menos uma vez que é uma aplicação, deve tolerar tentativas de mensagens e a chegada de mensagens fora de ordem. As mensagens são encaminhadas às entidades 8211, que é um resumo can8217t longe da lógica comercial, a existência das chaves únicas para endereçamento de entidades. O endereçamento é, no entanto, independente da localização. Ele escreve sobre Entidades que possuem capacidades de transações distribuídas extremamente limitadas. Para alcançar a escalabilidade, é preciso definir que pacotes de dados são fixados na sua capacidade de participar de transações. Esses pacotes de dados ou partições não podem realizar transações com outras partições. Ao particionar para a escalabilidade, você precisará rotear o tráfego para a partição específica que é capaz de executar a transação completamente localmente. It8217s tipo de link o dual de NoSQL. Em NoSQL os dados são duplicados (ou seja, desnormalizados) em muitos lugares para alcançar a máxima escalabilidade. Em um sistema transacional, os dados que são processados ​​em uma transação devem residir logicamente em apenas um lugar. Cameron Purdy8217s falam 8220 Modelos de Programação Tradicional: facas de pedra e Bearskins no Google Age 8221 que menciona uma casa de compensação cambial FOREX onde um terço das transações são EURUSD. Isso exige que os negócios da EURUSD sejam encaminhados para uma única caixa que manipulasse o mercado EURUSD. Somente o envio da ordem e o preenchimento do pedido são executados contra o banco de dados por razões de durabilidade, tudo o mais é apenas um fluxo em dados de memória. Este sistema foi 1000x mais rápido do que o sistema original e as ordens foram processadas em menos de 3ms. Billy Newport em seus slides 8220Usando Operações em Cadeia para Concorrência Máxima sob Carga 8221 também emprega o mesmo modelo básico ao mostrar como ele escala um sistema de comércio eletrônico. A partição que ele executa é que cada SKU é uma entidade que garante a integridade da transação de dados. As mensagens são encaminhadas através do sistema que contém instruções e suas instruções de desfazer correspondentes. Essa capacidade de desfazer permite que o sistema execute transações de compensação em cascata no caso de uma transação na cadeia não poder completar com sucesso. Em resumo, a orientação fundamental para permitir transações de escalabilidade elevada é simples, você consegue encontrar uma partição que permita que suas transações sejam realizadas em uma única caixa8221. Esse particionamento é, sem dúvida, dependente de um conjunto específico de casos de uso. Então, para FOREX, é o mercado de pares de moedas (ou seja, EURUSD) e para o comércio eletrônico, pode ser o SKU do produto e seu inventário. No entanto, e se os seus casos de uso don8217t tiverem uma partição natural. A solução seria uma que seria análoga a como as companhias aéreas lidam com a reserva de seus vôos. Ou seja, espero que a probabilidade seja baixa e que, se o cenário ocorrer, use compensações fora da banda para corrigir as violações das regras de negócios. Como esse tipo de mecanismo de compensação é implementado é um tópico extremamente interessante por si só. Curiosamente, meus pensamentos de alto nível sobre as transações não mudaram muito ao longo dos anos. Compartilhe o artigo Compartilhe o artigo Cloud Computing é uma fúria hoje em dia. Problema aqui, porém, existem muitas definições que flutuam. Gostaria ainda de propor outra definição. Cloud Computing é Software in a Box, ou mais conciso 8220Cloud Computing é Software em uma caixa virtual8221. O que é 8220Software em um Box8221 Esta é uma idéia que tem sido em torno de um longo tempo. I wrote a blog about it back in 2003 (see: 8220An Alternative Way Of Packaging Software: Hardware Included )8221. For Cloud Computing this title would now read: 8220An Alternative Way Of Packaging Software: Data Center Included8221. Years ago, Bill Gates once referred to pc manufactures like Dell and Compaq (Now HP) as Value Added Reseller (VARs). That is all they did was add value to Microsoft8217s software by bundling their hardware with it. Selling software is all about packaging. Most software is bought because its packaging delivers convenience to customers. It is not usually whiz bang technology that makes the sale, rather is is about ease of use, that is usability. What can be easier than receiving a box from a vendor, then plugging it into the wall and into the network to get it running Well it turns out, receiving a virtual box from a vendor and not be even easier The benefits of a 8220Software in a Box8221 were described in this old 2003 article. Reduced development complexity 8211 That is less configurations to support. Higher Performance 8211 Performance can be tuned to the hardware delivered with the software. Better Security 8211 The box can be hardened and tested prior to delivery. Easier Provisioning 8211 Just add power and network connectivity. Reliability 8211 Less configuration implies less parties to point finger at. Pricing 8211 People like paying for something they can touch. Distribution 8211 Ride on the coat tails of hardware vendors. Fast forward now, 8 years later, and we have these same benefits for Cloud Computing: Reduced development complexity 8211 Software can be pre-configured, tested and hardened for the target cloud platform. See: AWS Cloud Formation for handling complex networks. Higher Performance 8211 Software can be pre-tuned to the target cloud platform. For example, if one were delivering a Machine Learning based application, one could tune a solution for Amazon8217s GPU cluster. Better Security 8211 The solution can be hardened in the cloud. Easier Provisioning 8211 Just sign up on a website. Reliability 8211 The cloud provider takes complete responsibility even for operational issues. One doesn8217t need the expertise to configure a high availability setup. Pricing 8211 Pay as you go, use only what you need. Elasticity 8211 Seamlessly scale when demand increases. In a former life as a Product Architect, I was working on a slide deck that showed how my company8217s solution would fit in a prospective client8217s network. I had drawn a solution that involved multiple boxes to cover the scalability, availability and heterogeneity of the solution. The feedback that I received was that there were too many boxes I had also noticed come deployment time with a customer, it became painstaking to have to attend so many network interconnectivity meetings. My eventual solution to this packaging problem was that the software would now be deployed in a blade chassis with all the components pre-configured into blades and the network pre-configured with a virtual router in a blade. We were now back to a single 16u box The drawback of Cloud Computing as compared to Software in a Box is the fact that the customer can8217t hold it and as a consequence store it in one8217s premises. At a mammalian brain level, a lot of people can be very uncomfortable with this. There8217s also of course the concerns of hosting in a shared network, the security of data on shared storage and the robustness of network connectivity. To overcome these fears, one of course could deliver a 8220Cloud in a Box8221. Share the article Share the article A couple years ago (i. e. 2007), I wrote a short blog entry commenting on Pat Helland8217s paper 8220Life beyond Distributed Transactions: an Apostate8217s Opinion 8221 (Worthy of a second and third read). I found it curious that it was re-discovered by highscalabilty (see: 82207 Design Patterns for Almost Infinite Scalability 8220). Though Highscalability is a treasure trove of implementation ideas on achieving high scalability. It made me wonder if anyone else had created a pattern language for high scalability I have seen a few attempts and this entry is a quick attempt to extend those and conjure a new one up. Hopefully it serves as a good starting point for further refinement and improvements. At the most abstract level there is Daniel Abadi8217s PACELC classification for distributed systems. IMHO, PACELC, as compared to Brewster8217s CAP theorem, is a more pragmatic description of the trade-offs one will make when designing a distributed system. PACELC says that if there is a network (P)artition does the system favor (A)vailability or (C)onsistency (E)lse in the normal state does it favor (L)atency or (C)onsistency. Cameron Purdy (founder of Oracle8217s Coherence product) has a presentation where he proposes these building blocks for scaling-out: Routing Partitioning Replication (for Availability) Coordination Messaging This short list is rumored to comprehensively cover every distributed system that can be encountered in the wild. If I applied the PACELC to this classification, I may be able to select Routing, Replication and Coordination techniques that favor either Consistency or Availability. Also, I may select Routing, Coordination and Messaging that favors Latency or Consistency. Jonas Boner, who I have a big fan of for a very long time (see: AspectWerkz ), has a great slide deck that comprehensively enumerates in detail existing techniques to achieve scalability, with availability and stability thrown in for good measure. Shown below is how this list may be mapped into Purdy8217s classification (I have taken the liberty to refine the original classification), I8217ve marked which trade-off that is favored, either Latency or Consistency, where I thought made sense. State Routing Distributed Caching(Latency) HTTP Caching (Latency) Behavior Routing Fire-forget (Latency) Fire-Receive-Eventually(Latency) ESB Event Stream Processing(Latency) CQRS(Consistency) Dynamic Load Balancing Behavior Partitioning Loop Parallelism ForkJoin MapReduce Round Robin Allocation Random Allocation Weighted Allocation State Partitioning (Favors Latency) Distributed Caching HTTP Caching Sharding State Replication (Favors Availability in Partition Failure) Master Slave-Synchronous (Consistency) Master Slave-Asynch (Latency) Master Master-Synchronous (Consistency) Master Master-Asynch (Latency) Buddy Replication-Synchronous (Consistency) Buddy Replication-Asynch (Latency) State Coordination Message Passing Concurrency(Latency) Software Transactional Memory(Consistency) Shared State Concurrency(Consistency) Service of Record(Consistency if Synchronous) Behavior Coordination SIMD MasterWorker Message Passing Concurrency Dataflow Architecture Tuple Space Request Reply Messagin g Publish-Subscribe(Latency) Queuing (Consistency) Request Reply(Latency) Store-Forward(Consistency) The trade-off between Consistency and Availability arises with the implementation of Replication by selecting an Synchronous versus Asynchronous Messaging (or even Coordination) approach. Employing Partitioning favors Latency and never Consistency (this should be obvious). The remaining patterns of Routing, Coordination and Messaging provides the flexibility where one can choose either Latency or Consistency. This for now appears to be a workable starting point. Although, there8217s a lot of room for improvement. For example in the Replication category, Master-Master or the more general form of Buddy Replication is clearly favors Consistency at the cost of Latency irregardless of the choice of Synchronous or Asynchronous messaging and coordination strategy. I think this article 8220Concurrency Controls in Data Replication provides a better classification of replication techniques. There is also some inconsistencies that appear to need further refinement, for example the Fire and Forget Routing strategy appears to favor Latency in the sense that it is non-blocking (see: Scalability Best Practices: Lessons from eBay 8220), however messaging pattern may be the presence of a queue that clearly favors Consistency over Latency. So it favors Latency from the caller perspective, but Consistency from the receiver side (i. e. everything is serialized). In general one may say that decoupling (or loose coupling) favors latency while the tight coupling favors consistency. As an example, optimistic concurrency is loosely coupled and therefore favors latency. To summarize, there are a lot of techniques that have been developed over the past few decades. Concepts like Dataflow and Tuple Spaces and many other Parallel Computation techniques have been known since the 821770s. The question an architect should however can ask today (which wasn8217t asked back then) is which technique to use given the trade-offs defined by PACELC. The short coming of this pattern language is that is does not provide a prescription of how to achieve high scalability. It only provides the patterns one would find in a high scalability system. The selection of the architecture, should be clearly driven by the use-cases and requirements. That is, consider vertical (see: 8220Nuggets of Wisdom from eBay8217s Architecture 8220)as well as horizontal partitioning. Finally, unless a service has a limited set of use cases, one can8217t expect to build a one-size fits all architecture in the domain of high-scalability. P. S. I stumbled upon recently this very impressive paper by James Hamilton from Microsoft8217s Live. He writes about the important considerations when designing a high scalability system from the operational perspective. This kind of insight is extremely very hard to come by. Not many software developers have the intuition to understand what goes on in the data center. On my next entry, I8217ll attempt to incorporate some of Hamilton8217s ideas to improve this pattern language. Share the article Share the article All too many Service Oriented Architecture (SOA) practitioners seem to have a belief, that because SOA deals with distributed computing, that scalability is a given. The reality however is that conventional SOA practices tend to work against the development of high scalability applications. This article shows the properties of a system that can achieve high scalability and then contrasts it with conventional SOA practices. The patterns found in a system that exhibits high scalability are the following: State Routing Behavior Routing Behavior Partitioning State Partitioning State Replication State Coordination Behavior Coordination Messaging This has been discussed in a previous blog entry 8220A Design Pattern for High Scalability 8220. SOA based systems conventionally cover Routing, Coordination and Messaging. However, the patterns of Partitioning and Replication are inadequately addressed by SOA systems. For reference, one can refer to the SOA Patterns book that I8217ve covered in this review. The words 8220Partitioning8221 and 8220Replication8221 unsurprisingly can8217t be found in the book8217s index. Scalability apparently isn8217t a concern to be addressed by SOA patterns. What then are the patterns that we can introduce to SOA to ensure scalability Here are a couple of suggested patterns from the previous article: Behavior Partitioning Loop Parallelism ForkJoin MapReduce Round Robin Allocation Random Allocation Weighted Allocation State Partitioning (Favors Latency) Distributed Caching HTTP Caching Sharding State Replication (Favors Availability in Partition Failure) Synchronous Replication with Distributed Locks and Local Transactions Synchronous Replication with Local Locks and Distributed Transactions Synchronous Replication with Local Locks and Local Transactions Asynchronous Replication with Update Anywhere Asynchronous Replication with Update at the Master Site only How can these patterns be manifested in a SOA system To achieve Behavioral Partitioning, the construct of a Command Pattern (see: Command Pattern ) and the Functor Pattern can be used. In the conventional SOA architecture, behavior (as in executable code) needs to be propagated through the network, to be executed by receiving services. In lieu of a commonly agreed standard, one may either employ XQuery as a stand in for this capability. One should therefore can define services to accept XQuery in a way analogous to how SemanticWeb systems accept SPARQL. A key to achieving scalability is that behavior be allowed to be move close to the data that it will act on. Behavior that works on data through remote invocations is a guarantee to kill scalability. See 8220Hot Trend: Move Behavior To Data For A New Interactive Application Architecture 8220. To achieve State Partitioning, SOA based system need to adopt the notion of persistent identifiers of data. WS-I has the notion of WS-Addressing which typically are used to reference endpoints as opposed to actual entities. What is needed is that this addressing or persistent identifiers act analogous to Consistent Hashing so that entities may be partitioned and accessible using multiple endpoints. Identifier based services would need to be stood up to perform the redirection to the endpoints. Finally, there is the issue of Replication to support availability and fail-over. The Identifier based services described early may function as routers to handle the fail-over. Alternative, one may employ proxy servers in the manner described in A New Kind of Tiered Architecture. The replication capability however will require the exposure of new kinds of services that support a replication protocol. The most basic of which would be to provide a Publish and Subscribe interface. To conclude, high scalability in SOA may indeed be possible. It is a bass-ackwards way of achieving high scalability, but if your only option is to use SOA, then there may just be a possibility to achieve it. Share the article Share the article Oh how time flies I8217ve been quite remiss in providing my yearly predictions in the Software development space. Must be the mini economic depression that we8217ve gone through that just doesn8217t appear to be ending for many folks. I am surprised myself to find the last time I published my predictions was in 2007 That8217s a year before the epic market crash. Well it does turn out that most of my predictions (or rather observations) came out to fruition. That is, Virtualization, Cloud Computing, Dynamic Languages, Javascript Browser Integration, RIA frameworks, openID, the death of Webservices and life after EJB are all common features of today8217s software development landscape. What is surprising is how little these trends have changed in the last 4 years since I made them. Appears to be just steady improvements (or declines) on a year to year basis. What is interesting to note is that when a concept or technology has a declining, it does persist. The only question is the velocity of the decline. Take for example WS - Standards and EJB, over the past 4 years progress in this space has slowed to a crawl (EJB) or halted completely (WS-). Of course these spaces are not entirely dead economically. Massive amounts of investments have been made in these two specific areas and their certainly is a bias and vested agenda to continue to pursue. These are today8217s generation8217s COBOL legacy apps. My other 2007 predictions have had made less of a discernible progress. Parallel Programming ( at the CPU level) and Semantic Web. There of course have been massive progress in the CUDA space and in LinkedData, but these technologies are not as ubiquitous as I had predicted. There however is one prediction that is experiencing a trend reversal. JCR in the years following 2007 made robust progress in that it was common to see many new Java projects based on it. However in recent years, likely because of competition with NoSQL, there seems to be a compelling alternative to document storage. Despite the economy (which I attribute more to global equilibrium), these are very exciting times for software development. There is a sea change that is happening that will rapidly change the face of the industry. Here are my 2011 predictions for software development. Enterprise AppStores 8211 Okay, folks have been pointing this out for years using different names ( Widgets, Gadgets, Midlets etc) I mean Java itself got its boost because of Applets. We now know what has come of applets. The Thin Client revolution was hyped a decade ago. Well it turns out, it has arrived, courtesy of faster and more energy efficient processors and gesture driven devices. Enterprise will demand the kind of apps they find on their smart phone and tablets. Gone will be monolithic apps with loads of features that are rarely used. In will be highly specialized applications with high usability. Corporations, the control freaks that they are, will insist on governance. This ultimately implies an AppStore per enterprise basis. Javascript Virtual Machines 8211 This trend has becoming bigger and bigger every year and as much as we find the language and environment to be difficult and unscalable, the community will have to deal with it. A majority of new development projects will need to find out how they can scale Javascript development or die trying. There are several competing alternatives, these include Javascript frameworks like jQuery and YUI, treat Javascript as assembly language like GWT and CoffeeScript and pretend it doesn8217t exist like JSF, Vaadin and RAP. Your poison would like be chosen based on the kind of app you are building. What we will see is a major percentage of the app would be executed in a Javascript container, whether that be in the browser, the mobile app (PhoneGap) and the server (see: NodeJS, Jaxer). NoSQL 8211 This is a harder call to make simply because not many applications are going to need this kind of scalability. That is if you look at it from the point of view of large monolithic applications. However, if an enterprise is to serve thousand of little applications, they better quickly figure our a way to manage that proliferation without the conventional overhead of managing the typical enterprise app. Virtualization gets you halfway their, but cloud based infrastructure, particularly storage managed by specialized NoSQL servers would be the economical way to go. The enterprise will consist of horizontally scalable ReSTful accessible endpoints that will be spewing HTML and Javascript. End users will be quickly able to compose apps and install them on their own devices. Semantic Indexing 8211 So now that you have these massively horizonally scalable data stores, you are faced with an even bigger problem of finding anything. Full text engines like LuceneSolr will be standard fare, however the Enterprise will demand higher fidelity in their searches and this will drive demand for indexing beyond inverted indexes. Expect to see servers with hundreds of gigabytes of DRAM to enable this. Big Analytics BigData will need analysis. Analysis is only as good as the quality of your data. There will be a rising demand for higher quality data sources, data quality tooling and of course alternative ways to analyzing and visualizing data. There will be intense debates between Map-Reduce NoSQL and traditional OLAP vendors. NoSQL will need to progress quickly enough before customers realize their inadequacies. Look to Hadoop to increase its dominance in this area. Private Clouds 8211 Despite the economic and technological incentives of outsourcing one8217s infrastructure, there will always be that organizational and human need to build and own one. Private clouds of course will overlap and need to integrate with public clouds, simply because the dominant business model will be SaaS. Look for OpenStack to emerge as the clear leader. OAuth in the Enterprise 8211 OAuth is already widely used in consumer applications. With OAuth 2.0, I expect rapid adoption in the enterprise space simply because there is no other viable alternative. Application coordination will be a necessity and OAuth will be its enabler in secure environments. Inversion of Desktop Services 8211 Services that we commonly expect on a desktop like the file systems, short cuts, contacts, calendars and programs will increasingly reside in the cloud. This is a consequence for the need for greater security on mobile devices and the need to share information among muliple devices and muliple collaborators. The filesystem of the future will be collaborative shared spaces. We are already seeing Services like Dropbox, Instapaper, Evernote, Springboard, Delicious and Twitter serving as the means of coordination between mobile applications. Proactive Agents 8211 For decades people have been forecasting the emergence of digital personal assistants that would actively react to the environment on one8217s own behalf. The emergence of always present smart mobile devices and cloud computing shared spaces will be the catalyst for the developing of active agent based computing platforms and frameworks. At present, most computing is merely reactive, that is servicing web requests only on command of a user. Future computing will include a proactive aspect that suggests courses of actions to users. Semantic technologies like Zemanta and OpenCalais provide intelligence to writers by suggesting tags that are relevant to a written document. Migration to Scala 8211 My hunch on the programming language that will have the highest growth in adoption and interest would be Scala. Scala8217s appeal is that it is elegant and can express complex constructs succinctly. I see most adopters migrating from serverside developers looking for a new shiny toy to play with. Scala frameworks like Lift and Akka, and IDEs like IntelliJ will be the wind that propels this migration. Alternative JVM languages like Groovy, Clojure and JRuby will likely plateau in popularity as a consequence. What now is becoming apparent with these trends is greater fragmentation in IT. No more is one kind of database, one kind of programming language, one kind of operating system, one kind of UI framework going to be viable. One cannot control anymore what its built on (specifically for any cloud based service), however one may still have control of the data (see: Dataportability. org) and this will be key. Share the article Share the article This is an updated list of active Open Source Workflow Engine that are written in Java or hosted in a JVM: uEngine 8211 The uEngine BPM suite consists of a modeling tool and process engine, dashboard with SSO and a OLAP inspired process analyzer. uEngine BPM foundation is built using the Liferay Enterprise Portal, Mondrian OLAP Server, JBoss Drools BRE and Axis 2. Triana 8211 An open source problem solving environment developed at Cardiff University that combines an intuitive visual interface with powerful data analysis tools. Already used by scientists for a range of tasks, such as signal, text and image processing, Triana includes a large library of pre-written analysis tools and the ability for users to easily integrate their own tools. Pegasus 8211 The Pegasus project encompasses a set of technologies the help workflow-based applications execute in a number of different environments including desktops, campus clusters, grids, and now clouds. Scientific workflows allow users to easily express multi-step computations, for example retrieve data from a database, reformat the data, and run an analysis. Once an application is formalized as a workflow the Pegasus Workflow Management Service can map it onto available compute resources and execute the steps in appropriate order. Pegasus can handle 1 to 1 million computational tasks. Drools Flow 8211 Drools Flow provides workflow to the Drools platform. Drools Flow allows end users to specify, execute and monitor their business logic. The Drools Flow process framework is easily embeddable into any Java applicationor can run standalone in a server environment. Activiti 8211 Activiti is a Business Process Management (BPM) and workflow system targeted at business people, developers and system admins. Its core is a super-fast and rock-solid BPMN 2 process engine for Java. It8217s open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the cloud. It integrates perfectly with Spring. JBoss jBPM is a platform for multiple process languages supporting workflow, BPM, and process orchestration. jBPM supports two process languages: jPDL and BPEL. jPDL combines human task management with workflow process constructs that can be built in Java applications. Includes also a Visual Designer for jPDL and Eclipse-based tooling for BPEL. RiftSaw 8211 Project Riftsaw is a WS-BPEL 2.0 engine that is optimized for the JBoss Application Server container. WS-BPEL 2.0 is an XML-based language for defining business processes that orchestrate web services. Riftsaw is based on Apache ODE . Joget 8211 Joget Workflow is a people-driven, form-based workflow management system. Joget Worklfow is XPDL compliant and has a plug-in architecture to extend its usability. The system can be used on its own to manage the flow of processes and data captured from forms. Supports synchronous and asynchronous integration of other business processes. Supports portal integration using AJAX or JSON APIs. Orchestra 8211 Orchestra is a complete solution to handle long-running, service oriented processes. It is based on the OASIS standard BPEL 2.0. Provides a generic engine (Process Virtual Machine), Web 2.0 based process console and a graphical BPEL designer. Shark is completely based on standards from WfMC and OMG using XPDL as its native workflow definition format. Storage of processes and activities is done using Enhydra DODS. Taverna The Taverna project aims to provide a language and software tools to facilitate easy use of workflow and distributed compute technology within the eScience community. Taverna is both a workflow enactor and also an editing suite. Bonita is a flexible cooperative workflow system, compliant to WfMC specifications. A comprehensive set of integrated graphical tools for performing different kind of actions such as process conception, definition, instanciation, control of processes, and interaction with the users and external applications. 100 browser-based environment with Web Services integration that uses SOAP and XML Data binding technologies in order to encapsulate existing workflow business methods and publish them as a J2EE-based web services. A Third Generation Worflow engine based in the activity anticipation model. Imixs 8211 The project comprises a framework to create workflow systems as well as a reference implementation based on the J2EE standard. The project includes the development of a graphic editor for creation and management of workflow models based on the Eclipse framework. Bigbross Bossa The engine is very fast and lightweight, uses a very expressive Petri net notation to define workflows, does not requires a RDBMS and is very simple to use and to integrate with java applications. Actually, it was designed to be embedded. YAWL 8211 YAWL (Yet Another Workflow Language), an open source workflow languagemanagement system, is based on a rigorous analysis of existing workflow management systems and workflow languages. Unlike traditional systems it provides direct support for most of the workflow patterns (workflowpatterns). YAWL supports the control-flow perspective, the data perspective, and is able to interact with web services declared in WSDL. It is based on a distributed, web-friendly infrastructure. Zebra 8211 Zebra is a workflow engine 8211 originally developed to fill in the gaps in some commercial and open source workflow engines. The key differences between it and other workflow systems are able to model all the workflows described in workflow patterns, a GUI designer and Hibernate persistence layer. ActiveBPEL 8211 ActiveBPEL engine is a robust runtime environment that is capable of executing process definitions created to the Business Process Execution Language for Web Services (BPEL4WS, or just BPEL) 1.1 specifications. Ode 8211 Orchestration Director Engine 8211 The initial source for Ode originates from the Sybase Business Process Enginge (BPE) and the PXE BPEL 2.0 engine from Intalio. ODE implements the WS-BPEL specification. The implementation will also support MessageEvent to process correlation. ODE can be plugged into various service bus or component architectures like ServiceMix. BeanFlow 8211 A tiny library with just a few classes and only depends on commons-logging and Java 5. Uses plain Java code to do boolean logic, handle state, do looping, call functions, create objects, aggregation and composition. Based on just one single concept, joins. Swamp 8211 SWAMP is a workflow processing platform. The workflow is designed in a XML based meta language. Workflows can be built from different workflow 8216patterns8217 like simple actions, decisions, selections, loops, but also custom code and external events. SWAMP builds a HTML GUI from the workflow definition file that guides different users through the whole process, sends notifications if required, assembles overview pages over all running processes and much more. A SOAP interface can be used to integrate external systems into the workflow. Sarasvati 8211 Sarasvati is a workflowbpm engine based on graph execution. It has a simple core which allows for subsititions of implementations. Features include: Simple graph execution based core Process DefinitionGraph Visualizations Domain specific language (Rubric) for user understandable guards XML file format for process definitions Hibernate backed engine for DB persistence Memory backed engine TobFlow 8211 TobFlow (Total Object Base and Flow or the Object Flow) is a web application platform to manage forms and workflows. It is made of an engine which manages the user interface (forms) and the scheduling of tasks (workflows) based on object model descriptions. The TobFlow is a true document workflow tool. Werkflow is a flexible, extensible process - and state-based workflow engine. It aims to satisfy a myriad of possible workflow scenarios, from enterprise-scale business processes to small-scale user-interaction processes. Using a pluggable and layered architecture, workflows with varying semantics can easily be accomodated. What makes OSWorkflow different is that it is extremely flexible. Run WFE 8211 RunaWFE consists of JBOSS-JBPM workflow core and a set of additional components. Includes user web interface, graphical process designer, flexible system for roles executors determination, web services, portlets, Alfresco integration and security with LDAPMS Active Directory integration. WfMOpen is a J2EE based implementation of a workflow facility (workflow engine) as proposed by the Workflow Management Coalition (WfMC) and the Object Management Group (OMG). Workflows are specified using WfMC8217s XML Process Definition Language (XPDL) with some extensions. The Open for Business Workflow Engine is based on the WfMC and OMG spec. OFBiz Workflow Engine uses XPDL as its process definition language. JFolder JFolder (formerly PowerFolder) contains features critical to many applications 8211 including web pages, workflow, security, persistence, email, file management, and data access. Open Business Engine Open Business Engine is an open source Java workflow engine which supports the Workflow Management Coalition8217s (WfMC) workflow specifications, including interface 1, also known as XPDL, interface 23 known as WAPI and interface 5 for auditing. OBE provides an environment for executing activities in a controlled, centralized environment. OBE supports both synchronous and asynchronous execution of workflows. The primary OBE implementation is based on J2EE. Freefluo 8211Freefluo is a workflow orchestration tool for web services. It can handle WSDL based web service invocation. It supports two XML workflow languages, one based on IBM8217s WSFL and another named XScufl. Freefluo is very flexible, at its core is a reusable orchestration framework that is not tied to any workflow language or execution architecture. Freefluo includes extension libraries that enable execution of workflows written in a subset of WSFL. Micro-Workflow 8211 The micro-workflow framework targets developers who want to separate the control and logic aspects in their programs, thus making them flow independent. A well-factored flow independent application facilitates change because the most frequent business changes translate into process changes, thus leaving the code intact. Flow independence also fosters reuse, because domain objects make fewer assumptions about the control context in which they operate con:cern 8211 con:cern is a workflow engine based on an extended case handling approach. A process is described as a set of activities with pre - and postconditions. An activity is executed when its preconditions are met. It manipulates the process item, thereby creating postconditions. The process flow is determined at run-time. This approach is superior to the conventional process flow approach. XFlow2 8211 Inspired by simple workflow definition language in XFlow developed to improve its implementation. Externalized SQL in iBatis mapping files. Works as embedded workflow engine. Apache Agila 8211 Agila is centered around Business Process Management, Workflow and Web Service Orchestration. It8217s composed of two specialized modules: Agila BPM and Agila BPEL. Agila BPM is basically handling tasks and users who have to complete these tasks. It8217s a very flexible and lightweight workflow component. Agila BPEL is a BPEL-compliant Web Services Orchestration solution Syrup 8211 Syrup is an adaptive Workflow system. Syrup provides five basic concepts: Tasks, Links, Workflows, Workers and the WorkSpace. Syrup can overcome the von Neumann bottleneck that stops traditional software systems from scaling. It does this by strictly separating the specification, identification and execution phase of Workflows in a distributed setup. Syrup doesn8217t follow the more complex standards such as Wf-XML, BPML and XPDL. Dalma 8211 The heart of the engine is an ability to capture the execution state of a thread and resume it later. Many applications of today need to have a part of the program that waits for other entities. Often there are multiple conversations running concurrently. Those are what we call 8220workflow8221 applications. Today, those applications can be written, but one can8217t write it very productively. Dalma makes it very easy to write those workflow applications by letting you write it as an ordinary procedural program without any boilerplate. Pi Calculus for SOA 8211 The first stage of this project is to provide an implementation of the W3C Web Services Choreography Description Language (WS-CDL). It provides the necessary tools to describe and police blueprints for complex distributed IT architectures as well as for describing cross domain business protocols (e. g. FIX, fpML, SWIFT, etc). Intalio BPMS Intalio BPMS is designed around the open source Eclipse BPMN Modeler, Apache ODE BPEL engine, and Tempo WS-Human Task service. GridAnt 8211 GridAnt is not claimed as a substitution for more sophisticated and powerful workflow engines such as BPEL4WS, XLANG and WSFL. Nevertheless, applications with simple process flows tightly integrated to work with GT3 can vastly benefit from GridAnt without having to endure any complex workflow architectures. The philosophy adopted by the GridAnt project is to use the workflow engine available with Apache Ant and develop a Grid workflow vocabulary on top of it. In other words, we provide a set of Grid tasks to be used within the Ant framework. Kepler Project 8211 The Kepler project8217s overall goal is to produce an open-source scientific workflow system that allows scientists to design scientific workflows and execute them efficiently using emerging Grid-based approaches to distributed computation. Kepler is based on the Ptolemy II system for heterogeneous, concurrent modeling and design. JOpera 8211 JOpera for Eclipse is a rapid service composition tool offering a visual language and autonomic execution platform for building distributed applications out of reusable services, which include but are not strictly limited to Web services. Due to its generality, JOpera for Eclipse has a wide range of applications: from classical Workflow Management and Business Process Automation, Enterprise application integration, to Virtual laboratories (e. g. scientific workflows, bioinformatics), Cluster and Grid computing and even Data Stream processing. BpmScript 8211 BpmScript aims to make writing Business Processes simple by handling Workflow, Web Services Orchestration and Sheduling. BpmScript has an embedded ServiceMix ESB. This allows it to take advantage of the prebuilt ServiceMix components (e. g. SOAP, FTP, Email, File, RSS, Jabber, JMS etc.) JaCOB 8211 PXE8217s BPEL implementation relies on the JACOB framework to implement the BPEL constructs. The framework provides the mechanism necessary to deal with two key issues in implementing BPEL constructs: Persistence of execution state and Concurrency. By rolling up these concerns in the framework, the implementation of the BPEL constructs can be simpler by limiting itself to implementing the BPEL logic and not the infrastructure necessary to support it. Tempo 8211 Intalio Tempo is a set of runtime components that support BPEL4People to bring workflow functionality to a BPEL engine. Tempo provides one possible User Interface for users to manage their tasks, which goes beyond the scope of BPEL4People. Tempo only provides runtime component. It does not provide tools to generate workflow processes nor does it provide forms. Oryx 8211 Oryx is a web-based, extensible modeling platform. You can create diagrams in many different modeling languages and share them. GWES 8211 The Generic Workflow Execution Service (GWES) is the workflow enactment engine. GWES coordinates the composition and execution process of workflows in arbitrary distributed systems, such as SOA, Cluster, Grid, or Cloud environments. The Generic Workflow Description Language (GWorkflowDL) is based on Petri nets. It provides interfaces to Web Portal frameworks and to a command line clients. The workflow service supports pure Web Services and Globus Toolkit 4. Java Workflow Tooling 8211 The Java Workflow Tooling project (JWT) aims to build design time, development time and runtime workflow tools and to foster an ecosystem of interoperable Business Process Management (BPM) platforms. ZBuilder3 is a second generation of workflow development and management system which intends to be an open source product. It defines a set of standard JMX management interfaces for different workflow engines and their workflows. Abandoned Twister 8211 Twister8217s aim is to provide a new generation, easily integrable, B2B oriented workflow solution in Java, based on the latest specification efforts in this field. The process engine is based on the BPEL business process specifications and Web Services standards. Abandoned MidOffice BPEL Engine 8211 MidOffice BPEL Editor (MOBE) is an open-source platform for process orchestration which executes, monitors, adjusts and terminates pre-defined processes). The platform is implemented using J2EE technologies and standards like BPEL, XML and SOAP. Abandoned jawFlow 8211 JawFlow is a Workflow Engine partially conformal to WfMC (wfmc. org) directives. It ia based on XML Process Definition Language (XPDL) and activities can be written in Java or any BSF based scripting language. JawFlow is composed of modules that are JMX Mbeans. Abandoned Beexee 8211 Bexee is a BPEL engine capable of executing deployed business processes described in BPEL by orchestrating existing Web Services. Abandoned OpenWFE OpenWFE is an open source java workflow engine. It features 3 components, easily scalable. an engine, a worklist and a web interface. Its workflow definition language is inspired of Scheme, a Lisp dialect, though it is expressed in XML. Abandoned Antflow 8211 AntFlow (Onionnetworks)is a tool for the automation and scheduiling of data system tasks, including those with complex dependencies and workflow logic. Antflow represents a new approach to simplifying system automation that leverages pipelines of hot folders chained together to perform a given task. Using XML, Antflow associates an automated task, such as data transfer, compression, or encryption, with a directory on the local system. Whenever a file is copied or written into the hot folder, the associated task is executed and the file is moved to the next hot folder in the pipeline for further processing. Abandoned Please let me know if I missed something that should be in the list. Share the article Share the article In recent days I have come across a couple of interesting articles on the web on how to define service APIs. The first one titles 8220Web API Documentation Best Practices 8221 from ProgrammableWeb. The author writes about the importance of good documentation in that it encourages and keeps developers interested in the service and also helps reduce support costs. The article describes some basic areas that should be covered by documentation such as having an overview, a introduction section, sample code, and references. The article further recommends the following best practices: Auto-generate Documentation Include Sample Code Show Example Requests and Responses Explain Authentication and Error Handling Mark Blotny wrote that 8220Each Application Should Be Shipped With a Set of Diagnostics Tools. He writes that developers typically have limited access to the production servers. However in the event that something goes wrong, developers require the capabilities to perform an investigation in reasonable time to identify to uncover the causes of the problems. He writes that a service api should have the following: Each integration point should include a diagnostic tool. There should be accessible logs for each call to an external system. Service peformance data should be accessible by developers. All unexpected errors should be logged and easily accessible. Finally there is an article by Juergen Brendel who wrote 8220The Value of APIs that Can be Crawled 8220. He writes that a service API should be designed such that it can be discovered via a crawler. Although this requirement is commonsense for anyone concerned with SEO, it unfortunately isn8217t quite common for developers of service APIs. The notion of a decentralized index who8217s data is populated by crawlers should in fact be key technology component of any Service Oriented Architecture (SOA). Surprisingly however, despite the success of search engine companies like Google, this component is absent in most of all SOA stacks I have seen. In SOA stacks, there is a notion of a service directory, in most implementations the assumption is for a centralized service and the onus is on each service to register and provide appropriate and current information to the directory. It appears to be logically the same thing, however what scales in practice is the decentralized indexcrawler and not the centralized directory. These three articles show that there is in fact value in providing service functionality that goes beyond the documented functional requirements. There is in fact research that I came across that documents this in a more comprehensive manner. Here are the property groups that a service may provide: I love lists exhaustive lists like this because it reminds me of what I may be missing. Speaking of which, it reminds me that Web Services Modeling Ontology (WSMO) has something formal along similar lines. In fact, if you really want to go into the deep end with service contracts, you can read this. It is interesting how this non-functional attributes (i. e. ilities) align well with the idea of Aspects Oriented Programming and can be implemented in a proxy like infrastructure. That is in fact what it appears that existing 8220API Management8221 firms (ex. Mashery. Sonoa. WebServius. 3Scale ) appear to provide. Here are some examples of the features that these API Management firms are offering: Reporting, Analytics and Visualization dashboard. Traffic management and rate-limiting Security, Access Control, Authorization. Mediation 8211 Protocol Bridging. Monetization User management and provisioning. Self service provisioning. Community management. Portal, Access key management, FAQs, Wiki Scalabilability. Clustering, Caching. Threat Protection 8211 Denial of service attacks. Versioning Operations Management. Root cause analysis. Logging. Share the article Share the article Did some more googling around and have uncovered a couple more noteworthy SOA patterns. These are from the following sources: Agent Design Patterns Design Patterns for Policy Based Engagements Patterns for Service-Oriented Information Exchange Requirements Saga Pattern Context Aware Privacy Design Pattern Selection Agent Itinerary 8211 Objectifies agent itineraries and routing among destinations. Forward 8211 Provides a way for a host to forward newly arrived agents automatically to another host Ticket 8211 Objectifies a destination address, and encapsulates the quality of service and permissions that are needed to dispatch an agent to a host address and execute it there Delegation 8211 The debtor of a commitment delegates it to a delegatee who may accept the delegation, thus creating a new commitment with the delegatee as the new debtor. Escalation 8211 Commitments may be canceled or otherwise violated. Under such circumstances, the creditor or the debtor of the commitment may send escalations to the context Org. Preemption 8211 To cancel a commitment based on conflicting demands. Barrier 8211 Guards an action and specifies (pre)conditions on its execution Co-location 8211 Two or more resources are to be co-located at a certain time and place for a specified duration. Correspondence 8211 Relating two pieces of information each owned by a different participant Deadline 8211 Some information is required for an action before a certain time after which an alternate action is taken Expiration 8211 Some information will become invalid at a certain point in time (not shown in figure) Notification 8211 On-state-change xe2x80x9cpushingxe2x80x9d of information to enforce Correspondence. Query 8211 On-demand periodic polling of information to enforce Correspondence Retry 8211 Retrying an action a number of times before resorting to an alternate action Selection Choosing from among similar service offerings from multiple participants according to some criteria Solicitation 8211 Gathering information about service offerings from participants Token 8211 Issuing a permission for executing an action to other participants Saga 8211 How can we get transaction-like behavior or complex interactions between services without transactions. Obligation Management 8211 Allow obligations relating to data processing to be transferred and managed when the data is shared Sticky Policies 8211 Bind policies to the data it refers to A couple of them are redundant with other patterns in other texts. You can find these patterns here: Share the article Posts navigation

No comments:

Post a Comment