Skip to content

sarthak0714/tollywood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tollywood

Tollywood is a Go-based implementation of the actor model Actor Model. It offers a straightforward framework for building scalable and distributed systems using the actor pattern.

Features

  • Lightweight, concurrent actors
  • Message-passing based communication
  • Remote actor management and communication via gRPC
  • Easy to integrate with existing Go applications
  • Scalable architecture suitable for distributed systems

Installation

To install Tollywood, use the following command:

go get github.com/sarthak0714/tollywood

Quick Start

Here's a simple example of how to use Tollywood:

package main

import (
    "fmt"
    "github.com/sarthak0714/tollywood/internal/system"
    "github.com/sarthak0714/tollywood/proto"
)

func main() {
    // Create a new actor system
    actorSystem := system.NewActorSystem()

    // Spawn an actor
    actor, err := actorSystem.SpawnActor("myActor")
    if err != nil {
        fmt.Printf("Failed to spawn actor: %v\n", err)
        return
    }

    // Send a message to the actor
    message := &proto.Envelope{
        Sender:      "main",
        Target:      "myActor",
        MessageData: []byte("Hello, Actor!"),
    }
    err = actorSystem.SendMessage(message)
    if err != nil {
        fmt.Printf("Failed to send message: %v\n", err)
        return
    }

    // ... Handle actor responses and implement your logic
}

Architecture

Tollywood consists of the following main components:

  • Actor: The basic unit of computation that receives and processes messages.
  • ActorSystem: Manages the lifecycle of actors and facilitates message passing.
  • RemoteServer: Enables remote communication and management of the actor system using gRPC.

Contributing

Contributions to Tollywood are welcome! Please feel free to submit a Pull Request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published