Implementação de Mecanismos de Interação via Java Threads

Autores

  • Maria Alice Brito UERJ
  • Rafael Bernardo Teixeira UERJ

Resumo

In the language constructs and features context, inparticular, concurrent programming structures, wepresent in this paper an interaction mechanismimplementation relies on integrated concurrencymodel, so-called active object. This interactionassumes a kind of asynchronous RPC with use offuture, in which the result of a local or remoteinvocation will be accessed when needed. We point outthe following main topics in this implementation: 1) theconcurrency integrated model was solved by the use ofa Meta-Object to be created and bound for eachapplication object in run-time; 2) the asynchronousinvocation was solved by the use of proxiesimplemented as threads, in order to provideindependent behavior in relation to their Meta-Object;3) a kind of Message Queuing approach wasimplemented, in which invocation and responsemessages can be stored in a message box, to makepossible the access to future result variable, whenneeded; and 4) the invocation and response messageswere turned into meta messages, in accordance withActive Messages approach, in which decouplescommunication and synchronization by treatingmessages as active objects rather than passive data.We make note that Java supports shared-memorycommunication via threads and monitor features, butwe have used these features for solve our concurrencymodel. The three concurrency aspects – the model, theconcurrency and the interactions – hold an expressivesynergy, though we have tried put focus in theinteraction aspect, we could not avoid the another twoaspects arose sometimes.

Downloads

Como Citar

Brito, M. A., & Teixeira, R. B. (2013). Implementação de Mecanismos de Interação via Java Threads. Cadernos Do IME - Série Informática, 15. Recuperado de https://www.e-publicacoes.uerj.br/cadinf/article/view/6450

Edição

Seção

Artigos