Index

So we want a new app

Lets start with the code

it will be deployed to a repository.

THen that repository will be set up with cloudflair workers todo: make a api request script to do this

lib_cloudflair.funtions.sh


cf_deploy_pages {
    local repo = $1
    
    git clone repo;
    npm install
    npm run cloudflare
    echo "note repositories must have /pages /functions and a package.json"
}

After this we must set up a domain.

this can be done with digital ocen dns.

inputs: base_domain sub_domain account DO_API_KEY

so now we deploy the domain.

theoretical it can be bcked by a digital ocena droplet with a floating ip

so each domain gets an ip that can be reassigned.

in the end we have /pages and /functions and /server

Clusters Rabitmq and apachezookeper

High-Level Overview:

Apache ZooKeeper and RabbitMQ are both distributed systems that play crucial roles in building scalable and reliable applications. However, they serve different purposes and have distinct features.

Apache ZooKeeper:

RabbitMQ:

Comparison and Contrast:

  1. Purpose:

    • ZooKeeper: Focuses on distributed coordination and maintaining consistent metadata.
    • RabbitMQ: Specializes in message-oriented middleware, enabling reliable message exchange between applications.
  2. Data Model:

    • ZooKeeper: Uses a hierarchical tree-like structure (znodes) for storing metadata.
    • RabbitMQ: Stores messages in queues and exchanges, based on routing rules and patterns.
  3. Communication Protocol:

    • ZooKeeper: Provides a custom binary protocol for client-server communication.
    • RabbitMQ: Implements the AMQP protocol, which is a standard for messaging.
  4. Messaging Patterns:

    • ZooKeeper: Does not directly support messaging patterns; mainly used for coordination tasks.
    • RabbitMQ: Offers various messaging patterns, including publish/subscribe and point-to-point.
  5. Durability:

    • ZooKeeper: Ensures strong durability and consistency for its metadata.
    • RabbitMQ: Provides options for message persistence and reliable delivery.
  6. Programming Languages:

    • ZooKeeper: Provides APIs in several languages, including Java, C, Python, and more.
    • RabbitMQ: Offers client libraries for multiple programming languages, facilitating integration.
  7. Scalability and High Availability:

    • ZooKeeper: Supports replication and can be deployed in a cluster for high availability.
    • RabbitMQ: Can be deployed in a cluster to distribute workload and provide fault tolerance.
  8. Use Cases:

    • ZooKeeper: Ideal for distributed systems coordination, leader election, and configuration management.
    • RabbitMQ: Well-suited for building scalable and fault-tolerant messaging systems.

In summary, while both Apache ZooKeeper and RabbitMQ are distributed systems, they differ in their primary purpose and focus. ZooKeeper provides coordination services for distributed systems, while RabbitMQ specializes in reliable messaging between applications. Understanding their specific capabilities and implementation details can help developers choose the appropriate tool for their use case.