Questions tagged [asynchronous-messaging-protocol]

AMP is an RPC protocol for sending multiple asynchronous request/response pairs over the same connection. Not to be confused with Accelerated Mobile Pages.

AMP is an RPC protocol for sending multiple asynchronous request/response pairs over the same connection. Requests and responses are both collections of key/value pairs. Keys are limited to 255 bytes in length, and values to 65,535 bytes. Any number of key/value pairs may be encoded in a single AMP packet.

AMP enables a rich set of Internet applications, from Client-Server "traditional" web-service operations, to highly custom and efficient RPC protocols, to distributed peer-to-peer messaging configurations. Once connected, the AMP protocol is symmetric, allowing either client or server to initiate an asynchronous request, provided the other side implements a handler for it.

For values, AMP defines a number of Standard Data Types, while keys are always strings.

AMP originally appeared in Twisted, a Python networking framework, however AMP is not Python-specific.

(from http://amp-protocol.net)

Not to be confused with amp-html the Google-led accelerated mobile pages project.

50 questions
2
votes
1 answer

Twisted AMP - how to send values bigger than 64K

I'm using Twisted + AMP to communicate between a server and client, both of which are Python, fully under my control. My messages are usually short, but sometimes an argument can be longer than the 64K limit. Is there any way to handle this…
Jonathan
  • 1,864
  • 17
  • 26
2
votes
1 answer

Serializing twisted.protocols.amp.AmpList for testing

I have a command as follows: class AddChatMessages(Command): arguments = [ ('messages', AmpList([('message', Unicode()), ('type', Integer())]))] And I have a responder for it in a controller: def add_chat_messages(self, messages): …
Ruslan Osipov
  • 5,655
  • 4
  • 29
  • 44
2
votes
2 answers

LoopingCall AMP commands

Why do I get an error while trying to implement LoopingCall function calling AMP commands? from twisted.protocols.amp import AMP from twisted.python.log import startLogging, err from twisted.internet.task import LoopingCall from twisted.internet…
Ruslan Osipov
  • 5,655
  • 4
  • 29
  • 44
1
vote
0 answers

Unable to send AMP emails from AWS SES

I tried sending a raw email from AWS SES console. But am not getting Amp email. It is still plain text.i have already whitelisted my emailId so that I can receive amp email. But still no luck. Following is my code for Raw email. Subject: Example…
1
vote
1 answer

Navigate in amp-script

I have an input select that sets a state "selectedStateId", an amp-autocomplete that sets "selectedCity", and finally an input text as a search bar that sets "inputTerms". With these I make a URL like:…
Simon
  • 55
  • 10
1
vote
0 answers

AMP custom script / passing dynamic values from php to amp-script

The intention is to add an analytics API script to the AMP version of a set of pages in the website. To do so, I am trying to write a custom AMP script in which I am receiving a dynamic $post_id value from php to a javascript function. //…
1
vote
1 answer

Asynchronous Messaging Protocol compatibility outside Python (and twisted)

The Asynchronous Messaging Protocol is a simple protocol in python-twisted. I have a fairly complete app (python, twisted, kivy) using it. The client-server architecture implements a view-controller sort of relationship, with allmost all business…
Ng Oon-Ee
  • 1,193
  • 1
  • 10
  • 26
1
vote
1 answer

What is the best way for applications to communicate in micro-service architectures

I have to design and implement a service delivery platform. I have various services in my current design and all of those tools are using different technologies. Some are erlang based concurrent map-reduce functions and some are simple bash…
1
vote
1 answer

How should a Twisted AMP Deferred be cancelled?

I have a Twisted client/server application where a client asks multiple servers for additional work to be done using AMP. The first server to respond to the client wins -- the other outstanding client requests should be cancelled. Deferred objects…
1
vote
0 answers

Twistd amp protocol : Producer/Consumer pattern?

I would like to use protocal to send data between server/client : list of unicode (string) that exceed the limit size of 65,535 bytes. A nice and clean solution to deal with the limit size problem is to Implement Producer/Consumer…
agstudy
  • 119,832
  • 17
  • 199
  • 261
1
vote
1 answer

Chaining deferred callbacks

I am trying to chain deferreds in AMP client like following: Client: from twisted.internet.endpoints import TCP4ClientEndpoint, connectProtocol from twisted.protocols.amp import AMP import commands def connect_protocol(host, port): destination…
Ruslan Osipov
  • 5,655
  • 4
  • 29
  • 44
0
votes
1 answer

How to make an exception for a template not to load on AMP in wordpress?

I have my web page full on AMP using too the oficial plugin. I use templates for my content, the template is used everytime someone makes a post. All the page is in AMP but if I want that just one template just do not load in AMP, how can I make…
0
votes
0 answers

AMP GA tracking get additional information on click events

I've inherited a legacy setup for GA tracking in AMP and attempting to add link click tracking. I am following this example and the link click is coming through. It has been requested that we also track the page URL and the link URL. I see a handful…
0
votes
0 answers

Trying to pass a message from an amp-iframe back to its parent window

I have an amp-iframe displaying and working fine, its content is hosted on a different domain, all is good. Once a button is clicked the amp-iframe sets a few cookies and closes, I want to pass a message to the parent window using passMessage(),…
Ricardo Sanchez
  • 4,935
  • 11
  • 56
  • 86
0
votes
0 answers

Getting Error on AMP pages tracking on GA4

I have been trying to start tracking AMP pages in GA4 but getting amp validation error by adding below script in Body or head tag of the amp website.