Git Product home page Git Product logo

grav's People

Contributors

arbourd avatar cohix avatar danielledeleo avatar lauralangdon avatar ospencer avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grav's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Rate Limited

These updates are currently rate limited. Click on a checkbox below to force their creation now.

  • fix(deps): update module github.com/gorilla/websocket to v1.5.0
  • fix(deps): update module github.com/nats-io/nats.go to v1.14.0
  • fix(deps): update module github.com/twmb/franz-go to v1.4.2
  • chore(deps): update actions/checkout action to v3
  • chore(deps): update actions/setup-go action to v3

  • Check this box to trigger a request for Renovate to run again on this repository

Libp2p transport or P2P Hub?

Libp2p is a networking stack and library for p2p protocols. It supports several transport, security, pubsub, and routing protocols. Grav could really benefit from supporting libp2p as a transport as it offers a lot of nice features from scratch that could help Grav scale in certain decentralized environments.

Leveraging a libp2p transport in Grav could also add service mesh discovery (#32) and a pubsub transport (#15) by design.

Despite all this, for the best of my knowledge libp2p has not been extensively deployed in cloud environments (traditionally less aggressive than p2p networks). Thus, my plan is to build a basic go-libp2p transport plugin for grav, evaluate how it performs compared to the existing transports, and understand if it is worth it supporting additional integration and embedding with libp2p protocols.

This could maybe also open the door to this? :)

Add message ack

When receiving a message via a transport, the transport should be able to ack it and show it's been sent to the local bus.

As a bonus, it would be great if a MessageTicket could have some kind of method to know acks have taken place? How this would work is unclear.

SQS Transport

Grav should be able to use AWS SQS as a transport.

Ability to disconnect Pod

There should be a pod.Disconnect() that essentially "closes" it and signals to the bus that it should be removed on the next revolution of the ring.

WaitUntil can sometimes behave strangely

Under high load, something like this can fail to find a reply:

pod.Send(jobMsg).WaitUntil(grav.Timeout(5), func(msg grav.Message) error { ... })

It's unclear why, as another connected pod can indeed find said reply.

Add `PodGroup`

Something to collect multiple pods, like in cases where you need to watch multiple message types and need to keep references to multiple pods.

Something like:

pods := g.PodGroup()

pods.New().On(...)
pods.New().OnType(...)

It would still be safe since pods retains the pod object so you don't have to if you don't want to.

Grav missing documentation

Documentation is absent for these topics:

  • Usage / Advanced
  • HTTP Transport
  • Websocket Transport
  • Local Network Discovery

Other TODOs:

From Sending Messages:

Sending a message using a Pod is as simple as calling `Send(msg)`. The only required field is the message type, which is analogous to a topic or subject in other messaging systems. Messages have a few other properties that can be taken advantage of, which will be discussed in a future section.

Messages have a few other properties that can be taken advantage of, which will be discussed in a future section.

  • Document other properties of Messages

Ability to inject empty messages into Transport

When using a non-default Message type, it's essential that incoming messages can be unmarshalled into the correct struct. User should be able to provide a function that, given the Message's Type(), returns an empty struct.

Something like UseMsgGenerator(func(msgTypeString) Message)

Memory leak in pod's messageFilter

Hey!

I have been digging into a memory leak with our product that uses Grav. During my search, I noticed ever-increasing memory consumption by github.com/suborbital/grav/grav.(*messageFilter).FilterUUID. Some further digging, has led to the following theory:

In pod.Send() p.FilterUUID(msg.UUID(), false) is called. In FilterUUID(), the UUID of the sent message is added to the UUIDMap map. This UUID seems to never be removed from the map again, leading to an increase in memory consumption every time pod.Send() is called.

I am happy to open an MR to address this, but my understanding of the internals of Grav are not super strong. So some guidance is certainly welcome!

High Water Mark and podConnection eviction

When the failed message array for a podConnection gets to a certain (configurable) size, that pod should be removed from the ring.

Pods should also be able to disconnect themselves.

Questions about inter-Grav communication

Hi Grav team. Is there any documentation or description of how messaging internally (in process) interacts with messaging using transports? For example do we just get one big bus or can we set filtering so that only a subset of messages move across the mesh/bridge?

I'm reading the source but I can't get a feel of how flexible the overall architecture of a Grav mesh might be, how topic hygiene, security, authentication and authorisation might be introduced, and so on. Apologies for the very general questions it would be great to have a clearer picture!

Example Mesh Network

I started playing around with this project a little bit and was wondering if there was any examples on how to setup a multi Grav instanced network?

I noticed the docs in this area was still under active work, so just wanted to reach out to see if there happened to be any working examples or anything I could play around with to get my head around some of this.

Thanks!

Static discovery plugin

The ability to define static peers and have Discovery ensure ongoing connections to said peers would be useful.

When to use blocking vs non-blocking message receive

Still an enthusiastic Go semi-novice but I was surprised that Grav offers both a non-blocking and a blocking message receive. I would have thought that the paradigm in Go would have been to offer only the blocking receive and to run that in a goroutine and then sync over a channel to avoid callbacks :)

Would love to know why both are offered and where you've used the async receive...

Multi-pod transport vs single-pod transport

The HTTP transport uses a single pod for all incoming and outgoing messages, but more sophisticated transport plugins should use a seperate pod per connection. Both situations need to be supported.

Using MQTT as a bridge

Hi @cohix, thanks so much for this lovely clean flexible project. Is there anything conceptually that would prevent the use of MQTT as a bridge for Grav?

Add MsgData interface for easy message creation

Having a MsgData interface would make it easier to create/send messages in one step, for example:

type MsgData interface {
    Data() []byte
    MsgType() string
}

Could then allow something like:

pod.SendData(structThatImplementsMsgData)

PodConnection filtering

Either the podConnection or the Pod itself should allow auto-filtering of messages via configurable filters.

This should be designed such that ResponseTo messages are easily implemented later using a list of expected responseTo UUIDs

Move Grav docs to this repo

With the transition to SE2, we'll no longer maintain Grav docs on the main docs site, and will instead move them to this repo.

Replay for new connections

The bus should buffer the last x number of messages (configurable) such that when a new pod connects, it can optionally request to have the latest message replayed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.