archives

Avoiding Actor Deadlocks--JActor

The problem is that actors do not always process messages in the order received, but may limit processing to selected messages based on their current state. This technique is often used when waiting for a response from another actor. Clearly this can lead to something like deadlock where several actors freeze up, even though no locks are used.

JActor takes a different tack. Messages are processed in the order received, but messages are mostly 2-way and are first class objects with each message only being used once. This means that while processing a message, it can be a place to save intermediate state. So if processing involves sending messages to other actors, there is no need to update the actor's state until message processing is complete.

Another difference is that when a message is returned as a response, it is dispatched differently from other messages. When a message is first sent, it serves as a request and is assigned a callback that will be used when the message is returned with a response value. But note that actors process messages one at a time as a means of thread safety, and this applies as well to the invocation of the callback when processing a response.

This is covered in a lot more detail in the JActor project README.

CFP: Book Chapters for "A Librarian’s Introduction to Programming Languages"

[Folks, This came across the CODE4LIB email list, along with a "feel free to share" not. LTU came to mind immediately. FYI, ALA is the American Library Association - they published a book of mine maybe 15 years ago, and they were great folks to work with. It's been a while, but the guy who as my acquisitions editor is now their Sr. Editor - so I expect their still good to work with.]

This is a call for book chapters for A Librarian’s Introduction to
Programming Languages to be published by ALA/Neal-Schuman Publishing.

This book will look at a variety of programming languages with the intent
to familiarize readers with the reasons for using each language. The book
will cover practical, real world examples to illustrate how a specific
language can be used to enhance library services and resources.

The target audience includes current practitioners, administrators,
educators, and students.

Some potential topics to be included in the book are below.

● Basic
● C#
● Java
● Javascript
● Perl
● Python
● Ruby

We are also interested in other topics. For more information email the
editors:
Ron Brown ronbrown@sc.edu and Beth Thomsett-Scott
beth.thomsett-scott@unt.edu